Skip to content

fix(v2): E2E findings — iteration close status key, ANSI-safe CLI, SP rollup#48

Merged
jurby merged 3 commits into
mainfrom
fix/v2-e2e-iteration-status-and-cli-color
May 31, 2026
Merged

fix(v2): E2E findings — iteration close status key, ANSI-safe CLI, SP rollup#48
jurby merged 3 commits into
mainfrom
fix/v2-e2e-iteration-status-and-cli-color

Conversation

@jurby
Copy link
Copy Markdown
Contributor

@jurby jurby commented May 31, 2026

Summary

Three fixes surfaced by a full real-GitHub end-to-end re-validation of EDPA v2 (2 Program Increments × 5 iterations, 24 PRs, 24/24 real CI runs, 560h derived, all invariants green — full report in docs/v2/e2e-real-github-run-2026-05-31.md).

1. Iteration close didn't set the lifecycle status key consumers read

edpa_iteration_close set only the nested iteration.status: closed, but pi_close.py (line 105), reports, the board lifecycle view, and the e2e verifier (12_verify_backlog.py) read the top-level status. An iteration closed via the MCP tool was therefore not seen as closed by those consumers (the e2e run had to patch PI-1's iteration YAMLs to make the verifier pass). Now sets both keys — nested (planning state, consumed by _pi_loader-lifted readers + capacity_override) and top-level (lifecycle). test_iteration_close_sets_status extended to assert the top-level key.

2. backlog.py add leaked ANSI codes into machine-readable output

The allocated item ID was printed with ANSI color even when stdout is piped/captured, which broke parent-ID parsing by tooling/CI (hit during E2E scaffolding). color()/bold() now honor NO_COLOR and non-TTY output via a _use_color() guard. Tests added.

3. Iteration/PI story-point rollup wasn't derived from items

velocity.py and pi_close.py read planning.planned_sp / delivery.delivered_sp from iteration YAMLs, which item-driven backlogs don't populate (SP live on Story/Defect js) → velocity 0, PI predictability None. New helper _sp_rollup.iteration_sp derives planned_spjs per iteration) and delivered_sp (Done only) from the backlog; both scripts fall back to it when explicit iteration SP is absent. Verified on the E2E sandbox: velocity avg 9.3, PI predictability 100%. Tests in test_sp_rollup.py.

Testing

  • pytest -m "not e2e" tests/551 passed (+5 new), 0 failures.

Follow-ups (not in this PR)

  • R-2 (multi-role attribution): a multi-contract person (e.g. bob-pm sharing github: bob-arch-e2e with bob-arch) can't be credited distinctly — /contribute @handle resolves by GitHub login, so credit lands on the first contract. Manual attribution by EDPA id would close this. (/contribute itself is verified working end-to-end: a directive in a commit body credits a non-committer with derived hours.)
  • E2E harness only: parallel work-creation can collide on shared synthetic file paths (add/add conflicts) — namespace paths per item if the parallel sim is kept.

🤖 Generated with Claude Code

jurby and others added 2 commits May 31, 2026 13:58
…add ANSI-safe for non-TTY

Two fixes surfaced by the full real-GitHub E2E re-validation (2 PI x 5 iterations):

1. edpa_iteration_close wrote only the nested iteration.status; pi_close /
   reports / board / the e2e verifier read the top-level `status` key, so an
   iteration closed via the MCP tool was not seen as closed by those consumers.
   Now sets both keys. test_iteration_close_sets_status extended.

2. backlog.py emitted ANSI color codes even when stdout is piped/captured,
   corrupting machine parsing of the allocated item ID. color()/bold() now
   honor NO_COLOR and non-TTY via _use_color(). Tests added.

Full suite: 548 passed (+2), 0 failures. See docs/v2/e2e-real-github-run-2026-05-31.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
velocity.py and pi_close.py read planning.planned_sp / delivery.delivered_sp
from iteration YAMLs, which item-driven backlogs don't populate (SP live on
Story/Defect `js`), so velocity reported 0 and PI predictability None. New
helper _sp_rollup.iteration_sp derives planned_sp (sum of js per iteration) and
delivered_sp (Done only) from the backlog; both scripts fall back to it when
explicit iteration SP is absent. Verified on the E2E sandbox: velocity avg 9.3,
PI predictability 100%. Tests in test_sp_rollup.py.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jurby jurby changed the title fix(v2): iteration close lifecycle status key + ANSI-safe backlog.py add fix(v2): E2E findings — iteration close status key, ANSI-safe CLI, SP rollup May 31, 2026
… proposal

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jurby jurby merged commit a8ca3bd into main May 31, 2026
1 check failed
@jurby jurby deleted the fix/v2-e2e-iteration-status-and-cli-color branch May 31, 2026 19:10
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.

1 participant