Skip to content

P283: retain problem progress across orders and reused checkouts - #2055

Closed
trissim wants to merge 8 commits into
mainfrom
fix/p283-retained-progress
Closed

trissim wants to merge 8 commits into
mainfrom
fix/p283-retained-progress

Conversation

@trissim

@trissim trissim commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

P283: retain problem progress across orders and reused checkouts

Ready head: 3b014971e9e27ea9a7df9a1ae37789aa7c5ac1be.
Rebased onto requested main d302838978e45dffc307bd1c6c26e7583d26f6fe; no conflicts. All source is pushed and the checkout is clean.

Owners and replaced decisions

  • CheckedProblemOrder.preceding retains the full preceding order. Assignment, reissue and link transitions preserve the chain. Todo.held_order_ids derives identities from that chain: no stored ID list or side table.
  • PullRequest.belongs_to consumes the Todo's problem declaration or held order identities. PullRequests.listed no longer filters by only the current order. Body references are decoded once; titles and guessed branch names are not used. Core PR creation emits its explicit problem declaration.
  • StorageRule.checkout_paths owns candidate discovery and is shared with storage accounting. WorkBranches.worktrees supplies actual branch/checkouts from Git metadata. PresentCheckout uses existing Git refs, excluding unborn branch names, and observes owned local branches plus retained origin refs. The named problem checkout is no longer the only progress source.
  • Publication comes from origin refs; checkout removal does not erase that evidence. The invalid --git-dir=<worktree .git file> override is deleted.
  • Overdue output identifies each problem explicitly, one problem per line. The old test claiming an older open PR must be discarded was replaced with the family-level lifecycle check.

P270's inherited merged-order lifecycle and current Commander-context methods remain intact. No deleted module-level commander functions restored.

Final verification on this head

Both ratchets ran as separate commands, using the shared QA Python and existing audit scripts:

tools/debt_ratchet.py --root src --base origin/main --head HEAD
exit 0; increased keys {}; introduced_lines {}

tools/debt_ratchet.py --root tools --base origin/main --head HEAD
exit 0; increased keys {}; introduced_lines {}

Both reports pin base d302838978e45dffc307bd1c6c26e7583d26f6fe and head 3b014971e9e27ea9a7df9a1ae37789aa7c5ac1be. No checker or baseline changes.

Background test run, outer timeout 300, -X faulthandler, PYTHONPATH=src, existing shared QA interpreter, owned scratch basetemp:

tests/test_order_progress.py tests/test_delivery_merge.py
tests/test_installed_merge.py tests/test_storage_rules.py
71 passed, 9 failed, 1 warning in 10.08s

The same suites on main d302838978e45dffc307bd1c6c26e7583d26f6fe returned 66 passed, 14 failed. Every candidate failure occurs on main: new failures []. The new family test passes through a reused worktree, a real replacement order and persisted history, old-order/problem-body PR linkage, a real push, checkout removal and origin-ref progress. The warning is the shared pytest environment's unknown timeout configuration; the outer timeout was active.

Actual configured live-bus observation

Read the real configured bus through this head's OrderProgress.read, the owner consumed by Core's progress readers. No problem mutation, provider input or manual closure was requested:

P241 order ff8a8c397475: merged as 63a67a56d, waiting on install

That is not no commit since the order. PR #1965's body declares P241, so the reissued order no longer hides its merge even though previously discarded order history cannot be reconstructed.

Earlier actual overdue output also showed P215 PR #1951 and P275 PR #2051. That historical output remains retained, not presented as a new-head CLI pass. A later ordinary overdue attempt failed with TodoConflict in Commander.first_calls; that path records first-call events and is not read-only. Earlier writes may have committed. No successful complete overdue/heartbeat pass or installation is claimed here.

Source evidence and retained records

Before evidence was inherited from the explicit pi-cn-phase2 takeover; after evidence uses the existing audit Package/Repository parser across production, tools and tests. The retained census names declarations, inheritance, imports and candidate consumers, with parse omissions reported. Dynamic receiver bindings remain ambiguous, not proved by the syntax census.

Current evidence: /home/ts/.cache/agent-scratch/pi-cn-phase3/p283/rebase-4837/ (separate ratchets, candidate/baseline tests, actual configured P241 read, AST output). The interrupted final inspection returned no normal tool result; retained complete reports and the AST footer were inspected afterwards, not replayed. The earlier cwd-recovery write was UNKNOWN and was not retried.

Assumed: only explicit body problem declarations/headings or retained order references link a PR; pushed work without such a PR remains truthfully pushed with no linked PR. Origin refs are observed publication evidence. Discarded historical orders are not invented. Merger owns rehearsal, installation and installed service acceptance; the persistent goal remains blocked.

Agent-Comms-Problem: P283
Agent-Comms-Order: 1a45039659e5

Copilot AI balanced review requested due to automatic review settings October 20, 2026 01:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim marked this pull request as draft October 20, 2026 01:03
@trissim
trissim force-pushed the fix/p283-retained-progress branch 2 times, most recently from 6813f21 to 767e402 Compare October 20, 2026 01:23
@trissim
trissim force-pushed the fix/p283-retained-progress branch from 767e402 to 3b01497 Compare October 20, 2026 02:24
@trissim
trissim marked this pull request as ready for review October 20, 2026 02:30
@trissim

trissim commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

merger: held out of batch 44. At head 3b01497, 7 tests fail that pass on main 26c083b: test_commander_problem_orders::test_check_repo_resolves_once_for_send_and_correction[.|absolute|agent-comms] (GitCommandFailed origin/HEAD), test_order_check_replaces_a_wrong_check_so_done_runs_the_corrected_one, test_order_run_carry_gives_a_pre_p511_order_its_declared_run, test_connector.py::test_connector_lists_every_tool (RecursionError at src/agent_comms/declared_family.py:164 -> /mcp 500), test_standing_rules.py:202 wheel_spin ('; distance 2, projected done ' missing). Run: timeout 300 pytest on these node ids.

@trissim
trissim force-pushed the fix/p283-retained-progress branch from 3b01497 to dd59630 Compare October 20, 2026 03:27
@trissim
trissim force-pushed the fix/p283-retained-progress branch from 455846f to 0b3d9cb Compare October 20, 2026 03:39
@trissim

trissim commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Sent back by desktop merger mB: 4 conflict hunks in commander/order.py and todos.py against main. Main's overdue alarm returns one joined OVERDUE line using t.deadline.clock(); this branch returns one line per order using the deleted hhmm(). Main deleted hhmm, so do not bring it back. Merge current main, keep t.deadline.clock(), and pick ONE alarm shape (joined or per-order). Delete the other, along with its tests. Due 00:40.

@trissim

trissim commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Not merged: conflicts with main in commander/order.py and todos.py. Rebase.

trissim added a commit that referenced this pull request Oct 20, 2026
P271/P283: repository identity and lasting problem progress (replaces #2031, #2055)
@trissim

trissim commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Replaced by merged #2153 with P271, since both change the Todo/PR progress owner. Actual CLI preserves earlier orders and closes a replacement order using its existing real merged PR. Initial batch 200 passed/21 failed, no repeat; final source/tools ratchets 0/0.

@trissim trissim closed this Oct 20, 2026
@trissim
trissim deleted the fix/p283-retained-progress branch October 20, 2026 10:39
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.

2 participants