fix(v2): E2E findings — iteration close status key, ANSI-safe CLI, SP rollup#48
Merged
Merged
Conversation
…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>
… proposal Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_closeset only the nestediteration.status: closed, butpi_close.py(line 105), reports, the board lifecycle view, and the e2e verifier (12_verify_backlog.py) read the top-levelstatus. 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_statusextended to assert the top-level key.2.
backlog.py addleaked ANSI codes into machine-readable outputThe 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 honorNO_COLORand non-TTY output via a_use_color()guard. Tests added.3. Iteration/PI story-point rollup wasn't derived from items
velocity.pyandpi_close.pyreadplanning.planned_sp/delivery.delivered_spfrom iteration YAMLs, which item-driven backlogs don't populate (SP live on Story/Defectjs) → velocity 0, PI predictabilityNone. New helper_sp_rollup.iteration_spderivesplanned_sp(Σjsper iteration) anddelivered_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 intest_sp_rollup.py.Testing
pytest -m "not e2e" tests/→ 551 passed (+5 new), 0 failures.Follow-ups (not in this PR)
bob-pmsharinggithub: bob-arch-e2ewithbob-arch) can't be credited distinctly —/contribute @handleresolves by GitHub login, so credit lands on the first contract. Manual attribution by EDPAidwould close this. (/contributeitself is verified working end-to-end: a directive in a commit body credits a non-committer with derived hours.)🤖 Generated with Claude Code