Repository navigation
refactor(session): drop dead compactor config, branch, and aliases - #1398
Merged
Merged
Conversation
Contributor
|
No changes needed from you. A maintainer will review this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes dead config, an unreachable branch, and an inert alias from the session compactor (CL-10511). One item deviated (kept) because a real consumer exists — see below.
Changes
maxAnchorTurnsconfig (field + default + record entry) — Verified inert: no code reads it as a behavior input (grep over the repo shows it only copied into the outputrecord.parameters, never consumed; no test asserts on it). Removed the field fromCompactorConfig, itsDEFAULT_COMPACTOR_CONFIGdefault, and therecord.parameters.maxAnchorTurnsentry. Mechanically dropped the now-invalidmaxAnchorTurns:keys fromcompactor-pairing.test.ts(×13),context-compactor.test.ts(×7), andcompaction-archive.test.ts(×1) sotsc --noEmitstays green.buildTurnSummaryanchorCountparam + unreachable branch — Verified inert: every call site omits it or passes0(production callercompactor.tsomits;context-compactor.test.tsomits;compactor-pairing.test.tspassed0). Removed the param and theanchorCount > 0 ? … : ""branch; dropped the explicit0argument atcompactor-pairing.test.ts:211.compactorNoOpFloor()→const COMPACT_NOOP_FLOOR = 1— DEVIATION, not performed. The function is not inert:src/agent/compaction.tsimports it and uses it asMIN_TURNS_TO_COMPACT(a production behavior input that arms the compaction governor), and 4 test files call it. Removing/replacing it would require touching files outside this ticket's scope, so per the ticket rules it is left in place and reported as a deviation.isCompactSpacerTurnalias — Verified inert: private one-line alias forisHarnessCompactSpacer, with all 3 call sites insidecompactor.ts(no external consumers). Inlined the call sites and deleted the alias.Verification
bun test ./src/session/compactor-pairing.test.ts ./src/session/compaction-archive.test.ts ./src/context-compactor.test.ts— 70 pass, 0 fail.bun run typecheck(tsc --noEmit) — passes.oxfmt --check+oxlinton the 4 changed files — clean.Fixes CL-10511
Plan: https://linear.app/abklabs/issue/CL-10511/remove-dead-code-and-inert-aliases-in-session-compactor