Skip to content

P287: gate stale and unplanned commander work; reconcile merged deliveries - #2073

Merged
trissim merged 7 commits into
mainfrom
fix/p287-stale-order-gates
Oct 20, 2026
Merged

trissim merged 7 commits into
mainfrom
fix/p287-stale-order-gates

Conversation

@trissim

@trissim trissim commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

P287: reconciled onto the selected original-owned phase model

Head: 79fd1e24082be2dd58e1388c275eacb959ec739e.
Base: current main 6d4a1a065ee8a322302187fd2bafbdb696cfcece (batch44).

Rebase and conflict resolution

The UNKNOWN abort/interactive-rebase attempt was explicitly disposed of by commander5193 as not having happened; it was never rerun. I continued the observed retained rebase, removed the already-main todo entries, skipped its already-main first commit96fa86721, and kept exactly the six P287 commits. This resolved the tests/test_order_progress.py conflict by retaining main unchanged. After that retained rebase completed, the same six commits were rebased onto newly advanced main6d4a1a065.

Kept commits (original -> rebased):

Follow-up79fd1e240 preserves the independently reviewed WithdrawnProblemOrder.require_close fix: retiring an erroneous order is not an installed-work claim. It also makes the new gate consume order.phase rather than the stored serves field directly.

The superseded #2056/P291 commits89a93c647,c1c77de20,1bcd92536 were not replayed. No copied base phase field, alternate copy_as, phase carry module or duplicated phase state is introduced. Main's selected #2092 FoldedProblemOrder.phase derives from original.phase and remains intact; InstalledMergedProblemOrder and its evidence-preserving merge behavior also remain intact. PlanPhase.task/ready/current dependencies remain main's owner.

Behavior retained

StaleOrderGate cooperatively refuses new send/say/problem/strike when pending work is over30 minutes late, naming holder/deadline; due/withdraw/done/close/check/serve/drop remain available. The existing phase family owns readiness and typed unplanned refusal; an explicit8-word unplanned_reason is required when ready plan work exists. Capacity refusal names existing plan work and running free units. Delivered commit ancestry is observed through Repo and order/delivery polymorphism; operations cannot invent merge evidence. P271's existing reconciliation type filter is unchanged.

Verification at this exact head

Background external timeout300 + faulthandler:

  • tests/test_stale_order_gates.py
  • tests/test_commander_verbs.py
  • tests/test_commander_problem_orders.py
  • tests/test_installed_merge.py
  • tests/test_plan_phases.py

149 passed in101.97s, including withdrawal closure and the selected original-owned phase cases.

Separate background ratchets, both against6d4a1a065 and head79fd1e240:

  • tools/debt_ratchet.py --root tools --base origin/main --head HEAD: exit0, positive delta {}, introduced {}.
  • tools/debt_ratchet.py --root src --base origin/main --head HEAD: exit0, positive delta {}, introduced {}.

Candidate actual CLI refusal was attempted read-only with an absent order body. It was refused before any order record by the earlier overdue-owner-directive gate. That is NOT live proof of the new stale-order gate; no directives, answer links or original state were bypassed or invented. The real-store scenarios establish the candidate gate behavior, not installed acceptance.

AST source/integration evidence reuses ChangedSource; the current rebase census includes declarations, inheritance, fields and consumers of phase/original/serves/accepted/require_close. Dynamic codec and external Git/GitHub outcomes are confirmed by behavior checks, not claimed as AST proof. Evidence under owned scratch: p287-rebase-ast.txt, p287-5193-{tools,src}.log/.exit, p287-5193-tests.log/.exit, p287-5193-live-refusal.log.

Assumed:

  • The merger-selected original-owned phase model is authoritative, not the closed P291: inherit the plan phase across every problem-order state #2056 copy/carry model.
  • Merger owns rehearsal, installation and actual installed stale-gate acceptance.
  • Row33's timing and deadline-visibility repairs remain with P301; P287 changes neither Moving.seconds nor unit deadline presentation.

Agent-Comms-Order: 4d3875442f90

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

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:49
@trissim
trissim marked this pull request as ready for review October 20, 2026 01:59
@trissim
trissim marked this pull request as draft October 20, 2026 03:01
@trissim
trissim force-pushed the fix/p287-stale-order-gates branch from 0eafde9 to 79fd1e2 Compare October 20, 2026 03:13
@trissim
trissim marked this pull request as ready for review October 20, 2026 03:17
trissim added a commit that referenced this pull request Oct 20, 2026
@trissim
trissim merged commit f47aeb8 into main Oct 20, 2026
0 of 3 checks passed
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