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 153f1e3
Browse filesBrowse the repository at this point in the historyBrowse files
fix(pm): fleet-roster reads a shared-account seat's own activity
A seat whose account also holds a lower seat of its lane has no in-flight
cards of its own (the cell reads `= seat N`), so its last activity was its
seat post's updated_at alone and it read 疑似撞墙 while working. Last
activity is now the newest of the post, its in-flight cards, its mailbox
pull's updated_at, and the comments of the last STALE_HOURS signed with
the row's own LANE#N (by seat, never by account). One paged read per repo
(/issues/comments?since=now - STALE_HOURS) carries the signed comments;
the mailbox time comes from the pulls list already read.
The signature pattern is mirrored from check-half-states (the relay
imports this file and must not load the patrol); the self-test holds the
two byte-equal and adds a battery for one account on two seats of a lane.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
console.error(`✗ fleet-roster: ${opts.fixture!==null ? `could not read the fixture ${opts.fixture}` : 'a read failed'} — ${e.message}. Nothing was written.`);
'wall notes, closing refs, verdicts and mailboxes': 13,
608
659
'the fixture snapshot: rows for the three repos': 25,
660
+
'one account on two seats of a lane: the second seat reads its own traces': 13,
609
661
'the rendered body: marker, columns, footer, determinism': 10,
610
662
'refusing to overwrite what is not the roster': 6,
611
663
'the CLI: fixture runs offline, usage errors are exit 2': 6,
612
664
'paging: a three-page read through the loop equals the slurped array': 4,
613
665
});
614
-
constSELF_TEST_BATTERY_FLOOR=8;
666
+
constSELF_TEST_BATTERY_FLOOR=9;
615
667
616
668
asyncfunctionselfTest(){
617
669
letfailed=0;
@@ -732,6 +784,52 @@ async function selfTest() {
732
784
t('last activity is the newest of post and in-flight cards',row(6023).lastActivity,'2026-10-23T13:28:00Z');
733
785
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]);
734
786
787
+
battery('one account on two seats of a lane: the second seat reads its own traces');
788
+
{
789
+
constNOW='2026-11-02T04:00:00Z';
790
+
constR='objectstack-ai/objectstack';
791
+
constfresh='2026-11-02T03:00:00Z';// 1 h before NOW
792
+
conststale='2026-11-01T20:00:00Z';// 8 h before NOW, past STALE_HOURS
t('no trace of its own: seat 2 reads = seat 1, its post alone, and is flagged',seat2(snap()),{sharesWith: 1,inFlight: [],mailbox: [],lastActivity: '2026-10-31T00:00:00Z',suspectedWall: true});
814
+
t('⭐ a fresh mailbox pull lifts the flag, and the in-flight cell still reads = seat 1',seat2(snap({mailboxAt: fresh})),{sharesWith: 1,inFlight: [],mailbox: [{repo: R,number: 402}],lastActivity: fresh,suspectedWall: false});
815
+
t('⭐ a fresh comment signed domain:server#2 lifts the flag',seat2(snap({comments: [{body: `${sig('domain:server#2')}\n\n## 席位核对 — ACCEPT`,updated_at: fresh}]})),{sharesWith: 1,inFlight: [],mailbox: [],lastActivity: fresh,suspectedWall: false});
816
+
t('⛔ mailbox and signed comment both older than STALE_HOURS: flagged, last activity the newer of them',seat2(snap({mailboxAt: stale,comments: [{body: sig('domain:server#2'),updated_at: '2026-11-01T19:00:00Z'}]})),{sharesWith: 1,inFlight: [],mailbox: [{repo: R,number: 402}],lastActivity: stale,suspectedWall: true});
817
+
t('⛔ by seat, never by account: seat 1\'s fresh signed comment and fresh mailbox, same account, leave seat 2 flagged',seat2(snap({seat1MailboxAt: fresh,comments: [{body: sig('domain:server#1'),updated_at: fresh}]})).suspectedWall,true);
818
+
t('⛔ another lane\'s seat 2, or a seat-2 signature on a repo: lane, is not this seat',seat2(snap({comments: [{body: sig('domain:ui#2'),updated_at: fresh},{body: sig('repo:server#2'),updated_at: fresh}]})).suspectedWall,true);
819
+
t('⛔ a signature that is not the FIRST non-empty line, or is spelled wrong, signs nothing',seat2(snap({comments: [{body: `Claim: x\n${sig('domain:server#2')}`,updated_at: fresh},{body: 'domain:server#2 - os-pm - session_01SharedSeatSess',updated_at: fresh},{body: 'domain:server#2 · os-pm · session_01x',updated_at: fresh}]})).suspectedWall,true);
820
+
t('the newest of the four traces wins, and the comment\'s updated_at is its time',seat2(snap({mailboxAt: '2026-11-02T01:00:00Z',comments: [{body: sig('domain:server#2'),created_at: '2026-11-02T00:00:00Z',updated_at: '2026-11-02T03:30:00Z'},{body: sig('domain:server#2'),updated_at: '2026-11-02T02:00:00Z'}]})).lastActivity,'2026-11-02T03:30:00Z');
821
+
t('seat 1 keeps its cards and reads its own traces too',(({ inFlight, lastActivity, suspectedWall })=>({ inFlight, lastActivity, suspectedWall }))(buildRows(snap({comments: [{body: sig('domain:server#1'),updated_at: '2026-11-02T03:45:00Z'}]}),{now: NOW}).find((r)=>r.post===100)),{inFlight: [{repo: R,number: 300}],lastActivity: '2026-11-02T03:45:00Z',suspectedWall: false});
822
+
t('the rendered row keeps = seat 1 and drops the flag once a trace is fresh',(()=>{
t('the comment read starts STALE_HOURS before now, and the footer names it',[activitySince(NOW),readsFor([R]).some((q)=>q.startsWith(`GET /repos/${R}/issues/comments?since=`))],['2026-11-01T22:00:00Z',true]);
t('the signature pattern is check-half-states\' SEAT_SIGNATURE_LINE, byte for byte — mirrored, not imported',[SIGNATURE_LINE.source===SEAT_SIGNATURE_LINE.source,SIGNATURE_LINE.flags===SEAT_SIGNATURE_LINE.flags],[true,true]);
t('signedSeatOf reads every body as readSignatureLine does',corpus.map(signedSeatOf),corpus.map((b)=>{constr=readSignatureLine(b);returnr ? `${r.lane}#${r.seat}` : null;}));
0 commit comments