Skip to content

fix(types): preserve compression detail config shapes - #8812

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.49from
backryun:chore/ts7-types-compression-details
Jul 28, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.49from
backryun:chore/ts7-types-compression-details

Conversation

@backryun

Copy link
Copy Markdown
Contributor

Part of #8484. Three unnecessary type erasures, three diagnostics, zero new.

Root cause

resolveStepDetailConfig() forced HeadroomConfig, SessionDedupConfig, and CcrConfig
through Record<string, unknown> assertions even though its only consumer immediately spreads the
returned detail object into stepConfig. These interfaces intentionally have specific fields and
no string index signature, so the assertions triggered TS2352.

This removes the explicit Record return annotation and the three assertions, allowing the
existing detail-config union to flow into the spread operation. Returned values and pipeline
behavior are unchanged.

Diagnostics

Measured independently against release/v3.8.49 at 0eeb8f45c:

  • TypeScript 6 open-sse diagnostics: 150 → 147
  • TypeScript 7.0.2 native diagnostics: 149 → 146
  • Full line-number-agnostic error-set diff: 3 fixed, 0 new

With #8809, #8810, and #8811 included, the cumulative projection is
TS6 137 / TS7 136.

Validation

  • npm run typecheck:core
  • Compression detail persistence, Headroom merge, and stacked-pipeline integration tests —
    14/14 passed
  • ESLint on open-sse/services/compression/stepDetailConfig.ts
  • npm run check:file-size
  • Prettier and git diff --check

No new runtime test was added because the returned objects and merge order are unchanged, while
the existing focused tests cover all three persisted detail sections and the stacked-pipeline
consumer.

@backryun
backryun marked this pull request as ready for review July 27, 2026 23:16
@backryun
backryun requested a review from diegosouzapw as a code owner July 27, 2026 23:16
@diegosouzapw
diegosouzapw merged commit 5f5f4a5 into cheaper-inference:release/v3.8.49 Jul 28, 2026
13 checks passed
@backryun
backryun deleted the chore/ts7-types-compression-details branch July 28, 2026 02:14
@diegosouzapw diegosouzapw mentioned this pull request Jul 28, 2026
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants