Rollup of deferred /roast items across recent merged PRs that haven't been picked up in follow-up commits. Critical and High items from the same audit are tracked as their own issues — see #23 (executeMerge branch-race), #24 (registerStates bare-catch), #25 (speculativeProduction default).
This issue exists so the long tail of Medium and Low items has some tracked surface. Pick any subset for a bulk-cleanup PR.
Medium
PR #14 — persistent and branch-aware strategy state
PR #15 — close 5 spec gaps
(PR #16 description explicitly punted findings 4–11 as "MEH follow-ups". None landed.)
PR #18 — adaptive-resolution design doc
(Doc-level deferrals; PR #19 implementing from this doc baked them in.)
PR #22 — chunk-boundary tool cycles fix
Low
PR #17 — MessageStore.get
Origin
Audit run 2026-05-21 against the GitHub-visible review surface. Items here all flagged in /roast reviews by @Anarchid and never picked up in follow-up commits.
Rollup of deferred
/roastitems across recent merged PRs that haven't been picked up in follow-up commits. Critical and High items from the same audit are tracked as their own issues — see #23 (executeMerge branch-race), #24 (registerStates bare-catch), #25 (speculativeProduction default).This issue exists so the long tail of Medium and Low items has some tracked surface. Pick any subset for a bulk-cleanup PR.
Medium
PR #14 — persistent and branch-aware strategy state
setMergedIntouses object-identityindexOfwith silent miss.src/strategies/autobiographical.ts:787doesthis.summaries.indexOf(entry)and bails onindex < 0without logging. Masks the symptom of switchBranch/fork race against in-flight executeMerge corrupts cross-branch state #23 (stale captured references) and is O(n). SuggestsummariesById.get(id)after building the index once, or at minimumconsole.warnon miss.compressChunkHierarchical/executeMerge.test/strategy-persistence.test.tsexercises the persistence boundary only viaTestableStrategyseed helpers — the production code paths aren't covered. Add a test that drives a real chunk-compress + merge through the persistence layer.PR #15 — close 5 spec gaps
(PR #16 description explicitly punted findings 4–11 as "MEH follow-ups". None landed.)
getRenderStats,enforceBudget: false, ordriveSpeculativeDraintermination.test/speculation-cap.test.tsexists but doesn't probe drain-on-no-progress termination; noenforce-budget*orrender-stats*test file exists.pinRange/markDocumentaccept any string as message ID without validation. Orphan pins become permanently inert with no error returned to the caller. Validate againstmessageStore.has(id)and throw / return failure.'claude-sonnet-4-20250514'in 6 sites.src/strategies/autobiographical.ts:1422, 1722, 1789, 2179, 2250, 3385. NoDEFAULT_COMPRESSION_MODELconstant; default is two model generations behind current (Sonnet 4.6). Extract a constant; consider promoting to Sonnet 4.6 as the new default in the same PR.PR #18 — adaptive-resolution design doc
(Doc-level deferrals; PR #19 implementing from this doc baked them in.)
docs/adaptive-resolution-design.md:213, 227reads as a universal guarantee; §3.6.1's rendering algorithm shows it only holds when all shards are L0. Add the precondition explicitly.foldmakes "No LLM call" (docs/adaptive-resolution-design.md:399) — contradicts §3.8 whereraiseGroupcan trigger a backgroundproduce. Clarify or rephrase.MessageStoreView.estimateTokens(chars/4); pins-interaction was implicitly settled but never written down. Either close the open questions or note the resolution.PR #22 — chunk-boundary tool cycles fix
summariesByIdrebuilt O(n) at three sites.src/strategies/autobiographical.ts:1649, 1963, 2339. Same triple-rebuild pattern; consider a memoized accessor or pass the map into the helpers that consume it.this.summariesatsrc/strategies/autobiographical.ts:1652, 2058. Add asummariesByLevel: Map<SummaryLevel, SummaryEntry[]>index, kept in sync inpushSummary/setMergedInto.Low
PR #14
initialize()doesn't reset_cachedHeadStartIndexon branch switch. OnlyresetHeadWindowresets it (src/strategies/autobiographical.ts:3331). Cache-key luck currently masks this; would manifest as wrong head-window slice on a branch with a different message count.ContextManager.switchBranch(branchId: string)param name remainsbranchId. The API is now name-keyed (per the PR's stated point that any caller passing the prior return value was broken); param should bebranchName.src/context-manager.ts:376.forkAtmethod.src/context-manager.ts:346.PR #15
idx += needle.length || 1insearchSummariesempty-text path.src/strategies/autobiographical.ts:677— the outerif (query.text)already excludes the empty case.buildRecallHeaderusesString.replacewith raw summary IDs as the replacement string.src/strategies/autobiographical.ts:3312-3319.$&,$1,$$would expand. Latent footgun for any future ID scheme using$. Switch toString.replaceAllor a.split().join()pattern.isPositionPinnedhelper.src/strategies/autobiographical.ts:711.if (orig.type !== 'tool_result') continueinpruneToolEntries, around line 3754.FrontdeskStrategynot overridingselectis imprecise. No docstring clarifies the "subclasses overridingselectMUST call super" contract.PR #17 — MessageStore.get
_index: numberparameter oninternalToStored.src/message-store.ts:556. Two callers ignore the value.internal.sequence === append-sequencerather than edit-sequence; reading old data still triggers the chained-branching bug. PR Drop append-then-edit in MessageStore; use chronicle's appendToStateJsonWithIdentity #21's MessageStore rewrite makes the+1 invariantmoot but the caveat for users with existing chronicles was never documented.PR #18
FoldOp.lowerinterface shipped even though non-monotonic strategies are V1 non-goal. Add explicit "reserved for V2" note atdocs/adaptive-resolution-design.md:442.PR #22
test/chunker-tool-boundary.test.tsandtest/compression-shape-invariants.test.tsuse hardcoded'./test-...'paths. Switch toos.tmpdir() + randomUUID().as any/as unknown astype laundering in test files. Introduce a__testHooksaccessor on the strategy and aTestMembraneinterface to drop the casts.Origin
Audit run 2026-05-21 against the GitHub-visible review surface. Items here all flagged in
/roastreviews by @Anarchid and never picked up in follow-up commits.