Skip to content

fix(session): stop the base store warning on every session load - #1491

Merged
bwachman merged 1 commit into
mainfrom
cl-10769-stop-the-base-context-store-failing-every-load-on-missing
Oct 17, 2026
Merged

bwachman merged 1 commit into
mainfrom
cl-10769-stop-the-base-context-store-failing-every-load-on-missing

Conversation

@bwachman

Copy link
Copy Markdown
Contributor

Summary

  • A cold session load reads the base turns.jsonl segment directly instead of going through the isogit base store's load(). That call validated metadata.json against a shape that requires tokenUsage, which now lives in the token-usage.jsonl sidecar, so every load logged base context store load failed; recovering base segment from disk and parsed turns twice.
  • A malformed metadata.json still warns, through the store's own metadata reader, and now warns once instead of twice. A torn final line in the base segment is dropped the same way extra segments already handle one.
  • The unused signal parameter on the live-turns read and the store's load is gone.

Verification

  • bun run check and bun run test pass, and the test output contains no recovering base segment warnings
  • The two new load-warning tests fail on main (the tokenUsage must be an object warning, and a duplicated malformed-metadata warning) and pass on this branch

Fixes CL-10769
Part of CL-10763

@linear-code

linear-code Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

CL-10769

CL-10763

@corbits-triage

corbits-triage Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Triage: Pass

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

The live-turns read went through the isogit base's load(), which also
validates metadata.json against the vendor shape. This store writes
token usage to the sidecar instead, so every cold load failed that
validation, warned, and re-parsed turns.jsonl from disk. Parse the base
segment directly; metadata already has its own lenient reader that
still warns on a malformed document. Relaxing the vendored schema would
add a ledgered patch for a file the base store no longer owns.
@bwachman
bwachman force-pushed the cl-10769-stop-the-base-context-store-failing-every-load-on-missing branch from fa6f3ab to e7098aa Compare October 17, 2026 03:54

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Approve

Stops the spurious base-store warning on every session load by parsing turns.jsonl directly instead of routing through the isogit base's vendor-shape metadata validation.

Findings

No findings.

@bwachman
bwachman merged commit 7cedbfd into main Oct 17, 2026
13 checks passed
@bwachman
bwachman deleted the cl-10769-stop-the-base-context-store-failing-every-load-on-missing branch October 17, 2026 05:14
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.

2 participants