Skip to content

Commit c299a96

Browse files
committed
pm: the triage knock refusal and the stale-seat-post row read the account mark
The contract-review knock check judges the target by its lane word before either seat mark, so a knock to a triage seat named by its account is refused as the numbered one is. The stale-seat-post finding prints an account mark in a code span, since the row is written into an issue body. The half-states self-test now pins the cross-account guard of the signature reader itself. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oPfjnm2yWHEwkiYrn
1 parent eb1c6e8 commit c299a96

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

‎scripts/pm/check-half-states.mjs‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9745,8 +9745,11 @@ export function h38SeatPostStale(seat, seatAt, claim) {
97459745
if (claim.at <= seatAt) return null;
97469746

97479747
const behindHours = (claim.at - seatAt) / 3_600_000;
9748+
// An account mark is printed in a code span: this row is written into the patrol's anchor issue, where a loose
9749+
// `@login` is a mention. A seat number is printed bare, as it always was.
9750+
const seatWord = typeof seatNo === 'string' ? `\`${seatNo}\`` : seatNo;
97489751
return (
9749-
`\`pm:seat\` post is STALE — its intake ${lane} (seat ${seatNo}) carries a \`Claim:\` on #${claim.number} written ` +
9752+
`\`pm:seat\` post is STALE — its intake ${lane} (seat ${seatWord}) carries a \`Claim:\` on #${claim.number} written ` +
97509753
`${behindHours.toFixed(1)}h AFTER this post's last event (claim ${new Date(claim.at).toISOString()}, ` +
97519754
`post ${new Date(seatAt).toISOString()}). A shift dispatched work and did not record it, so every ` +
97529755
'number the post states — 在飞 / 队列 / 决策箱 / the round number — describes a round that has since ' +
@@ -33551,7 +33554,9 @@ async function selfTest() {
3355133554
const vacantSeat1 = new Map([[1, seatRow('Seat: `repo:objectstack#1`', '2026-08-30T00:00:00Z')]]);
3355233555
t('H38 seat (account mark): CONTROL — a `#1` claim by a vacant seat still reads as seat 1\'s', J38([newestLaneClaim('area:data', oneCard, vacantSeat1, 1).number, newestLaneClaim('area:data', oneCard, seat1Claim, 1).number]), J38([1, 1]));
3355333556
t('H38 seat (account mark): CONTROL — …and ⛔ never as the account seat\'s, so the new account\'s post is not rowed over it', J38([newestLaneClaim('area:data', oneCard, vacantSeat1, '@os-b'), newestLaneClaim('area:data', oneCard, seat1Claim, '@os-b'), newestLaneClaim('area:data', oneCard, seat2Claim, '@os-b')]), J38([null, null, null]));
33554-
t('H38 seat (account mark): the finding on an account seat\'s post names its mark', h38row(seat38(acctArea), SEAT_AT_38, claim38(13398, '2026-08-30T07:30:00Z')).includes('(seat @os-b)'), true);
33557+
t('H38 seat (account mark): the finding on an account seat\'s post names its mark in a code span — ⛔ never a loose `@login`, which the anchor issue turns into a mention', J38([h38row(seat38(acctArea), SEAT_AT_38, claim38(13398, '2026-08-30T07:30:00Z')).includes('(seat `@os-b`)'), /(?<![`\w])@os-b/u.test(h38row(seat38(acctArea), SEAT_AT_38, claim38(13398, '2026-08-30T07:30:00Z')))]), J38([true, false]));
33558+
t('H38 seat (account mark): CONTROL — a numbered seat\'s finding prints its number bare, as before', h38row(seat38(seat2Area), SEAT_AT_38, claim38(13398, '2026-08-30T07:30:00Z')).includes('(seat 2)'), true);
33559+
t('H38 seat (account mark): ⛔ account X signing account Y\'s seat is no signature — `readSignatureLine` reads nothing, not Y\'s seat and not X\'s; the same line under its own account, any case, reads', J38([readSignatureLine('repo:objectstack@os-b · os-c · session_01QSeKYmhU5KEj1nukYhp1Tg'), readSignatureLine('repo:objectstack@OS-B · os-b · session_01QSeKYmhU5KEj1nukYhp1Tg')?.seat, readSignatureLine('repo:objectstack#1 · os-c · session_01QSeKYmhU5KEj1nukYhp1Tg')?.seat]), J38([null, '@os-b', 1]));
3355533560
t('H38 seat: a seat-2 post with no same-seat claim -> clean', h38SeatPostStale(seat38(seat2Area), SEAT_AT_38, newestLaneClaim('area:data', oneCard, seat1Claim, 2)), null);
3355633561

3355733562
// -- Lane label aliases — the domain:server merge (maintainer ruling 2026-10-22, letter 乙) --

‎scripts/pm/post-stamped.mjs‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,7 @@ import {
962962
H56_STAMP_TOLERANCE_MIN,
963963
ISSUE_BODY_LIMIT,
964964
PROXY_FLAG,
965+
SEAT_MARK_SOURCE,
965966
claimSeatNumber,
966967
contractReviewHeadSha,
967968
h56EstimatedStamp,
@@ -2680,6 +2681,9 @@ export function decisionFacetRefusalText(rows) {
26802681
);
26812682
}
26822683

2684+
/** The triage lane's seat key under either seat mark: the lane word, then `check-half-states.mjs`'s `SEAT_MARK_SOURCE`. */
2685+
const TRIAGE_SEAT_KEY = new RegExp(`^triage${SEAT_MARK_SOURCE}$`, 'u');
2686+
26832687
/**
26842688
* A contract-review knock addressed to triage — the route the rule text closes (`references/contract-review.md`
26852689
* 〈L2 归属与资格〉): a lane that cannot take `CONTRACT_REVIEW_TIER` sends `Request: contract-review` to a seated
@@ -2691,11 +2695,14 @@ export function decisionFacetRefusalText(rows) {
26912695
* `id` and `to` parsed before the template failed, and a malformed knock to triage is still a knock to triage. A
26922696
* comment the reader refuses outright (no `To:` seat, a key outside the table) names no contract-review knock at
26932697
* all and passes, as it does today. Comments only. Answers the reading, or null. Pure.
2698+
*
2699+
* The target is judged by its LANE WORD, before either seat mark (`TRIAGE_SEAT_KEY`): a triage seat named by its
2700+
* account (`triage@ACCOUNT`) is triage exactly as `triage#N` is.
26942701
*/
26952702
export function triageContractReviewKnock(body) {
26962703
const knock = readMailboxLine(String(body ?? ''));
26972704
if ((knock.state !== 'read' && knock.state !== 'unreadable') || knock.id !== 'request:contract-review') return null;
2698-
return /^triage#/u.test(knock.to) ? knock : null;
2705+
return TRIAGE_SEAT_KEY.test(knock.to) ? knock : null;
26992706
}
27002707

27012708
/** The refusal a caller reads, from `triageContractReviewKnock`'s reading. */
@@ -4363,7 +4370,7 @@ const SELF_TEST_BATTERIES = Object.freeze({
43634370
"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,
43644371
'the signature: every body opens with LANE#N · ACCOUNT · SESSION or is refused, beside the stamp contract; one leading signature changes no reading': 11,
43654372
'the one judge: every body refusal on ONE path — `main` and `label-write.mjs --comment-file` call `judgeBody`, never a copy': 11,
4366-
'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': 10,
4373+
'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,
43674374
'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,
43684375
'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,
43694376
});
@@ -6010,6 +6017,9 @@ export function selfTest() {
60106017
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'));
60116018
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);
60126019
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);
6020+
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; })());
6021+
t('⭐ …a MALFORMED knock to it is refused too, and every other key to it passes, as for the numbered seat', !judged('triage@os-help', `Request: contract-review · PR #26766 · head ${HEAD}`).ok && judged('triage@os-help', 'Request: urgent-triage · #26766 · main red on Test Core').ok && judged('triage@os-help', 'Request: triage · #26766 · which lane takes it').ok);
6022+
t('⛔ control — the lane word is what is judged, not the mark: an L2 or a sibling lane seat named by its account passes as its numbered seat does, and a lane that only starts with the word is not triage', judged('l2-review@os-bill').ok && judged('review@os-bill').ok && judged('domain:server@os-bill').ok && judged('repo:objectstack@os-help').ok && ['triage#1', 'triage@os-help'].every((to) => triageContractReviewKnock(KNOCK(to))?.to === to) && [KNOCK('l2-review@os-help'), KNOCK('repo:triage@os-help'), KNOCK('repo:triage#1')].every((b) => triageContractReviewKnock(b) === null));
60136023
t('⭐ the same knock addressed to an L2 seat passes — under its lane word `l2-review` and under the old spelling `review`', judged('l2-review#1').ok && judged('l2-review#2').ok && judged('review#1').ok && judged('review#2').ok);
60146024
t('…and to a sibling lane seat, the fallback while no L2 seat is seated', judged('domain:server#2').ok);
60156025
t('⛔ every other key to triage is untouched: `Request: urgent-triage` and `Request: triage` pass', judged('triage#1', 'Request: urgent-triage · #26766 · main red on Test Core').ok && judged('triage#1', 'Request: triage · #26766 · which lane takes it').ok);

0 commit comments

Comments
 (0)