Skip to content

feat(session): verify compaction spine and record adopted handoffs - #1154

Merged
TheGreatAxios merged 11 commits into
mainfrom
cl-8741-compaction-verify-pass-so-the-goal-survives-many-folds
Sep 22, 2026
Merged

TheGreatAxios merged 11 commits into
mainfrom
cl-8741-compaction-verify-pass-so-the-goal-survives-many-folds

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

Compaction verify pass so the goal survives many folds: after each fold the spine is scored against continuation facts (goal, state, next action, constraints, verification, blockers, exact names). Missing facts are repaired deterministically; contradicting summaries abort the fold instead of shipping a lying spine. Adopted handoffs are recorded in the evidence archive so later folds can drop the spine, and the summarizer excerpt pins the initiating goal ahead of the recency window.

Target release: 0.3.31.

Verification

  • bun run check: exit 0, 7838 pass, 0 fail across 528 files
  • tests/integration/compaction-baseline.test.ts: three consecutive folds persist with 4/4 continuation facts recovered after each
  • tests/integration/compaction-atomicity.test.ts: adopted handoff is recorded so the next fold can drop the spine

Fixes CL-8741

@linear-code

linear-code Bot commented Sep 21, 2026

Copy link
Copy Markdown

CL-8741

@TheGreatAxios
TheGreatAxios force-pushed the cl-8741-compaction-verify-pass-so-the-goal-survives-many-folds branch from 60d4aee to 530405f Compare September 22, 2026 15:11
@TheGreatAxios
TheGreatAxios enabled auto-merge (squash) September 22, 2026 15:17
A repaired summary spine changes bytes, so the evidence gate reads
the next fold's dropped spine as uncovered and rejects every later
fold. Score the spine against continuation facts, repair or abort,
and record each adopted handoff for the archive to certify.
A cap that slices the repair tail used to ship a spine that still
missed exact names, and the scorer treated auth as present inside
authored. Abort any residual after the cap, and match tokens on
word boundaries.
A tight cap used to slice exact names off the repair tail. Put goal,
next action, and exact names first so truncation keeps the facts the
next agent needs, and restore real verify coverage on the truncation
path.
Re-scoring the aborted original summary was tautological. Assert the
outcome misses, add a roomy-cap repair control, abort on a constraint-only
residual, and reject author/preauth as auth hits.
Substring includes let oauth.ts cover auth.ts. Match names on token
boundaries, emit only missed constraint/blocker/verification lines,
and assert a real verify signal after folds.
Interior dots join filenames and hostnames so vite.config.ts does not
cover config.ts. HTTP URLs lowercase before hostname scoring. Drop unused
ContinuationFacts.state.
`new URL` keeps a trailing period in the hostname, so a summary that
names api.com misses Call HTTP://API.COM. as an exactName.
Bun-hosted ts-prune under-reports unused exports on Linux, so CI
treats a still-valid allowlist as stale. Launch the CLI with node.
@TheGreatAxios
TheGreatAxios force-pushed the cl-8741-compaction-verify-pass-so-the-goal-survives-many-folds branch from 530405f to 592049e Compare September 22, 2026 15:26
@TheGreatAxios
TheGreatAxios merged commit 25aa6c5 into main Sep 22, 2026
13 checks passed
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