Skip to content

Commit 21f86ad

Browse files
committed
fix(pm): the printed seat shapes name LANE@ACCOUNT, and the Seat hint follows the signature
Review round. Five printed shapes still led with the seat number: the triage knock refusal, the trailer near-miss reason, and the round-open usage and --seat refusal. Each now gives LANE@ACCOUNT as the form to write and says an old number still reads. The claim writer's Seat hint says a seat whose rename has not landed writes its old name, as its signature does; no refusal is added. Self-test rows for each. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oPfjnm2yWHEwkiYrn
1 parent 0d5a3f8 commit 21f86ad

3 files changed

Lines changed: 20 additions & 10 deletions

File tree

‎scripts/pm/fleet-write/dispatch.mjs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ function trailerWhy(body) {
941941
if (read === null) return { line: '(the body is empty)', why: 'there is no last line to carry the trailer' };
942942
const line = read.line.length > 160 ? `${read.line.slice(0, 160)}…` : read.line;
943943
return read.shaped
944-
? { line, why: "the last non-empty line is the trailer's comment, but its inside is not a signature — check the lane, the `#N` seat number (or an `@ACCOUNT` seat, which only that same account signs), the login, the full session id, and that each separator is exactly ` · `" }
944+
? { line, why: "the last non-empty line is the trailer's comment, but its inside is not a signature — check the lane, the `@ACCOUNT` seat mark (only that same account signs its seat; an old `#N` seat number still reads), the login, the full session id, and that each separator is exactly ` · `" }
945945
: { line, why: 'the last non-empty line is not the trailer' };
946946
}
947947

@@ -2784,7 +2784,7 @@ const SELF_TEST_BATTERIES = Object.freeze({
27842784
"the release.yml refresh at the seat: the stroke packs with inputs refresh_version_pr true and travels in ONE dispatch; its started run is read back from release.yml's own run list; force, false, absent or any other input is refused before anything is sent, exit 2": 6,
27852785
"the batch gap at the seat: content creation read off the op table; a stroke at or above write-pace's threshold is batched through its last content-creating write and waited for exactly that much longer; a stroke whose pacing the relay job cannot hold is refused before anything is sent, naming the per-op doors; the job's timeout mirrors the workflow's": 13,
27862786
"the signature at the seat's door: a comment_edit or issue_patch body opens with the seat's signature line or the file is usage (2), nothing packed; generated, body-less and the other doors' ops are left alone": 15,
2787-
"the pull request body at the seat's door: an issue_patch body signed only by its LAST-line trailer passes when the platform answers its target is a pull request, before the dry-run exit; an issue, an unread target and a trailer-less body are refused; comment_edit takes no trailer": 20,
2787+
"the pull request body at the seat's door: an issue_patch body signed only by its LAST-line trailer passes when the platform answers its target is a pull request, before the dry-run exit; an issue, an unread target and a trailer-less body are refused; comment_edit takes no trailer": 21,
27882788
"the kind rule at the relay's adding doors: a pm state on pr_create or on a labels_add whose target READS as a pull request, and pm:awaiting-merge on issue_create or on a labels_add whose target reads as an issue, are refused before the dry-run exit with label-write's own sentence, case-insensitively and for the whole file; an unread kind is never a pass; labels_remove and an ungoverned labels_add read nothing": 18,
27892789
"the run_rerun_failed stroke at the seat: it packs as ONE action carrying run_id alone and travels in ONE dispatch; beside any other action, or with a key that widens it, it is refused before anything is sent; it creates no content, carries no body and names no workflow, so nothing is read back here — a success run is the executor's confirmation; a run that failed at the relay's fence is exit 5 after ONE dispatch, never re-sent": 6,
27902790
"the hierarchy link at the seat: an epic's children pack as sub_issue_add actions carrying the parent and the child by number alone, beside other issue ops in ONE dispatch; a self-link, an id or a replace_parent is refused before anything is sent; neither row creates content, carries a body or names a workflow, so the stroke is paced at rule ①'s gap and nothing is read back here — a success run is the executor's confirmation; a run that failed at the relay's fence is exit 5 after ONE dispatch, never re-sent": 5,
@@ -4628,6 +4628,7 @@ export async function selfTest() {
46284628
t('a first-line-signed issue_patch body needs no read — the trailer beside it changes nothing', [CANDS([{ op: 'issue_patch', issue: 3, body: `${SIG}\nSeat post\n${TRAILER}` }]), ROWS([{ op: 'issue_patch', issue: 3, body: `${SIG}\nSeat post\n${TRAILER}` }])], [[], []]);
46294629
const unsignedRow = unsignedEditBodies([{ op: 'issue_patch', issue: 29200, body: `${ATTRIBUTION}\nFixes #29145\n\nProse.\n` }])[0];
46304630
t('a body with neither is refused without a read, and its refusal names BOTH shapes — the first line and the trailer', [unsignedRow?.trailer?.why, editBodyRefusalText(unsignedRow).includes('LANE@ACCOUNT · ACCOUNT · SESSION'), editBodyRefusalText(unsignedRow).includes(PR_BODY_TRAILER_SHAPE), editBodyRefusalText(unsignedRow).includes('as the LAST non-empty line')], ['the last non-empty line is not the trailer', true, true, true]);
4631+
t('…and the near-miss reason names the `@ACCOUNT` seat mark as the one to write, with the old `#N` as a reading — for a numbered near miss and for another account\'s seat alike', [unsignedEditBodies([{ op: 'issue_patch', issue: 1, body: 'x\n<!-- signed: domain:devx#2 · marchtian -->' }])[0]?.trailer?.why, unsignedEditBodies([{ op: 'issue_patch', issue: 1, body: `x\n<!-- signed: repo:objectstack@marchtian · os-elon · ${SESSION} -->` }])[0]?.trailer?.why].map((why) => [why?.includes('the `@ACCOUNT` seat mark'), why?.includes('an old `#N` seat number still reads')]), [[true, true], [true, true]]);
46314632
t("…a near-miss trailer is named as one; a comment_edit row carries no trailer alternative", [unsignedEditBodies([{ op: 'issue_patch', issue: 1, body: 'x\n<!-- signed: domain:devx#2 · marchtian -->' }])[0]?.trailer?.why.startsWith("the last non-empty line is the trailer's comment"), editBodyRefusalText(unsignedEditBodies([{ op: 'comment_edit', comment_id: 7, body: 'Edited.' }])[0]).includes(PR_BODY_TRAILER_SHAPE)], [true, false]);
46324633
// The platform, faked at fetch: GET /repos/{repo}/issues/{n} answers from `store`, and every request is recorded.
46334634
const readFake = (store) => {

‎scripts/pm/post-stamped.mjs‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -976,11 +976,13 @@ import {
976976
signatureRefusal,
977977
signatureRefusalText,
978978
SEAT_SIGNATURE_SHAPE,
979+
seatMarkOf,
979980
stampDriftMinutes,
980981
stampSpan,
981982
stripMarkdownCode,
982983
stripSignatureLine,
983984
threadReadField,
985+
withSeatNumbers,
984986
} from './check-half-states.mjs';
985987
import { readClause2Line } from './clause2-line.mjs';
986988
import { fileSurfaceValue, surfaceTokens } from './check-handover.mjs';
@@ -2007,7 +2009,7 @@ export function substitutionSummary({ substituted = 0, quoted = 0, verbatim = 0
20072009

20082010
/** What each owning reader accepts, printed BY the refusal so the fix is one line away. */
20092011
export const CLAIM_KEY_SPELLINGS = Object.freeze({
2010-
Seat: '`Seat: LANE@ACCOUNT` at the START of a line, the lane and the SIGNING account attached, no space — e.g. `Seat: repo:objectstack@os-justin` (an old `LANE#N` line still reads)',
2012+
Seat: '`Seat: LANE@ACCOUNT` at the START of a line, the lane and the SIGNING account attached, no space — e.g. `Seat: repo:objectstack@os-justin`. A seat whose rename has not landed writes its old `LANE#N` name here, the name its signature carries',
20112013
'Thread-read': '`Thread-read: ID` at the START of a line — ONE comment id, or `none`, and nothing after it',
20122014
'Clause-②': '`Clause-②: yes` or `Clause-②: no` at the START of a line — reasoning after the value is fine, a quotation around it is not',
20132015
'File surface': '`File surface: `PATH`, `PATH` (stop on breach; explain in the report)` at the START of a line — every path in its own code span (a qualifier is the same key: `File surface (PR 1): …`); a path outside a code span, or a value of prose alone, names no path to `check-handover --inflight`',
@@ -2717,7 +2719,7 @@ export function triageContractReviewKnockText(knock) {
27172719
return (
27182720
`post-stamped: REFUSED — a \`Request: contract-review\` knock addressed to triage (\`To: ${knock.to}\`). Nothing was written.\n` +
27192721
' A lane that cannot take CONTRACT_REVIEW_TIER (the account cannot reach it, a 429 refusal, or the maintainer\n' +
2720-
' rationed it) knocks a seated L2 seat\'s mailbox — `To: l2-review#N`, the PR its seat post\'s `Mailbox:` line\n' +
2722+
' rationed it) knocks a seated L2 seat\'s mailbox — `To: l2-review@ACCOUNT`, the PR its seat post\'s `Mailbox:` line\n' +
27212723
' names — and, while no L2 seat is seated, a sibling lane seat that can take the tier; with neither, the PR\n' +
27222724
' waits on the owed-review list (`scripts/pm/check-owed-reviews.mjs`). ⛔ Never triage. The route is\n' +
27232725
' `references/contract-review.md` 〈L2 归属与资格〉. ⛔ No flag turns it off.'
@@ -4376,7 +4378,7 @@ const SELF_TEST_BATTERIES = Object.freeze({
43764378
'the relay transport: the same act as one op, the comment found on the board, the exit register kept apart': 13,
43774379
"the size route: over the relay's body cap under auto THIS write goes direct with one line naming bytes, cap and identity; at or under it the relay; explicit dispatch refuses naming the bytes; nothing else re-routes": 13,
43784380
'the signature: every body opens with LANE@ACCOUNT · ACCOUNT · SESSION or is refused, beside the stamp contract; one leading signature changes no reading': 11,
4379-
'the one judge: every body refusal on ONE path — `main` and `label-write.mjs --comment-file` call `judgeBody`, never a copy': 13,
4381+
'the one judge: every body refusal on ONE path — `main` and `label-write.mjs --comment-file` call `judgeBody`, never a copy': 14,
43804382
'the review route: a `Request: contract-review` knock addressed to triage is refused; to a review or sibling seat, and every other key to triage, it passes': 13,
43814383
'the record tier: a record naming `CONTRACT_REVIEW_TIER` is written only on a transcript `verify-review-tier.mjs` passes; another tier and a non-record comment are untouched': 16,
43824384
'the claim stroke: a comment opening `Claim:` is refused on every route but `direct`, pointing at the `label-write` fold; the same body through that fold passes': 21,
@@ -5936,6 +5938,12 @@ export function selfTest() {
59365938
t('⛔ a `Seat:` line naming an account seat off the line start is still refused by its owner — present, unreadable, ⛔ never seat 1', claimKeyedLineRefusals(`${ACC}\nClaim: PM loop round 1 — dispatched. Seat: repo:objectstack@os-justin — R1.`).some((r) => r.key === 'Seat') && !claimKeyedLineRefusals(claimOf(ACC, 'repo:objectstack@os-justin')).some((r) => r.key === 'Seat'));
59375939
t('⛔ N1 — a claim\'s `Seat:` line is held to its signer: signed by one account\'s seat and declaring ANOTHER account\'s is refused on the `Seat` key before the write, under an account signature and under a numbered one', [claimOf(ACC, 'repo:objectstack@os-elon'), claimOf('repo:objectstack#5 · os-justin · session_01QSeKYmhU5KEj1nukYhp1Tg', 'repo:objectstack@os-elon')].map((body) => [judgeBody(body, { mode: 'comment' }, NOW_MS).ok, claimKeyedLineRefusals(body).map((r) => r.key).join()]).join(';') === 'false,Seat;false,Seat');
59385940
t('N1 CONTROL — its OWN account on the line reads, in any case and under the old numbered signature too; a numbered `Seat:` line is held to nothing new', [claimOf(ACC, 'repo:objectstack@OS-Justin'), claimOf('repo:objectstack#5 · os-justin · session_01QSeKYmhU5KEj1nukYhp1Tg', 'repo:objectstack@os-justin'), claimOf(SIG, 'domain:skills#3'), claimOf(ACC, 'repo:objectstack#5')].map((body) => claimKeyedLineRefusals(body).length).join() === '0,0,0,0');
5941+
// Before its rename lands a seat writes its OLD name on the signature AND on the `Seat:` line (seat-post-protocol.md):
5942+
// that claim is one seat to every reader. The mixed claim — old signature, new `Seat:` name — is still accepted (no
5943+
// new refusal), and is one seat only once the seat's row is in the retired-number table; the hint names both forms.
5944+
const OLD5 = 'repo:objectstack#5 · os-justin · session_01QSeKYmhU5KEj1nukYhp1Tg';
5945+
const seatsOf = (body) => [claimSeatNumber(body), readSignatureLine(body)?.seat].map((mark) => seatMarkOf('repo:objectstack', mark, 'os-justin'));
5946+
t('S1 — an unrenamed seat\'s claim keeps the old name on the signature and on the `Seat:` line and reads as ONE seat; the mixed claim is accepted as before and is one seat only through the seat\'s table row; the `Seat` hint names both forms', [judgeBody(claimOf(OLD5, 'repo:objectstack#5'), { mode: 'comment' }, NOW_MS).ok, seatsOf(claimOf(OLD5, 'repo:objectstack#5')).join(), claimKeyedLineRefusals(claimOf(OLD5, 'repo:objectstack@os-justin')).length, seatsOf(claimOf(OLD5, 'repo:objectstack@os-justin')).join(), withSeatNumbers([{ lane: 'repo:objectstack', number: 5, account: 'os-justin' }], () => seatsOf(claimOf(OLD5, 'repo:objectstack@os-justin')).join()), CLAIM_KEY_SPELLINGS.Seat.includes('LANE@ACCOUNT') && CLAIM_KEY_SPELLINGS.Seat.includes('LANE#N')].join(';') === 'true;5,5;0;@os-justin,5;@os-justin,@os-justin;true');
59395947
const unsigned = judgeBody('Claim: PM loop round 1 · {{NOW}}', { mode: 'comment' }, NOW_MS, 'label-write');
59405948
t('⭐ an unsigned comment is refused, and the refusal names the SENDER it was handed', !unsigned.ok && unsigned.text.startsWith('label-write: REFUSED') && unsigned.text.includes('opens with no signature line'));
59415949
const typed = judgeBody(`${SIG}\nClaim: PM loop round 1 · 2026-09-10T06:37Z`, { mode: 'comment' }, NOW_MS);
@@ -6023,7 +6031,7 @@ export function selfTest() {
60236031
const judged = (to, key) => judgeBody(KNOCK(to, key), { mode: 'comment' }, NOW_MS);
60246032
const refused = judged('triage#1');
60256033
t('⭐ a contract-review knock addressed to `triage#1` is refused, and the refusal names the seat it was addressed to', !refused.ok && refused.text.startsWith('post-stamped: REFUSED') && refused.text.includes('`To: triage#1`'));
6026-
t('⭐ …and the refusal names the L2 seat\'s mailbox, the sibling fallback, the owed-review list and the rule\'s home', refused.text.includes('`To: l2-review#N`') && refused.text.includes('`Mailbox:`') && refused.text.includes('sibling lane seat') && refused.text.includes('check-owed-reviews.mjs') && refused.text.includes('references/contract-review.md') && refused.text.includes('Nothing was written'));
6034+
t('⭐ …and the refusal names the L2 seat\'s mailbox, the sibling fallback, the owed-review list and the rule\'s home', refused.text.includes('`To: l2-review@ACCOUNT`') && refused.text.includes('`Mailbox:`') && refused.text.includes('sibling lane seat') && refused.text.includes('check-owed-reviews.mjs') && refused.text.includes('references/contract-review.md') && refused.text.includes('Nothing was written'));
60276035
t('⭐ a MALFORMED knock to triage is refused too — no reason, a bare PR number, a second line: the reader\'s unreadable reading still names the key and the seat', [`Request: contract-review · PR #26766 · head ${HEAD}`, 'Request: contract-review · 26766 · rationed', `Request: contract-review · PR #26766 · head ${HEAD} · rationed\nbecause fable is short today`].every((key) => { const r = judged('triage#1', key); return !r.ok && r.text.includes('`To: triage#1`'); }) && judged('review#1', `Request: contract-review · PR #26766 · head ${HEAD}`).ok);
60286036
t('a bare `To: triage` reads as `triage#1` (the doorbell reader\'s seat spelling) and is refused the same way', !judged('triage').ok && !judged('Triage#2').ok);
60296037
t('⭐ both seat marks: the same knock addressed to a triage seat named by its account (`triage@ACCOUNT`) is refused exactly as `triage#1` is, whatever the case of the account, and the refusal names the seat as addressed', (() => { const r = judged('triage@os-help'); return !r.ok && r.text.startsWith('post-stamped: REFUSED') && r.text.includes('`To: triage@os-help`') && !judged('Triage@OS-Help').ok && !judged('triage#1').ok; })());

‎scripts/pm/round-open.mjs‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,9 @@ const USAGE = [
499499
' [--json] [--fixture FILE] [--now ISO]',
500500
' node scripts/pm/round-open.mjs --self-test',
501501
'',
502-
' --seat this executing seat (repo:NAME#N, epic:#N#k); the director and the review chains hold no round mutex.',
502+
' --seat this executing seat (repo:NAME@ACCOUNT, epic:#N@ACCOUNT; an old repo:NAME#N or epic:#N#k still reads); the director and the review chains hold no round mutex.',
503503
' --own sessions that are this seat\'s own — the lease table\'s area sessions, the PM session (from an area), a card thread\'s or a remote dev\'s session.',
504-
' --post the seat post, when its title does not name the seat as `LANE · seat N`.',
504+
' --post the seat post, when its title does not name the seat as `LANE@ACCOUNT` (or, on an old post, `LANE · seat N`).',
505505
' --intake the lane, when the post title names no `area:*` / `epic #N`.',
506506
` Exits: ${EXIT_CLEAR} CLEAR · ${EXIT_USAGE} usage · ${EXIT_PREREQUISITE} prerequisite (no seat post read) · ${EXIT_INCOMPLETE} INCOMPLETE (a gap, named) · ${EXIT_YIELD} YIELD (自退).`,
507507
].join('\n');
@@ -523,7 +523,7 @@ export function parseArgs(argv) {
523523
} else if (flag === '--seat') {
524524
const v = take();
525525
opts.seat = parseSeat(v);
526-
if (!opts.seat) return { error: `--seat must be an executing seat, repo:NAME#N or epic:#N#k, or either lane with @ACCOUNT in place of the number (the director and the review chains hold no round mutex), got \`${v}\`` };
526+
if (!opts.seat) return { error: `--seat must be an executing seat, repo:NAME@ACCOUNT or epic:#N@ACCOUNT, or either lane with an old #N seat number in place of @ACCOUNT (the director and the review chains hold no round mutex), got \`${v}\`` };
527527
} else if (flag === '--session') {
528528
const v = String(take() ?? '');
529529
if (!SESSION_ONLY.test(v)) return { error: `--session must be ONE session id, got \`${v}\`` };
@@ -607,7 +607,7 @@ const SELF_TEST_BATTERIES = Object.freeze({
607607
'reading 3: the newest claim of this seat by another session, and a push on a lane branch': 15,
608608
'reading 4: the first closed lane card with a claim of this seat, timed by its session': 4,
609609
'the verdict: foreign, un-clocked-out and under a round yields; own, clocked-out or older does not; a gap is never clear': 8,
610-
'the CLI: usage, exits and the footer': 8,
610+
'the CLI: usage, exits and the footer': 9,
611611
});
612612
const SELF_TEST_BATTERY_FLOOR = 6;
613613
const UNATTRIBUTED_BATTERY = '(unattributed)';
@@ -782,6 +782,7 @@ export function selfTest() {
782782
battery('the CLI: usage, exits and the footer');
783783
{
784784
t('--seat and --session are required; the director and a review chain are refused by name', [Boolean(parseArgs([]).error), Boolean(parseArgs(['--seat', 'director#1', '--session', ME]).error), Boolean(parseArgs(['--seat', 'l2-review#1', '--session', ME]).error), parseArgs(['--seat', 'epic:#35205#1', '--session', ME]).opts?.seat.name], [true, true, true, 'epic:#35205#1']);
785+
t('the usage and the --seat refusal name the seat by its account as the form to write, and say the old number still reads', [USAGE.includes('repo:NAME@ACCOUNT, epic:#N@ACCOUNT'), USAGE.includes('`LANE@ACCOUNT`'), parseArgs(['--seat', 'director#1', '--session', ME]).error.includes('repo:NAME@ACCOUNT or epic:#N@ACCOUNT'), parseArgs(['--seat', 'director#1', '--session', ME]).error.includes('old #N'), parseArgs(['--seat', 'repo:objectstack#8', '--session', ME]).opts?.seat.name, parseArgs(['--seat', 'repo:objectstack@os-mickey', '--session', ME]).opts?.seat.name], [true, true, true, true, 'repo:objectstack#8', 'repo:objectstack@os-mickey']);
785786
t('a bad --session, --own, --post, --intake or flag is a usage error, never a default', ['--session=x', '--own=x', '--post=x', '--intake=ux', '--bogus'].map((a) => Boolean(parseArgs(['--seat=repo:objectstack#8', `--session=${ME}`, a]).error)), [true, true, true, true, true]);
786787
const busy = card(['pm:dispatched', 'area:fleet'], 10);
787788
const fx = { issues: [POST, busy], comments: { 37865: [c(`${sig(OTHER)}\n\n## Clock-out · seat 8`, 120)], [busy.number]: [claim(OTHER, 10)] } };

0 commit comments

Comments
 (0)