Problem
clean-batch.sh --apply --batch-plan <path> dispatches purely on each plan line's kind (REPO/GITDIR); the apply-time --tier flag is informational only. A stale or swapped plan therefore executes the plan's full gated content while the banner reports the (narrower) requested tier — e.g. --tier build dry-run followed by --tier caches --apply --batch-plan <build-plan> removes both bin/ and .pytest_cache/ while printing Tier: caches.
Bounded: every removed path was still enumerated and confirmation-gated at plan creation (the plan IS the gated set), so nothing un-gated is ever removed — the defect is scope misrepresentation at apply time, not an ungated deletion.
Fix direction
At apply, validate plan records against the requested tier (reject build-class REPO records under --tier caches, gate the GITDIR arm on a git-bearing tier) or drop the apply-time --tier flag entirely so the plan is the sole authority and the banner reflects the plan, not the flag.
Related
Work-class: C3 (bug-fix-shaped) — attended triage 2026-07-23, operator-ratified. 🤖
Problem
clean-batch.sh --apply --batch-plan <path>dispatches purely on each plan line's kind (REPO/GITDIR); the apply-time--tierflag is informational only. A stale or swapped plan therefore executes the plan's full gated content while the banner reports the (narrower) requested tier — e.g.--tier builddry-run followed by--tier caches --apply --batch-plan <build-plan>removes bothbin/and.pytest_cache/while printingTier: caches.Bounded: every removed path was still enumerated and confirmation-gated at plan creation (the plan IS the gated set), so nothing un-gated is ever removed — the defect is scope misrepresentation at apply time, not an ungated deletion.
Fix direction
At apply, validate plan records against the requested tier (reject
build-class REPO records under--tier caches, gate theGITDIRarm on a git-bearing tier) or drop the apply-time--tierflag entirely so the plan is the sole authority and the banner reflects the plan, not the flag.Related
Work-class: C3 (bug-fix-shaped) — attended triage 2026-07-23, operator-ratified. 🤖