Phase 2: phase-pr describes itself #481

Merged
mph merged 8 commits from IW-463-phase-02 into IW-463 2026-09-01 12:53:38 +00:00
Owner

Phase 02 implementation for IW-463.

Files

Browse changed files: https://code.iterative.works/iterative-works/iw-cli/-/blob/IW-463-phase-02/

Phase 02 implementation for IW-463. ### Files Browse changed files: https://code.iterative.works/iterative-works/iw-cli/-/blob/IW-463-phase-02/
Phase 2: phase-pr describes itself
Some checks failed
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 7s
CI / lint (pull_request) Successful in 11s
CI / test (pull_request) Has been cancelled
CI / dashboard-build (pull_request) Has been cancelled
CI / compile (pull_request) Has been cancelled
235f3fe808
- CommandDeclaration, CommandArgParser and CommandHelp: a command's flags,
  exit codes and examples live in one declaration that the parser and the
  help renderer both read
- phase-pr migrated to the declaration: --help is answered before any git or
  forge call, and unknown flags and missing values are rejected by name
  instead of being silently ignored
- Forgejo 409 reports a duplicate pull request by name when the forge says
  so, and reports the real conflict otherwise
- The exit-3 resume instruction is shell-quoted inert, so a title cannot
  inject a command into the line an agent is told to run

Issue: IW-463
Phase: 2 of 8

Code review: 3 iterations, 6 skills; 5 critical findings raised and closed.
Reviews in project-management/issues/IW-463/review-phase-02-*.md
chore(IW-463): update review-state for phase 02
Some checks failed
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 7s
CI / lint (pull_request) Successful in 7s
CI / compile (pull_request) Successful in 1m16s
CI / dashboard-build (pull_request) Successful in 59s
CI / test (pull_request) Has been cancelled
3f016f332b
chore(IW-463): update review-state for phase 02
Some checks failed
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 8s
CI / compile (pull_request) Successful in 1m17s
CI / dashboard-build (pull_request) Successful in 1m0s
CI / test (pull_request) Has been cancelled
178536c99d
chore(IW-463): update review-state for phase 02
Some checks failed
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 8s
CI / compile (pull_request) Successful in 1m22s
CI / dashboard-build (pull_request) Successful in 1m0s
CI / test (pull_request) Has been cancelled
b88953c421
chore(IW-463): update review-state for phase 02
All checks were successful
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 7s
CI / lint (pull_request) Successful in 8s
CI / compile (pull_request) Successful in 1m20s
CI / dashboard-build (pull_request) Successful in 1m9s
CI / test (pull_request) Successful in 10m18s
0343e84190
Rescued from a commit the batch run left unreachable. The entry diagnoses
why phase 2's gate never converged: each exit-3 resume commits and pushes a
review-state update, which cancels the CI run it is waiting for.

🤖 Generated with Claude Code
fix(IW-463): exit 1 tells the caller what a spent --timeout budget means
All checks were successful
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 7s
CI / lint (pull_request) Successful in 9s
CI / compile (pull_request) Successful in 1m24s
CI / dashboard-build (pull_request) Successful in 1m8s
CI / test (pull_request) Successful in 10m32s
130b7870a7
A wait that uses up its whole budget leaves through exit 1, but every poll
that reached that point had read Running, so nothing failed. Exit 1 named
only red CI, an unreadable forge and a bad argument, and told the caller to
fix it and run again — which times out again on the same budget.

Found by re-running the agent-legibility gate with an isolated agent, which
answered both required questions correctly and then reported that the help
never says what happens when the budget runs out.

- exit 1 names the spent budget and says to raise --timeout
- CommandDeclarationTest gains a content rule over the subject list, so
  phase-merge and ci-gate are covered when they declare in phase 4
- PhasePrHarnessTest pins the in-loop routing, which no test covered; the
  existing budget test exercises only the pre-poll path
- Builder.register refuses a duplicate flag name, which otherwise loses the
  caller's value silently
- CommandHelpTest guards the blank line before every section header

🤖 Generated with Claude Code
mph merged commit 2ddf7e9fee into IW-463 2026-09-01 12:53:38 +00:00
mph deleted branch IW-463-phase-02 2026-09-01 12:53:38 +00:00
Sign in to join this conversation.
No description provided.