fix(scripts): remove broken session-resume from dispatch loop
Some checks failed
CI / typecheck + lint + boundaries + test + build (push) Has been cancelled
CI / Playwright e2e (push) Has been cancelled
CI / Storybook smoke tests + visual regression (push) Has been cancelled
Coverage snapshot / snapshot (push) Has been cancelled
Release Please / release-please (push) Has been cancelled
Sentry PII guard (R31) / pii-guard (push) Has been cancelled
Some checks failed
CI / typecheck + lint + boundaries + test + build (push) Has been cancelled
CI / Playwright e2e (push) Has been cancelled
CI / Storybook smoke tests + visual regression (push) Has been cancelled
Coverage snapshot / snapshot (push) Has been cancelled
Release Please / release-please (push) Has been cancelled
Sentry PII guard (R31) / pii-guard (push) Has been cancelled
Sandcastle rejects `resumeSession` when `maxIterations > 1` with
"Resume applies to iteration 1 only; multi-iteration resume
semantics are not supported." Since a TDD slice needs the full
30-iteration budget, the session-resume path we shipped in d5c0120
is dead infrastructure that breaks dispatch mid-run.
Rip it out cleanly:
- runOneSlice drops the resumeSession param + the
context-exhaustion safety net + sessionId/usage return fields
- executeDispatch drops the currentStory/currentSession bookkeeping
and the token-reset threshold
- helpers totalInputTokens + isContextExhaustedError go (only used
by the resume path)
- SANDCASTLE_SESSION_TOKEN_RESET removed from .env.example
Net: -153 lines. Each slice is again an independent sandcastle
session; token cost per slice goes up (each implementer
re-discovers context) but the multi-iteration TDD shape works.
A different cross-slice context-passing mechanism (e.g. a
story-level context summary injected into each task spec) is left
as future work.
This commit is contained in:
11
.env.example
11
.env.example
@@ -88,14 +88,3 @@ CMS_URL=http://localhost:3001
|
||||
# notes printed. Bump for tricky slices; lower for fast-feedback iteration.
|
||||
#
|
||||
# SANDCASTLE_MAX_ATTEMPTS=3
|
||||
|
||||
# Session-resume token threshold. The orchestrator passes the prior
|
||||
# implementer's session ID into the next slice's run() via sandcastle's
|
||||
# `resumeSession` — the agent walks into task 2 already knowing where
|
||||
# helpers live, what the prior diff looked like, which gates passed.
|
||||
# When the prior iteration's total input tokens (input + cacheRead +
|
||||
# cacheCreation) crosses this threshold the orchestrator drops the
|
||||
# session and starts the next task fresh, avoiding mid-slice context
|
||||
# exhaustion. Default 140000 ≈ 70% of Sonnet 4.6's 200k window.
|
||||
#
|
||||
# SANDCASTLE_SESSION_TOKEN_RESET=140000
|
||||
|
||||
Reference in New Issue
Block a user