Skip to content

Heal torn base tails on write and keep failed rewrite commits on HEAD - #899

Merged
TheGreatAxios merged 1 commit into
mainfrom
fix-session-store-test-failures
Sep 11, 2026
Merged

Heal torn base tails on write and keep failed rewrite commits on HEAD#899
TheGreatAxios merged 1 commit into
mainfrom
fix-session-store-test-failures

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • writeTurns no longer crashes on a torn or poisoned turns.jsonl base tail — it falls back to the same resilient on-disk parse load() uses, so the write that heals the file can actually run
  • A failed compact commit now restores the working-tree turn segments to the published generation instead of leaving the uncommitted rewrite on disk for the next load() to serve
  • The commit-failure test now forces a real rejection under isomorphic-git (which never runs .git/hooks/*) by replacing .git/objects with a regular file — the previous commit-msg hook mechanism could never fail the commit it claimed to exercise
  • assemble-runtime tests mock createSessionStores — the boundary buildAgent actually calls since the store-factory split — instead of the inner createOptimizedContextStore that no longer runs there

Test plan

  • bun test src/session/optimized-context-store.test.ts src/session/assemble-runtime.test.ts — 40 pass
  • bun test ./src/session — 206 pass
  • bun run typecheck — clean

@TheGreatAxios
TheGreatAxios force-pushed the fix-session-store-test-failures branch from 36fadb5 to 2c7db78 Compare September 11, 2026 02:43
@linear-code

linear-code Bot commented Sep 11, 2026

Copy link
Copy Markdown

CL-7700

@TheGreatAxios
TheGreatAxios force-pushed the fix-session-store-test-failures branch from 2c7db78 to 96066e6 Compare September 11, 2026 03:07
@TheGreatAxios
TheGreatAxios merged commit 440b9cb into main Sep 11, 2026
9 checks passed
@TheGreatAxios
TheGreatAxios deleted the fix-session-store-test-failures branch September 11, 2026 03:09
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.

1 participant