codeburn/docs
iamtoruk fb1bde94b7 fix(sync): hold a copilot session until its reconciliation can no longer change
The sent-ledger is append-once and the OTLP span id derives from the same
deduplication key, so the pipeline assumes a served call is immutable: same
key, same value, forever. Copilot's serve-time reconciliation is the first
producer that breaks that (#988), three ways inside one session — a shutdown
residual shrinks as the store rows covering it land, a rollup is dropped once
rows cover its leg, and an unpaired row becomes supplementary when its journal
call appears. Sent at an intermediate state, the receiver keeps that state
forever AND receives what supersedes it. Local reports re-reconcile every pass
and were never affected; this is only about what leaves the machine.

Value-versioned keys were the other option, but usage spans have no upsert
contract — receivers sum them, so a superseding span adds rather than
replaces. (Attribution can do it because its spans are documented as upserts
by `ai.session_id`.) Giving usage spans one is a receiver protocol change.

So: hold, do not re-key. Every input to the reconciliation is written during
the session, so a session quiet for 24 hours cannot reconcile further and its
first send is also its last word. The whole session is held, not just its
residual — holding the residual alone still ships a row whose pairing can
flip. Nothing is dropped: `held` is reported by --dry-run and by the
nothing-to-push line, and the next push after the window sends it.

Scoped by provider because copilot is the only reconciling producer; every
other provider's calls go out unchanged and undelayed.
2026-08-19 12:41:40 -07:00
..
design Scope the root test script to tests/ so npm test runs from a clean install 2026-08-09 10:19:58 -05:00
providers Merge origin/main into feat/copilot-session-store-landing 2026-08-19 12:29:33 -07:00
sync fix(sync): hold a copilot session until its reconciliation can no longer change 2026-08-19 12:41:40 -07:00
architecture.md cache: CODEBURN_CACHE_SCOPE=all forces a full shard read 2026-08-18 11:59:21 -07:00
optimize.md Merge remote-tracking branch 'origin/main' into feat/optimize-recurring-context 2026-08-18 03:31:16 -07:00