Skip to content

Make recursive release component-aware and atomic - #176

Merged
plx merged 4 commits into
mainfrom
agent/issue-112-recursive-release
Aug 4, 2026
Merged

Make recursive release component-aware and atomic#176
plx merged 4 commits into
mainfrom
agent/issue-112-recursive-release

Conversation

@plx

@plx plx commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Closes #112

Scope

Recursive release previously enumerated outside a transaction and committed one deletion at a time. This change resolves the target once, builds one component-aware batch plan inside an IMMEDIATE transaction, executes every selected deletion in that transaction, and commits only after the full batch succeeds. Exact and recursive release now share tag selection, path-safety, dry-run planning, execution, and output handling.

The planner applies default all-tag, exact-tag, and untagged-only semantics at every selected path. Documentation now records component-aware matching, atomicity, writer serialization, and dry-run behavior.

Stack

  • Immediate predecessor: none
  • Earlier included PRs: none
  • Required merge order: this PR only
  • Branch point: 3bff053586fc8691fd59315fa5fa035bb240cdb8

Red-before-fix evidence

cargo test -p trop-cli --test release_command test_release_recursive_deletion_is_atomic --all-features -- --exact exited 101 before the implementation: the injected later delete failure left the earlier parent deletion committed, triggering an earlier recursive deletion committed despite a later failure.

The component-prefix, dry-run selection, and tag-mode regressions were already green on the vulnerable revision because earlier path and exact-release work had supplied those pieces; the confirmed remaining defect was transaction ownership.

Validation

  • cargo test -p trop-cli --test release_command --all-features — 34 passed
  • cargo test -p trop operations::release --all-features — 20 passed
  • cargo test -p trop-cli commands::release::tests::recursive_release_serializes_addition_and_refresh_after_planning --all-features -- --exact — passed
  • cargo test -p trop --test concurrent_operations test_concurrent_recursive_release_serializes_with_reserve_processes --all-features -- --exact — passed across three race iterations
  • cargo test --workspace --all-targets --all-features --locked — passed
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings — passed
  • cargo build --release --workspace --all-targets --all-features --locked — passed
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps --locked — passed
  • cargo fmt --all -- --check and git diff --check — passed
  • just test-production-readiness-selector — 61 passed
  • agentic-navigation-guide check and agentic-navigation-guide verify — passed

Acceptance criteria

  • Component-aware recursive matching: the recursive planner uses the existing component-filtered hierarchy query; planner and CLI regressions preserve /work/ab when selecting /work/a.
  • All-or-none deletion: one batch plan executes under one IMMEDIATE transaction, and the injected late failure leaves every selected row intact.
  • Serializable writers: a barrier test proves additions and refreshes block after planning and survive only when serialized after commit; the multiprocess reserve/release stress accepts either valid serial order and verifies database integrity.
  • Tag and dry-run consistency: default all-tag, exact-tag, and untagged-only modes are covered at parent and descendant paths; dry-run uses the same transaction-scoped planning helper without commit.

Residual risks

None identified.

@plx
plx marked this pull request as ready for review August 4, 2026 17:38
@plx
plx merged commit 0763f77 into main Aug 4, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make recursive release component-aware and atomic

1 participant