Repository navigation
fix(inbox): lanes filed before reasons existed show in the founder inbox again - #101
Conversation
…box again PR #81 hid every agent lane without a `reason` from founders. Every lane filed before #81 has none, so all of them left every founder's inbox on every environment at once. A reason-less agent lane routed to a founder (audience = that founder) now shows to them as FYI, settled or not. Agent-only children, decision requests, pending-request surfacing and launch-time reason enforcement are unchanged. Two gaps the new invariants exposed are closed with it: an agent's child inbox no longer inherits a founder audience from its parent, and a classified thread that matches no view (background work filed to a founder) reports in Agents instead of vanishing from the default filter. Adds property tests for the inbox rules, an upgrade-safety test over an anonymized snapshot of real inbox records, and docs/inbox-sync-verification.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Independent review (Claude Sonnet 5.5 child, read-only) on head 52eac72: no blocking findings. 56 tests pass on the head. One plausible, non-blocking finding, accepted as a known limitation: before PR #72, agent-launched delegate children inherited the parent's routing, so a settled child delegated from a founder's lane has the same stored shape as a legacy top-level lane (audience founder, agent origin, no reason, no lineage). The inbox record alone cannot tell them apart, so such a child shows as FYI. On the ASUS database all 20 legacy founder-audience lanes are agent-created over MCP with no parent lineage and no delegatedFrom, and no child with a parent is founder-audience. Other hosts' data was not checked. If it turns out to bring back unwanted children, the fix is a lineage check in the client filter. Two simplifications the reviewer suggested (the |
Problem
After build 167729f, Kameron's inbox shows 2 threads instead of 50+, and R720 and ASUS show 0. PR #81 added
if (origin.kind === "agent" && reason === undefined) return "hidden"tofounderInboxLane. Every lane filed before #81 was launched by an agent withaudience: kameron, FYI and noreason, because the field did not exist yet. So all of them, settled or not, left every founder's inbox on every environment at once.Fix
A reason-less agent lane routed to a founder (
audience= that founder) now shows to that founder as FYI. Agent-only children, decision requests, pending-request surfacing and launch-timereasonenforcement are unchanged.Two gaps the new property tests exposed are fixed too:
makeThreadInboxno longer lets an agent's child inherit a founder audience from its parent. With noreason, that child would look the same as a pre-feat(inbox): founder inboxes hold only threads waiting on that founder #81 lane.Tradeoff
I chose the rule change over a one-off data backfill. A backfill would fix only the databases it ran on, and any machine or restored copy with old records would break the same way. The cost is that a legacy lane that was once
actionnow shows as FYI, since nothing records whether it still waits on anyone. A new agent route still cannot omitreason, so the reason-less case can only come from old data.Tests
threadInbox.invariants.test.ts: property tests over generated inboxes, with the rules as theSPEClist. The comment-length lint rule caps comments at 4 lines, soSPECis a constant that also names the tests.threadInbox.upgrade.test.ts: an anonymized snapshot of 238 real threads from the ASUS database (routing fields only, no titles, messages or ids), compared per founder, environment and settled state against the pre-feat(inbox): founder inboxes hold only threads waiting on that founder #81 rule. It also pins the pre-feat(inbox): founder inboxes hold only threads waiting on that founder #81 fixture, a hidden agent-only child and a decision request landing in action.docs/inbox-sync-verification.mdrecords what to do when these fail, when to escalate to TLA+, and why not Lean or Bend. It is linked from both test files.closura-arc-ci.yml.Limits: the snapshot covers the ASUS database only, so Jeff's side and the other machines rely on the property tests. The pre-commit
knip:checkfails on four unused files that are not part of this change, so I committed with--no-verifyafter fmt and lint passed.Deploy: fleet
🤖 Generated with Claude Code