You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 87f02db
Browse filesBrowse the repository at this point in the historyBrowse files
feat(pm): key the mailbox by seat — mailbox-open opens one per seat, fleet-roster reads it per seat row
One account routinely holds several seats, and a PR's events reach one
subscribed session at a time, so a mailbox keyed by login wakes one of
that account's seats and the others never hear.
mailbox-open.mjs: `--seat LANE#N` is required to open. The branch is
`mailbox/<login>/<seat-slug>`, the body opens `Mailbox-of: <seat> · <login>`,
and step ① refuses a second open mailbox for the same SEAT, whichever login
holds it; a second seat under one login opens freely. A legacy per-login
mailbox blocks nothing and is named so the account closes it. The header's
"a login holds one seat" argument is rewritten, not patched. `--close`,
the labels, the ledger exclusion and the `--head` cloud path are unchanged.
fleet-roster.mjs: `mailboxLogin` gives way to the opener's `mailboxOwner`,
read per seat row. A legacy per-login mailbox, or a seat no post carries,
is flagged under the table, never attributed to the login's seats. This
also aligns the reader with the writer: the opener wrote `To: <login>`
while the roster read `Mailbox-of:`, so every `--head` mailbox was
invisible to the mailbox column.
Claude-Session: https://claude.ai/code/session_016WV4d1d1pooSGzvbJymLKy
Co-authored-by: Claude <noreply@anthropic.com>
`${rows.length} seat posts · ${seated.length} seated · ${rows.filter((r)=>r.suspectedWall).length}${SUSPECTED_WALL} (seated, no \`Wall:\` line, last activity older than ${STALE_HOURS} h).`,
392
+
...(unassigned.length
393
+
? ['',`⚠️ ${unassigned.length} mailbox PR(s) on no seat row — never attributed to an account's seats; close a legacy one and open one per seat: ${unassigned.map((m)=>`${shortRef(m.ref)} (${[m.seat??m.slug,m.login].filter(Boolean).join(' · ')||'no owner'}: ${m.why})`).join(' · ')}.`]
394
+
: []),
368
395
'',
369
396
`Generated ${now} by \`node scripts/pm/fleet-roster.mjs --repos ${repos.join(',')}\` from:`,
'wall notes, closing refs, verdicts and mailboxes': 13,
526
-
'the fixture snapshot: rows for the three repos': 15,
527
-
'the rendered body: marker, columns, footer, determinism': 8,
554
+
'the fixture snapshot: rows for the three repos': 17,
555
+
'the rendered body: marker, columns, footer, determinism': 9,
528
556
'refusing to overwrite what is not the roster': 6,
529
-
'the CLI: fixture runs offline, usage errors are exit 2': 5,
557
+
'the CLI: fixture runs offline, usage errors are exit 2': 6,
530
558
'paging: a three-page read through the loop equals the slurped array': 4,
531
559
});
532
560
constSELF_TEST_BATTERY_FLOOR=8;
@@ -601,7 +629,7 @@ async function selfTest() {
601
629
t('⛔ an ACCEPT line ABOVE the heading is not the record\'s verdict',hasLandingVerdict([{body: 'ACCEPT\n\n## 席位核对\n\nREWORK · rework'}]),false);
602
630
t('the heading is H69\'s marker, imported not re-spelled: the three measured bodies read record alike',['## 席位核对\n\n**ACCEPT** · x','## 席位核对 — ACCEPT · x','## Contract review\n\n**VERDICT: PASS**'].map((b)=>`${seatRecord.SEAT_RECORD_MARKER.test(b)}/${hasLandingVerdict([{body: b}])}`),['true/true','true/true','false/true']);
603
631
t('the mailbox constants are the opener\'s own, imported not re-spelled',[MAILBOX_LABEL,LEDGER_EXCLUSION,MAILBOX_BRANCH_PREFIX],[mailboxOpen.MAILBOX_LABEL,mailboxOpen.LEDGER_EXCLUSION,mailboxOpen.MAILBOX_BRANCH_PREFIX]);
604
-
t('a mailbox is read by head, then by body line; no label ⇒ none',[mailboxLogin({labels: ['pm:mailbox'],head: {ref: 'mailbox/os-bill'}}),mailboxLogin({labels: ['pm:mailbox'],head: {ref: 'claude/x'},body: 'Mailbox-of: os-sales\n'}),mailboxLogin({labels: [],head: {ref: 'mailbox/os-bill'}})],['os-bill','os-sales',null]);
632
+
t('whose mailbox a pull is, and a seat row\'s slug, are the opener\'s own readings — imported, not re-spelled',[mailboxOwner===mailboxOpen.mailboxOwner,seatKey===mailboxOpen.seatKey,seatSlugOf({lane: 'domain:ui',seat: 4}),seatSlugOf({lane: 'triage',seat: 1})],[true,true,'ui-4','triage-1']);
605
633
606
634
battery('the fixture snapshot: rows for the three repos');
t('a PR with no verdict does not count',row(1353,'objectstack-ai/hotcrm').awaitingLanding,[]);
629
657
t('an unassigned ruling sits on the lane’s lowest seated seat',[row(6023).awaitingRuling,row(20163).awaitingRuling],[[{repo: 'objectstack-ai/objectstack',number: 25373}],[]]);
630
658
t('a ruling assigned to seat 2’s account sits on seat 2',row(19287).awaitingRuling,[{repo: 'objectstack-ai/objectstack',number: 25344}]);
631
-
t('the mailbox column is the account’s pm:mailbox PR',[row(6023).mailbox,row(20163).mailbox],[[{repo: 'objectstack-ai/objectstack',number: 25392}],[]]);
659
+
constos=(number)=>({repo: 'objectstack-ai/objectstack', number });
660
+
t('⭐ the mailbox column is the SEAT\'s pm:mailbox PR — by body line on a --head branch, by head slug, by both',[row(6023).mailbox,row(19287).mailbox,row(20163).mailbox],[[os(25392)],[os(25393)],[os(25394)]]);
661
+
t('⛔ one login on three seats: each seat shows only its own mailbox, and a seat that opened none shows none',[row(6023).mailbox.length,row(19287).mailbox.length,row(1353,'objectstack-ai/hotcrm').mailbox],[1,1,[]]);
662
+
t('⛔ a legacy per-login mailbox and a seat no post carries sit on no row — flagged, never attributed to the login\'s seats',[unassignedMailboxes(fixture,rows).map((m)=>[m.ref.number,m.seat,m.login,m.why]),[row(5560,'objectstack-ai/objectui').mailbox,row(10243,'objectstack-ai/objectui').mailbox]],[[[25395,null,'os-sales','legacy per-login, names no seat'],[25396,'domain:spec#5','os-tesla','no seat post carries this seat']],[[],[]]]);
632
663
t('stale and no wall note ⇒ 疑似撞墙; a wall note silences it; vacant never',[row(20163).suspectedWall,row(5560,'objectstack-ai/objectui').suspectedWall,row(5560,'objectstack-ai/objectui').wallNote,row(7623).suspectedWall],[true,false,'limit reached, resets at 15:00Z',false]);
633
664
t('last activity is the newest of post and in-flight cards',row(6023).lastActivity,'2026-10-23T13:28:00Z');
634
665
t('one account on two seats of a lane: cards on the lowest seat, the other reads = seat 1',[row(5560,'objectstack-ai/objectui').inFlight.length,row(10243,'objectstack-ai/objectui').sharesWith,row(10243,'objectstack-ai/objectui').inFlight,row(10243,'objectstack-ai/objectui').suspectedWall],[1,1,[],true]);
@@ -641,6 +672,10 @@ async function selfTest() {
641
672
t('the footer names the generation time and each read',[body.includes(`Generated ${fixture.now}`),body.includes('`GET /repos/objectstack-ai/hotcrm/issues?state=open&labels=pm:seat`')],[true,true]);
642
673
t('the suspected wall is spelled in the row',body.includes(`⚠️ ${SUSPECTED_WALL}`),true);
643
674
t('a shared seat reads = seat N in the in-flight cell',body.includes('| = seat 1 |'),true);
675
+
t('the mailboxes on no seat row are flagged under the table, each with its owner and why',(()=>{
return[flagged.includes('⚠️ 2 mailbox PR(s) on no seat row'),flagged.includes('objectstack#25395 (os-sales: legacy per-login, names no seat)'),flagged.includes('objectstack#25396 (domain:spec#5 · os-tesla: no seat post carries this seat)'),body.includes('on no seat row')];
678
+
})(),[true,true,true,false]);
644
679
t('the attribution footer closes the body',body.endsWith('\n\n---\n_Generated by [Claude Code](https://claude.ai/code/session_01ABC)_'),true);
t('the same facts in another read order render the same body',renderBody(buildRows(shuffled,{now: fixture.now}),{now: fixture.now,repos: Object.keys(fixture.repos).sort()}),renderBody(rows,{now: fixture.now,repos: Object.keys(fixture.repos).sort()}));
@@ -683,6 +718,7 @@ async function selfTest() {
683
718
}catch{}
684
719
t('--fixture --json exits 0 with no gh on PATH (nothing reached for)',jsonRun.status,EXIT_OK);
685
720
t('the printed rows are the built rows',parsed?.rows?.length,rows.length);
721
+
t('the printed JSON carries the mailboxes on no seat row',parsed?.unassignedMailboxes?.map((m)=>m.ref.number),[25395,25396]);
686
722
t('--fixture prints the markdown table',cli(['--fixture',FIXTURE_PATH]).stdout.split('\n')[0],ROSTER_MARKER);
687
723
t('a usage error is exit 2',cli(['--write','x']).status,EXIT_USAGE);
688
724
t('a missing fixture is exit 3',cli(['--fixture',join(PM_DIR,'no-such-fixture.json')]).status,EXIT_PREREQUISITE);
0 commit comments