Skip to content

Plan lifecycle: harden CLI writes and validation - #26

Merged
DocksDocks merged 1 commit into
mainfrom
23-harden-plan-lifecycle-cli-writes-and-validation
Aug 24, 2026
Merged

Plan lifecycle: harden CLI writes and validation#26
DocksDocks merged 1 commit into
mainfrom
23-harden-plan-lifecycle-cli-writes-and-validation

Conversation

@DocksDocks

Copy link
Copy Markdown
Owner

Closes #23

Implements the reviewed plan #23:

  • claim_verifyclaim's assignee write is body-unchanged guarded; new and claim verify by post-write read that the acting login is the sole assignee, refusing silent assignment failures.
  • retire_recovery — a retry on a closed not-planned issue that still carries a plan:<phase> label skips the close, finishes label cleanup, and exits 0; fully retired plans stay refused.
  • new_prevalidate — trimmed 1-70 title and non-empty goal validated before any write.
  • path_detector — machine-path citations catch any POSIX absolute, drive-letter, and UNC path, backticked included; markdown link destinations and exactly /dev/null stay exempt; /dev/shm/... is refused.
  • mutator_validationstatus, step, and claim run the full 13-check validation and refuse malformed v3 records without writing.

Reviews: plan review round 1 repair (root allowlist replaced by full POSIX detection), round 2 pass; code review round 1 pass with two recorded MEDIUM advisories (phase-label post-read set check; /dev/null token exactness + bare drive roots) left as follow-up, reviewed bytes unchanged.

Verification: scripts/tests/plan-cli.mjs, plan-skill-phases.mjs, plugin selftest, scripts/ci.mjs --plugin plan-lifecycle, and full scripts/ci.mjs all exit 0.

Implements reviewed plan #23:
- claim/new verify the assignee by post-write read; claim's assignee
  write is guarded body-unchanged
- retire retries on a closed not-planned issue with a stale phase label
  and finishes cleanup; fully retired plans stay refused
- new prevalidates a trimmed 1-70 title and non-empty goal before any write
- machine-path citations catch any POSIX absolute, drive-letter, and UNC
  path, backticked included; link destinations and exactly /dev/null exempt
- status/step/claim refuse malformed v3 records via the full 13 checks

Code review round 1: pass with two recorded MEDIUM advisories (phase-label
post-read set check; /dev/null token exactness and bare drive roots).

Closes #23
@DocksDocks DocksDocks linked an issue Aug 24, 2026 that may be closed by this pull request
@DocksDocks
DocksDocks merged commit bc04b64 into main Aug 24, 2026
5 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.

Harden plan lifecycle CLI writes and validation

1 participant