Skip to content

P266: close installed merges once without a second record - #2004

Closed
trissim wants to merge 0 commit into
mainfrom
fix/installed-merge-closes-order
Closed

trissim wants to merge 0 commit into
mainfrom
fix/installed-merge-closes-order

Conversation

@trissim

@trissim trissim commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1997. P266 corrects #2004 under direct commander order 3233.

Removed decisions

  • Deleted the rejecting ProblemOrder.merged() base method. merged() is declared only on CheckedProblemOrder; reconciliation selects that capability once by type before querying PRs.
  • Deleted the forwarding MergedProgress.close() method. The existing DoneTodoState.closed() owns the row transition.
  • Removed the extra retained CommanderConfig and derived-name property. The existing Commander receives the declared repositories for each observation.
  • Repo.contains() recognizes Git's 0/1 ancestry outcomes; other failures raise. No Git failure is caught and reclassified as False.

Repeat reads use the existing record, not a cache

The canonical MergedProblemOrder records the full merge SHA and retains its original checked order. Closure sets Done and clears assignment in the same revision-checked write. TodoStore.held_for_commander selects only open, assigned rows. A subsequent observation therefore never sends that closed order back to GitHub or Git. No lru_cache, module seen-SHA dictionary, throttle, auxiliary store, or negative-result cache exists.

The store makes the positive ancestry observation before taking its write lock and only commits the revision it observed. An uninstalled merge remains open; a later observation can close it after installation. Ordinary held checks and order sends retain database-only reads; the two production observation callers are board and overdue.

Verification: 381d760

11 focused checks passed, including pending/delivered originals, actual Git ancestry, exact retained original and full SHA, one-revision closure, a second read that cannot launch any subprocess, stale revision protection, checked-only selection, real Git failure propagation, board/overdue omission, and uninstalled-merge reporting.

Both unchanged ratchets ran with the existing exactly pinned audit source, borrowed read-only; that borrower has ended:

  • src exit 1: only SourceLines 10 -> 70 (net +60, down from +65). No other key increases; introduced_lines is empty.
  • tools exit 0: no increased keys; introduced_lines is empty.

No source budget, baseline change, suppression, dependency installation or checker edit was made.

The refactor-audit Package census covers 381 production modules and 38 tools modules at the before and after commits, with zero parse omissions. Dynamic attribute receivers remain syntactically ambiguous and were read semantically; AST is not claimed as behavioral proof. ownership.txt retains declarations and consumers.

Actual two-pass overdue strace

An isolated root contains the seven unmodified retained live Todo records and identities restored stopped by Core. The actual overdue entrypoint queried actual GitHub and configured installed-checkout HEADs, then closed P202, P223, P232, P250, P253, P259 and P261 exactly once. It recorded their full SHAs; both passes printed none of those IDs. Original live orders remain open and unchanged; no native input or completion call was sent.

Command: strace -f -e trace=execve -s 2048 -o execve.trace <shared-python> two_ticks.py.

Only the watch's wait is shortened. /usr/bin/true markers delimit the real ticks in the execve trace; no Comms object, progress result, ancestry answer or merge action is replaced.

First pass: 7 successful Git execs. Second pass: 0 Git exec attempts, not merely zero successful calls:

2642784 execve("/usr/bin/true", ["/usr/bin/true", "P266_SECOND_OVERDUE_PASS"], 0x7ffe6927f170 /* 109 vars */) = 0
2642797 execve("/usr/bin/true", ["/usr/bin/true", "P266_END_OVERDUE_PASSES"], 0x7ffe6927f170 /* 109 vars */) = 0

P266_RETAINED_STRACE_EXIT=0; actual CLI exit 0. Startup has one package-stamp Git call before the first-pass marker. A real Core CleanHunt records the source inspection performed for this task, so unrelated due-hunt churn discovery is not due during these passes. This is not a claim that an overdue hunt's separate Git scan disappeared.

Narrow reading of the order: consecutive passes mean two ticks of the same overdue process, not two fresh Python startups. Installed-merge repeat processing is measured with the unrelated hunt satisfied; no production timer or cache was added.

Delivery boundary and storage

The requested canonical agent-comms-commander order pr P266 ... command was attempted. It correctly found the P266 checkout and refused because #2004 already exists. This existing PR body is updated through Core's pull_request_body, retaining P266's actual immutable order reference.

The recorded Check of origin/main still counts 1 awaiting record site because this branch is not merged; HEAD contains zero. Nothing is merged or installed by this work. Post-install live-bus acceptance is not claimed.

Owned evidence: /home/ts/.cache/agent-scratch/pi-cn-phase3/p266/ (tests.log, ratchet JSON/exits, ownership.txt, strace.log, and complete retained-two-ticks/execve.trace). Combined owned scratch/checkouts are about 371 MB, below 3 GB. The older detached P254 checkout is retained because PIDs 2374563, 2376066 and 2376067 still hold it as cwd; it must be released before removing P266 in creation order. No active process was stopped for cleanup.

Assumed: configured repository checkouts are the installed checkouts; repeat passes are ticks of one watcher with an actual fresh hunt, not repeated startup or an unrelated overdue-hunt scan.

Agent-Comms-Order: 63ed167ab593

@trissim trissim changed the title Close installed merged orders without a second commander record P266: close installed merges once without a second record Oct 19, 2026
@trissim
trissim force-pushed the fix/installed-merge-closes-order branch from 381d760 to 0adf40e Compare October 19, 2026 22:41
@trissim trissim mentioned this pull request Oct 19, 2026
trissim added a commit that referenced this pull request Oct 19, 2026
@trissim trissim closed this Oct 19, 2026
@trissim
trissim force-pushed the fix/installed-merge-closes-order branch from 79c6bcb to 2de6931 Compare October 19, 2026 22:56
@trissim
trissim deleted the fix/installed-merge-closes-order branch October 20, 2026 01:58
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.

Close installed merged orders from their owned merge state

1 participant