Skip to content

P310: retain heartbeat finish predictions and compare actual closure - #2120

Closed
trissim wants to merge 19 commits into
mainfrom
fix/order-prediction
Closed

trissim wants to merge 19 commits into
mainfrom
fix/order-prediction

Conversation

@trissim

@trissim trissim commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

P310 checkpoint — NOT READY

Head: e709a6753644d02c9bad2b7b0919e5ea6f720f4f.
Rebased onto reviewed main 273bae7601ea3e3290641a407b74e51e4982d2e8; includes the shared family-A lifecycle dependency checkpoints. Diff against that base: 20 files, +985/-115. First push met 00:05; ready-by-00:25 was missed. Nothing merged or installed.

Implemented

  • Todo owns one predicted_finish field containing unreviewed/reviewed/finished states. Closure captures actual time without dropping the reviewed forecast.
  • Heartbeat reviews derive estimates from existing OrderProgress count trends, including when notification suppression applies.
  • Native TodoList and the generated board expose retained prediction versus actual finish and signed error; the closed tail is bounded and sorted by recorded closure.
  • Row 27 declares its comparison once and uses shared LifecycleRun, actual Git/check receipts and native tool owners. No copied harness or verify() forwarder.
  • A declared one-time Todo column carry obtains its default from FieldCodec, not a second format authority.
  • Rebase follow-ups migrate the shared lifecycle away from main's deleted hhmm helper and removed cli configuration field; neither was restored.

Current-head verification

  • Background bounded pytest, shared interpreter, PYTHONPATH=src, timeout 300, -X faulthandler, -n0: tests/test_order_prediction.py tests/test_commander_heartbeat.py — 5 passed, one existing unknown-pytest-timeout-option warning.
  • Actual configured-bus-copy row 27: passed, five native owner calls, 8/8 checks: two numeric measured reviews, replacement, last forecast retained at immediate close, actual close, closed native row, board comparison, signed error and heartbeat display. This is copied-bus/native-owner acceptance, not installed UI/process-transport acceptance.
  • Separate tools and src ratchets against the pinned reviewed main above: both exit 0, no increased/introduced findings. Baseline is pinned because other mergers advance the shared origin/main ref during runs.
  • grep -rl predicted_finish src/agent_comms: exactly two files, todos.py and commander_heartbeat.py.
  • Pre-rebase broad focused run: 70 passed/17 failed; all 17 failure IDs independently reproduced on the then-current main baseline ef4cc72. That is not a current-head broad-suite pass. The first post-rebase broad attempt failed collection on the removed helper; current focused acceptance above confirms its repair.

Concrete blockers / unfinished work

  1. A later heartbeat with unavailable progress can replace a valid numeric forecast with an unavailable one. The current real-owner reproducer returns exit 1: NoCommitProgress(finish=previous).forecast(...) != previous. The attempted Todo retention correction returned UNKNOWN; it was not replayed, and the backend goal remains blocked. Current source still has the defect. Disposition of that attempt is required before continuing the correction.
  2. Commander page is not on main. Open Commander board with derived commit cadence #1937 still imports the old cadence types and uses progress.state, not this forecast view. Existing page owner pi-cn-phase6 / integration owner claude-code were given the precise consumer gap. No competing page implementation or changes in their checkout.
  3. Merger still owes fresh-environment carry rehearsal and installed affected-path acceptance. This PR does not claim either.

Ownership evidence

Before/after evidence is retained under /home/ts/.cache/agent-scratch/pi-prediction/: ownership-before.txt, overlay-before.txt, overlay-after.txt, clock-consumers-before.txt and clock-consumers-after.txt. Prediction calculation remains on DistanceTrend/OrderProgress; retained outcome is owned by Todo/FinishPrediction; consumers render OrderProgress.line. SQL condition encoding is delegated to Todo, not hand-written family tags.

NRA's existing Python-3.12 environment could not parse tools.py's PEP-696 default type parameter. The project-Python-3.14 overlay/ratchets parsed the production source; do not treat the earlier NRA enumeration as complete static binding proof. Runtime declared-family discovery remains dynamic.

Assumed

  • Only measured, decreasing count trends justify a numeric finish; deadlines or commit cadence do not.
  • Existing owner trend timestamps define the projection; a stale projection may already be in the past and is not replaced by a fabricated future ETA.
  • Unknown/flat evidence must not invent an estimate; preserving the last actual prediction across unavailable observations is the unfinished retention correction above.
  • Other reported branch holds remain in force. No backup pruning, competing withdrawal repair, merge or installation was performed here.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 03:54

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.

Use measured distance trends only; missing or flat counts remain explicitly unknown. Heartbeat reviews persist before their notification suppression. Board and native progress read the retained forecast, including a bounded closed-order tail. Add the carry through the existing declaration-default column owner.
…cycle

Row27 declares its comparison once on ParityRow. Real native calls, actual Git check receipts, two heartbeat reviews and installed-evidence closing prove the last forecast against its outcome. Keep unknown forecasts honest and reset reviewed data when immutable order identity changes.
@trissim
trissim force-pushed the fix/order-prediction branch from 9818cfd to f87939f Compare October 20, 2026 04:15
@trissim
trissim marked this pull request as draft October 20, 2026 04:30
@trissim

trissim commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Sent back by the desktop merger. This branch is 101 commits behind main, and it calls helpers main deleted: commander.order.deadline and hhmm (main uses RecordedEventTime(time.time()).at_clock(due) and .clock()). Its commander_parity/lifecycle.py conflicts with the sibling parity PRs #2118, #2120 and #2127, which each grow their own copy. Rebuild on current main by 00:46, with one shared lifecycle.py that all three extend, and drop invoke_command's unused cwd and env=None defaults (NoneAbsence at lifecycle.py:199-200). Then reply here for a merge.

@trissim

trissim commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Closing: the gaming commander confirmed at 04:2x this is not live work. Branch kept.

@trissim trissim closed this Oct 20, 2026
@trissim
trissim deleted the fix/order-prediction branch October 20, 2026 14:30
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