Skip to content

refactor(session): replace compactorNoOpFloor with a constant - #1401

Merged
corbits-triage[bot] merged 1 commit into
mainfrom
cl-10512-compactor-noop-const
Oct 12, 2026
Merged

corbits-triage[bot] merged 1 commit into
mainfrom
cl-10512-compactor-noop-const

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the compactorNoOpFloor() function in src/session/compactor.ts with the exported constant COMPACT_NOOP_FLOOR = 1 at a single source.
  • src/agent/compaction.ts derives MIN_TURNS_TO_COMPACT from the shared constant; the other callers import it directly: src/agent/compaction.test.ts, src/agent/director.test.ts, src/context-compactor.test.ts, src/subagent/nudge-director.test.ts.
  • Behavior-neutral: the value stays 1, and no call site passes the function as a callback, so a constant substitutes everywhere.

Verification

  • Compaction suites pass: 270 pass / 0 fail (compactor-pairing, compaction-archive, context-compactor, agent/compaction, agent/director, subagent/nudge-director)
  • bun run typecheck passes
  • oxfmt --check and oxlint on changed files: clean

Follow-up to CL-10511

Fixes CL-10512

@linear-code

linear-code Bot commented Oct 12, 2026

Copy link
Copy Markdown

CL-10512

@corbits-triage

Copy link
Copy Markdown
Contributor

No changes needed from you. A maintainer will review this pull request.

@corbits-triage
corbits-triage Bot merged commit 477d403 into main Oct 12, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant