Skip to content

Commit 4a9257f

Browse files
committed
fleet-write/execute: say 'could outlive the job' for an over-budget stroke, and pin the transcript line's order without a vacuous pass
Claude-Session: https://claude.ai/code/session_01HEdP5tPhqQfzwRmKDxwn85 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5b580db commit 4a9257f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@
8888
* - a stroke whose pacing the relay job cannot hold — its `timeout-minutes`
8989
* less the allowance an ordinary stroke has — is REFUSED with zero writes
9090
* (exit 2, `strokeBudgetRefusal`), exactly as the packer refuses it at the
91-
* seat (`dispatch.mjs`, its batch-gap section): run anyway, the job would
92-
* be cancelled mid-stroke with no summary. ⛔ Never a shorter gap instead;
91+
* seat (`dispatch.mjs`, its batch-gap section): run anyway, it could
92+
* outlive the job, which the platform cancels mid-stroke with no summary.
93+
* ⛔ Never a shorter gap instead;
9394
* - an announcement the pace log cannot record is REFUSED (exit 10), the way
9495
* `paceWrite` refuses an unrecordable write: unpaced is the state the
9596
* throttle exists to prevent.
@@ -1181,7 +1182,8 @@ export async function selfTest() {
11811182
t("…and the pacing the runner pays is exactly the pacing the seat budgets for (strokePacing — the packer's refusal and the run-poller's wait)", five.gaps.reduce((a, b) => a + b, 0), strokePacing(base(cards(DEFAULT_BATCH_THRESHOLD))).pacingMs);
11821183
const announced = five.paceLines.findIndex((l) => l.includes(`batch of ${DEFAULT_BATCH_THRESHOLD} ${BATCH_KIND} item(s) announced`));
11831184
const firstLanded = five.logs.findIndex((l) => l.startsWith(' ✓ action 1 '));
1184-
t('ONE announcement, recorded by write-pace itself under this kind, before the first write — and the transcript says it before the first landing', [five.paceLines.filter((l) => l.includes('announced for token key')).length, announced >= 0, five.logs.findIndex((l) => l.includes('rule ⑤ —')) < firstLanded, firstLanded > 0], [1, true, true, true]);
1185+
const said = five.logs.findIndex((l) => l.includes('rule ⑤ —'));
1186+
t('ONE announcement, recorded by write-pace itself under this kind, before the first write — and the transcript says it before the first landing', [five.paceLines.filter((l) => l.includes('announced for token key')).length, announced >= 0, said >= 0 && said < firstLanded, firstLanded > 0], [1, true, true, true]);
11851187
t('…the summary names the pacing in one line, and the token reached neither the summary nor the pace log', [five.summary.includes(`- pacing: rule ⑤ — ${DEFAULT_BATCH_THRESHOLD} content-creating action(s)`), five.summary.includes(TOKEN), readReal(five.file, 'utf8').includes(TOKEN)], [true, false, false]);
11861188

11871189
const four = await clocked(cards(DEFAULT_BATCH_THRESHOLD - 1));

0 commit comments

Comments
 (0)