Repository navigation
fix(compaction): align token events and presentation with upstream - #54
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
Pre-merge verification: CI run 34555495168 reproduces main run 34553757656: Check has the same existing diagnostic rules/files (18 errors, 37 warnings), and Server 3 has exactly the same 15 ProviderCommandReactor failures. Server 3 otherwise passes 1052 tests. Test, Server 1/2, Rust, release smoke, native fingerprint, and thread-transfer budget checks pass. No review findings. Local native Claude compaction completed with the expected token-count separator and persisted after reload; screenshots are attached. No CI gates were changed or disabled. |
|
Deployment verification: squash commit 65adb01 is live on compadre-web, Render deploy dep-dahmn5u7bikc73e938i0, finished 2026-09-11 02:52:32 UTC. New instance srv-da73c4p5efls738hsesg-qsxd7 reports Listening and server ready; PostgreSQL migrations completed with 0 applied. GET https://compadre.comprehensive.io/ returns HTTP 200 after the expected restart interruption. Authenticated native compaction and reload were verified in the isolated local Claude browser test documented above, not on a hosted user thread. Hosted browser acceptance remains user-owned; existing worker generations were not restarted, so token-count production verification requires a new/restored updated worker. The isolated dev server and evidence browser have been stopped; the implementation worktree is clean. |
Compaction ran natively, but Compadre omitted upstream's token-count data path and used the completion separator for in-progress work. Align those pieces with upstream so future merges have less custom presentation to reconcile.
Port the optional before/after token fields, Claude boundary mapping, usage fallback, and summary formatting from upstream pingdotgg#9293. Reuse its working-row compaction label and pingdotgg#9623 folding behavior. Preserve the hosted durable action transport and immutable native-event replay; document the source commits and remaining differences.
Validation: 273 focused tests pass, including Claude events, server projection, native worker-to-central replay, command cancellation, and rendered timeline states. Web/server typechecks and targeted lint pass (one existing lint warning). Contracts typecheck reproduces the unchanged
compadrePreviews.test.ts:9Effect globalDate failure on the base worktree.Rollout: the root web/server service auto-deploys. New/restored Modal workers pick up the updated fork; already-running workers and historical receipts retain their existing summaries. No controller changes, worker replacement, history rewrite, or unrelated event-delivery fix is included.
Browser verification: an isolated local Claude session completed native manual compaction and displayed
Compacted context 31.9K → 5.31K tokens; the label persisted after reload. The native provider reported 31,948 before and 5,307 after. No hosted user threads were operated.Before: generic completion label · After: native working status · After: native completion · Token-count layout fixture.
Implemented with GPT-5 in the Codex harness.