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 5938091
Browse filesBrowse the repository at this point in the historyBrowse files
fix(pm): label-write judges a release comment on post-stamped's path and hands sendFleetWrite its read-back judge
--release now judges its composed body with judgeBody in comment mode, so an
unsigned release text is refused with exit 2 before the stroke. Every relay
send passes the read-back judge, so sendFleetWrite no longer imports
post-stamped under label-write's top-level await, which never settled.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jR91pcCzC1k9n3p5ah
/** The operator's text WITHOUT its signature line — `judgeBody` refuses it before the stroke. */
1950
+
constRELEASE_TEXT_UNSIGNED=
1912
1951
'Release: session `session_01TRIAGE000000000000000000` · reason: a silent claim — the owned-24h re-check 200 has had no answer · destination `pm:queue`\n\n'+
1913
1952
'Provenance, three items: the triage duties text (the reclaim clock); verbatim 「敲门后 `RECLAIM_AFTER_HOURS = 12` 小时无答复 ⇒ 一笔中继释放」; said in `triage-duties.md`. Stamped {{NOW}}.';
1953
+
/** The text a triage seat sends: its signature line, then the `Release:` line (#27113). */
'the retired lane aliases: an --add of domain:engine / services / cli / rest is written as domain:server before the target, step ② says so, the read-back is clean on either transport; --remove and a live domain:* label pass untouched': 8,
1983
2024
'the CLI: what a typo must never be allowed to mean': 8,
1984
2025
'the relay transport: ONE dispatch carrying the whole stroke, the same read-back, and an accepted dispatch with no run UNCONFIRMED under auto too — never a direct write': 14,
1985
-
'the release: a silent claim reclaimed in ONE relay stroke — Release: comment → pm:queue on → pm:dispatched off → unassign — on the knock\'s SERVER-clock age, RELAY-ONLY, never a direct write': 32,
2026
+
'the release: a silent claim reclaimed in ONE relay stroke — Release: comment → pm:queue on → pm:dispatched off → unassign — on the knock\'s SERVER-clock age, RELAY-ONLY, never a direct write': 34,
1986
2027
[FOLD_BATTERY]: 24,
1987
-
[REAL_TRANSPORT_BATTERY]: 4,
2028
+
[REAL_TRANSPORT_BATTERY]: 5,
1988
2029
});
1989
2030
constSELF_TEST_BATTERY_FLOOR=15;
1990
2031
constUNATTRIBUTED_BATTERY='(unattributed)';
@@ -2321,7 +2362,7 @@ export async function selfTest() {
2321
2362
// One leading signature line (#27113) stands ABOVE the first-line key, never in its place.
t('a signed knock reads by the key on the line after its signature; a key on a later line, or under a near-miss signature, still does not',[isRecheckComment(`${SIG}\nOwned-24h re-check: x`),isRecheckComment(`${SIG}\n\n## Owned-24h re-check: x`),isRecheckComment(`${SIG}\nTriage\nOwned-24h re-check: x`),isRecheckComment('domain:skills#2 - os-justin - session_01ABCDEFGHJKMNPQRSTVWXYZ\nOwned-24h re-check: x')],[true,true,false,false]);
2324
-
t('…and a signed release text is judged by its `Release:` line: accepted signed as unsigned, refused when no `Release:` line follows the signature',[releaseTextRefusal(`${SIG}\n${RELEASE_TEXT}`)===releaseTextRefusal(RELEASE_TEXT),typeofreleaseTextRefusal(`${SIG}\nnote\nRelease: x`)],[true,'string']);
2365
+
t('…and a signed release text is judged by its `Release:` line: accepted signed as unsigned, refused when no `Release:` line follows the signature',[releaseTextRefusal(`${SIG}\n${RELEASE_TEXT_UNSIGNED}`)===releaseTextRefusal(RELEASE_TEXT_UNSIGNED),typeofreleaseTextRefusal(`${SIG}\nnote\nRelease: x`)],[true,'string']);
2325
2366
2326
2367
// The fixture card the protocol names, younger than the clock.
@@ -2337,8 +2378,22 @@ export async function selfTest() {
2337
2378
t('…in ONE dispatch carrying comment → labels_add → labels_remove → unassign, every action on the card',[old.sent.length,old.sent[0].actions.map((a)=>a.op),old.sent[0].actions.every((a)=>a.issue===7)],[1,['comment','labels_add','labels_remove','unassign'],true]);
2338
2379
t('…and this process made ZERO direct writes — reads only',old.direct,[]);
2339
2380
constlanded=old.fake.board.comments.at(-1);
2340
-
t('…the Release: comment landed with the resume line and the measured clock appended',[landed.body.startsWith('Release: session'),landed.body.includes(`\nResume-from: ${RELEASE_BRANCH}@abcdef1234\n`),landed.body.includes('unanswered for 13h 0m'),landed.body.includes(`RECLAIM_AFTER_HOURS = ${RECLAIM_AFTER_HOURS}`)],[true,true,true,true]);
2381
+
t('…the Release: comment landed under its signature line, with the resume line and the measured clock appended',[landed.body.startsWith('triage#1 · os-justin · session_01TRIAGE000000000000000000\nRelease: session'),landed.body.includes(`\nResume-from: ${RELEASE_BRANCH}@abcdef1234\n`),landed.body.includes('unanswered for 13h 0m'),landed.body.includes(`RECLAIM_AFTER_HOURS = ${RECLAIM_AFTER_HOURS}`)],[true,true,true,true]);
2341
2382
t('…{{NOW}} in the operator text was stamped, and the read-back found the comment by its stored bytes',[landed.body.includes('{{NOW}}'),old.res.comment,old.text.includes('④ MATCHES — released')],[false,landed.id,true]);
2383
+
// The comment is judged on post-stamped's path (`judgeBody`, comment mode), as `--comment-file`'s is.
t('⭐ an UNSIGNED release text is refused by post-stamped\'s own judge BEFORE the stroke: exit 2, no dispatch, zero writes, the sender named',[unsignedRelease.exit,unsignedRelease.res.stoppedAt,unsignedRelease.sent.length,unsignedRelease.direct,unsignedRelease.text.includes('label-write: REFUSED'),unsignedRelease.text.includes('opens with no signature line'),unsignedRelease.text.includes('NOTHING WAS WRITTEN')],[EXIT_USAGE,2,0,[],true,true,true]);
2386
+
{
2387
+
constown=readFileSync(SELF_PATH,'utf8');
2388
+
constcomposeSource=own.slice(own.indexOf('export function composeReleaseBody('),own.indexOf('export function releaseActions('));
2389
+
constreleaseSource=own.slice(own.indexOf('export async function runRelease('),own.indexOf('function reportPrerequisite('));
2390
+
t('structural: --release judges its composed body with post-stamped\'s judgeBody before it packs the stroke, and label-write defines no reader of its own',[
t('`--resume-from none` releases without a branch or pull read, writing `Resume-from: none`',[none.exit,none.fake.calls.some((c)=>c.op==='branch-read'||c.op==='pulls-list'),none.fake.board.comments.at(-1).body.includes('\nResume-from: none\n')],[EXIT_OK,false,true]);
2344
2399
@@ -2498,7 +2553,10 @@ export async function selfTest() {
2498
2553
releaseWire.cleanup();
2499
2554
}
2500
2555
t('⭐ a RELEASE through the real sendFleetWrite SETTLES too: ONE dispatch, exit 0',[rel.res?.relay?.state,rel.exit,releaseWire.sent.length],['success',EXIT_OK,1],rel.text.slice(-600));
2501
-
t('…and its ④ comment line prints',rel.text.includes('④ comment ✓')||rel.text.includes('comment ✓'),true,rel.text.slice(-600));
t('structural: every send from this file hands sendFleetWrite the read-back judge, so it never imports one under this file\'s top-level await',[sends.length,sends.every((call)=>call.includes('judge: readBackJudge()'))],[3,true]);
2559
+
t('…and its ④ read-back prints after it, the release comment found by its stored bytes',[rel.text.includes('④ MATCHES — released'),rel.res?.comment===releaseBoard.board.comments.at(-1)?.id],[true,true],rel.text.slice(-600));
2502
2560
}
2503
2561
2504
2562
// ── the floor, BEFORE the verdict ────────────────────────────────────────
0 commit comments