Repository navigation
fix(bin): re-check open to-do items each intake pass and fix page ranking and coverage - #273
Merged
Merged
Conversation
… ask, widen coverage, fix page bugs The 30-minute pass now lists every open to-do item with a source to re-read and reports the ones it skipped; ranking derives the partner tier from the source and orders by when the ask was made, with Firstmate tooling approvals in their own fold; Slack DM, calendar and Asana re-list reads join the claim and a HubSpot pass must refresh its tickets and due re-scan; small page bugs (own closures, UTC ticket times, unit lists, title-less items, rotting relative times, undated waits, device updates) are fixed.
… tooling fold, waits
…ebase Upstream's team announcements (kind update) are never asks, but they carry a source ref, so the pass's recheck list handed each one out for re-reading and complete counted it as not re-read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lear stale recheck
…e --waiting reasons
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
Build the to-do page fixes from the critical review of 8 Oct 2026 (full review at data/todo-page-recheck-fixes/review-report.md in the Firstmate home; read sections 3, 4 and 5). Lars approved the build: the page is "not working super well yet". The review found:
The approved scope is the review's fixes 1, 3, 4 and 5 (section 5).
Substance of those referenced review fixes (section 5):
Fix 1 - the 30-minute pass is an intake, not a re-check: make fm-channel-intake.sh claim print a recheck: line for every open or waiting to-do item that has a source reference (ticket id, Slack channel and ts, Gmail thread), the same way it prints thread: lines; make the pass call fm-todo.sh sweep-start, then verify or close for each listed item; have complete report how many listed items were not re-read; change the lars-sent-replies coverage from "Nothing is observed onto the to-do page" to "close the matching open item with the sent message as evidence"; add two closing rules to daily-todo-freshness: a reply posted in the parent channel after the mention counts as a reply, and an internal hand-over never closes a partner-facing ask while the ticket still says Waiting on us.
Fix 3 - ranking uses the wrong signals: in fm-todo-compose.py sort inside a tier by when the ask was made, oldest first, not by last check; set the partner flag from the source (a HubSpot ticket with a partner or customer contact, a Slack mention naming a system id or customer site, an Asana Partner RMA, or a colleague relaying a partner question); put items whose source is Firstmate tooling in their own fold below partner and customer asks; the YellowBeard records are handled with mine (tracked, not surfaced), which already exists as a page command.
Fix 4 - coverage holes between morning sweeps: add a slack-lars-dms source that reads the known DM ids directly each pass; add a calendar-lars source for invites still needing a response and prep asks for the next two working days; give the Asana source a daily full re-list of incomplete tasks assigned to Lars; make complete for a hubspot-tickets source refuse unless tickets ran in the same pass; make the re-scan part of that same pass; make the coverage fold name what is not read.
Fix 5 - small page bugs: count actor "Lars" as "by you"; print ticket times in CEST; stop passing "systems" as the unit list; drop the -1.0 broken-sensor value from the freeze count; refuse a title-less observe; strip "today", "yesterday" and "N DAYS" from stored titles and compute ages at render time; refuse a resolve --waiting whose reason has no date when the wait is on Lars; keep device updates off the page.
Fix 2 (held decisions) is not part of this build.
What Changed
The 30-minute pass now re-checks open items.
fm-channel-intake.sh claimlists arecheck:line for every open or waiting to-do item that has an external source reference. The list comes from the newfm-todo.sh recheck. Eachcompletereports how many listed items were not re-read, andfm-todo.sh sweep-start --passrecords the pass so unread items show as not re-checked.Coverage between morning sweeps is wider and enforced. The claim hands out three more reads:
slack-dmsread, by conversation idcalendarwindow for the next two working days (unanswered invites and prep asks)--relistedA hubspot-tickets
completeis refused without--rescannedwhen a re-scan is due. The coverage fold names which sources are not read between morning sweeps.Ranking and small page fixes:
fm-todo-compose.py):observe --partner, a system id, or an Asana RMA.observenow refuses:-1.0broken-sensor reading in a freeze countresolve --waitingis refused when the reason has neither a date nor a hand-over to someone other than the captain.daily-todo-freshnessgains the new closing rules and the pass re-check procedure. The channel-intake docs and tests are updated to match.🤖 Generated with Claude Code
Risk Assessment
Testing
I ran the three targeted test files (fm-todo, fm-channel-intake, fm-todo-render), which drive the CLIs end-to-end in fixture homes; all passed. I then ran the real CLIs by hand in a disposable lab home on the real clock: observe refusals, a morning sweep and render, a claim with its re-check lines and the per-source reads for DMs, calendar, Asana and HubSpot, an intake pass with one verify and one close by Lars, the miss count on
complete, the HubSpotcompleterefusals,mine, and accepted and refusedresolve --waitingreasons. I captured the transcript, both rendered HTML pages and PNG screenshots. Every scenario I could drive passed. Two scenarios are untested because they live only in the private Firstmate home or in the agent skill's instructions, not in code this change can run. I removed the lab home and scratch files, and the worktree is clean.sweep-start --pass, one verify and one close by Lars,completereports the listed items the pass did not re-read; the re-read row shows as current and the skipped rows show 'not re-checked'minetakes the YellowBeard line out of the ranked list into 'Yours, tracked but not surfaced'--units systems, and a freezing list that includes a -1.0 broken-sensor reading, and accepts a real freezing snapshotEvidence: Live CLI transcript (lab home, real clock)
Source: Live CLI transcript (lab home, real clock)
Evidence: Live drive script
Source: Live drive script
Evidence: fm-todo test log
Source: fm-todo test log
Evidence: fm-channel-intake test log
Source: fm-channel-intake test log
Evidence: fm-todo-render test log
Source: fm-todo-render test log
Evidence: Pass re-check and miss count
Pipeline
Updates from git push no-mistakes
... (11 earlier update rounds omitted to keep the PR body within GitHub's 65536-char limit; full history is in the run log.)
🔧 Fix applied.
1 info still open:
docs/channel-intake.md:50- Several required intent items live only in the private, gitignored Firstmate-home inventory and config, so this diff cannot contain them: enrolling theslack-lars-dms(kindslack-dms) andcalendar-lars(kindcalendar) sources, changing thelars-sent-repliescoverage sentence to 'close the matching open item with the sent message as evidence', settingcaptain_namesin config/channel-intake so 'Lars' closures count as 'by you', and marking the YellowBeard recordsmine. The repo side supports all of these; the private changes still have to be applied in the home.✅ **Test** - passed
✅ No issues found.
sweep-start --pass, one verify and one close by Lars,completereports the listed items the pass did not re-read; the re-read row shows as current and the skipped rows show 'not re-checked'minetakes the YellowBeard line out of the ranked list into 'Yours, tracked but not surfaced'--units systems, and a freezing list that includes a -1.0 broken-sensor reading, and accepts a real freezing snapshotbash tests/fm-todo.test.sh(28 ok, exit 0)bash tests/fm-channel-intake.test.sh(40 ok, exit 0)bash tests/fm-todo-render.test.sh(21 ok, exit 0)Live lab drive (live-drive.sh):bin/fm-lab-home.sh create $LAB, then with FM_HOME=$LAB on the real clock:fm-channel-intake.sh observe(refusals: no title,--units systems, a -1.0 reading; then seeded asks with--source-epochand--partner),tickets --owner captainwith a UTClast_in,fm-todo.sh sweep-start,fm-todo-render.sh render,fm-channel-intake.sh claim,fm-todo.sh sweep-start --pass,verify,close --actor Lars,fm-channel-intake.sh complete --source C_BRIEFLive:complete --source H_TICKETSwith no tickets table, then with the table but no--rescanned, then with both;complete --source A_REQ --relisted, then a re-claimLive:fm-todo.sh command --item <YellowBeard> mine, then a re-renderLive:resolve --waitingwith the reasons 'later', 'Lars will do it later', 'He will reply later', 'Everything will settle later', 'Whoever will pick it up', 'Mine will wait', 'waiting on you' (all refused), then 'Queco will send the logs' and 'waiting on Lars until 14 Oct' (both accepted)Pulled the page's text out of the rendered HTML and checked the Needs you order, folds, closed-by-you line, ticket time, coverage fold, ages and the absence of device updatesqlmanage -tscreenshots of both rendered pages; lab home removed withrm -rfafterwards✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.