Repository navigation
feat: compact held backlog summaries - #18
Merged
Merged
Conversation
…turn brief A context re-emit follows a startup that already listed every held row with its full reason, and the away return brief printed every held reason too. Both now print each held item as one line (id, title, hold kind, until date) with the count and the command that prints every full reason. In-flight and blocked rows, open decisions, and the first startup listing stay complete. tasks-axi lists a hold whose until date has arrived as ready work, so no due hold is hidden. On a 44-held-item fixture the re-emit drops from 110757 to 91698 bytes; its held group drops from 24653 to 5576 bytes.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Intent
Regarding your wastes list, I would say go for all three. Since we're using a custom fork of firstmate, we need to be mindful of the upstream changes, especially when inefficiencies are patched and try to stay as current as possible. I do not want to optimize for the sake of optimization, rather I would like to see tangible refinements.
Context: the "wastes list" is three costs seen at the firstmate primary session on 2026-11-12: (1) idle supervision cycle-boundary wake-ups reach the primary, which re-reads its whole context to find nothing queued; (2) after a no-mistakes worker commits, the primary is woken only to tell it to start its validation run; (3) the context re-emit digest after a compaction is about 125 KB and the away return brief prints every held backlog item in full. The fork was synced with upstream on 2026-11-12 (Profreshor/firstmate PR 16); the sync report's section "The three wastes" found all three still open for a Claude-run primary and names the exact code owners: for (1), the Claude park boundary in bin/fm-supervision-host.sh (boundary_exit, default 27000 seconds under the 28800-second Stop hook registration), delivered as an actionable host close by bin/fm-claude-stop-autoarm.sh, with upstream's Codex-only silent park (c61646f) as the only existing silent boundary; for (2), the first committed done: handoff in fm_dod_block in bin/fm-dod-lib.sh; for (3), bin/fm-session-start.sh --reemit, which still emits the fleet, every task's metadata and bounded status tail, the full preference and learning files, and a compact backlog view that keeps every held, in-flight, and blocked row with its full reason, and bin/fm-afk-return.sh, which renders the entire held listing with hold reasons.
What Changed
fm-session-start --reemit; retain full held details during normal startup.Re-emit size
Measured on a synthetic fixture home with real tasks-axi 0.2.6: 44 held items, each with a 320-character reason and a 95-character title, plus 6 in flight, 4 blocked, 20 ready, and about 71 KB of preference and learning filler.
The before figure comes from the pre-change scripts (
git archiveof the base), the after figure from this branch, both withfm-session-start.sh --reemit.--reemitThe operating home's own held listing (44 items, read-only) measured 23903 bytes in full form and 5672 bytes in the new form.
Most of what remains in that home's re-emit is its curated preference and learning files, which this change does not shorten.
Scope: this PR is only the held-list part of the third waste.
The second waste ships in a sibling PR, and the first waste was measured and moved to a separate diagnosis task.
No activation is needed: the change takes effect when the home updates to it.
Risk Assessment
✅ Low: The bounded held-list compaction is correctly shared by re-emit and AFK-return paths, the fixer-round helper is now zero-argument as required, and no material correctness, security, scope, or test-quality defect was substantiated.
Testing
In two disposable marked lab homes, I seeded real held tasks and drove the re-emit and away-return CLIs. Both rendered concise held rows plus the full-reasons command, while omitting a deliberately oversized sensitive reason; both labs were removed afterward.
Evidence: Live --reemit digest with a long held reason omitted
Source: Live --reemit digest with a long held reason omitted
Evidence: Live away-return brief with a long held reason omitted
Source: Live away-return brief with a long held reason omitted
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed ✅
bin/fm-session-start.sh:527- Intent conformance: the required goal says to “go for all three,” including (1) preventing the Claude 27,000-second park-boundary wake from reaching the primary (the stated owners arebin/fm-supervision-host.shandbin/fm-claude-stop-autoarm.sh) and (2) starting validation from the committedfm_dod_blockhandoff inbin/fm-dod-lib.sh. This range changes none of those owners; its changed re-emit path only compacts held rows. It also leaves the other named re-emit bulk (fleet, task metadata/status tails, and preference/learning files) unchanged. Confirm this is intentionally a partial delivery, or extend the change to the required three refinements.bin/fm-hold-reason-lib.sh:86- Simplification:fm_hold_compact_streamadds a configurable<full-reasons command>argument, but both callers pass the identical literal. No stated requirement needs this option; make the helper zero-argument (with the command fixed internally) to remove the speculative parameter.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
FM_HOME=<marked disposable lab> bin/fm-tasks-axi.sh add/hold ...FM_HOME=<marked disposable lab> bin/fm-session-start.sh --reemit --source codexFM_HOME=<marked disposable lab> bin/fm-afk-contract.sh enter ... && bin/fm-afk-return.sh beginOutput assertions confirming compact rows and absence of the deliberately oversized hold reasontests/fm-session-start.test.sh && tests/fm-afk-return.test.sh(started as targeted regression coverage; live artifacts above are the acceptance evidence)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.