Repository navigation
fix(T13867): a snapshot-only store is never up to date while the journal moved past the head - #2355
Merged
Merged
Conversation
…nal moved past the head On a checkpoint/v3 head, a store that is not on the change journal (no genesis cut with sync.push or sync.pull on) holds only the snapshot. Pull now refuses with E_NEXUS_VAULT_BEHIND, verify says behind and restore warns, naming the missing segments and the way forward. On a journal head, tables only snapshots carry no longer decide the verify verdict. Every request sends NEXUS_STREAM_READER_HEADER so a server can refuse v3 reads to clients that cannot read the journal (T13876). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a creates (T13885) tasks_goal comes from a legacy migration the fixture store lacks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
T13867 (under T12323). Local runs pending axiom hold: the touched test file, typecheck, build, gate 38 and gate 39 run here after "axiom slot released". Until then, CI is the test evidence.
Problem
A device that reads only snapshots (released 10.19, or a new build that restored and never joined the journal) holds only the newest checkpoint of a journal (v3) stream. Other devices' journal segments past that checkpoint are missing, yet
cloud pullsaidup-to-dateandcloud verifysaidmatch. Gate evidence: device m on 10.19 had 0 of 10 tasks.Fix (this repo)
journalUnreadcounts the segments past a v3 head'scoversSeq(headSeq - coversSeq). It applies only to a store that is not on the journal.sync.pushorsync.pullis on.cloud pull: where it saidup-to-date, it now refuses withE_NEXUS_VAULT_BEHIND, naming the missing segments. The fix text iscleo sync enable push, or a vault push from a device that writes the journal (its push checkpoints the journal).cloud verify: the verdict isbehind, with the same remedy.W_NEXUS_VAULT_JOURNAL_UNREAD.zz_vault_files, other databases, row-identity-exempt tables such asnexus_devicesandnexus_project_*) are listed but no longer decide the verdict. AW_NEXUS_VAULT_SNAPSHOT_ONLYwarning names them. This removes the gate's spuriousahead.NEXUS_STREAM_READER_HEADER(x-cleo-stream-reader: 3), one exported constant incloud/http.ts.Released 10.19 needs the server (T13876)
10.19 decides pull and verify from the checkpoint list alone and sends no version or capability header. No client change can make it report stale.
apps/api/src/routes/streams.ts.GET /v1/streams/:streamId/checkpointsand the head GET refuse a v3 stream with 409E_STREAM_VERSIONwhen the request lacks that header.Tests (nexus-vault.test.ts)
The test fake now has
streamReaderRequired, which applies the T13876 rule.up-to-dateand its verify saysmatch.E_NEXUS_VAULT_BEHINDand its verify saysbehind, both namingcleo sync enable push.match.E_STREAM_VERSION.tasks_goalrow on a journal store is listed as differing, the verdict staysmatch, and the warning names the table.Gates
--base origin/main).🤖 Generated with Claude Code