Repository navigation
polylogue.rows: Polylogue's archive units in primary mode - #2779
Merged
Merged
Conversation
…y mode Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
One archive write can store several units, so the write counter alone does not name a unit. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
Sinity
added a commit
to Sinity/polylogue
that referenced
this pull request
Oct 19, 2026
…from stored bytes (#6304) Polylogue's `primary` mode on Sinex (architecture 7.1; epic plnext-3sx), and the rebuild proof (joint #7). **The loop builds the index from stored bytes.** A deleted or outdated `index.db` is built again by the same loop from what `archive.db` stored, read by range through `hashed-blobs`, even when the provider file moved or went. This is also what lets a standalone archive rebuild without its files. Two engine tests cover it. **`crates/sinex` (`polylogue-sinex`, behind the `sinex` feature; the default build has no NATS dependency):** - Publish: every input blob is placed into Sinex's content store (same host) and registered as a material; every unit of `archive.db` rows (a revision with its input, extents, observations and blob rows; a note with targets and relations; an excision; a setting; a delivery) travels as a record-batch material plus one `polylogue.rows` event (Sinity/sinex#2779). Frames are named by what they carry, units by their position in write order, so the publish step asks Sinex (`have`, by bisection) and sends only the rest; nothing local records what was sent. - Restore: an empty archive reads its units from the confirmed stream in order, checks each batch whole and contiguous positions, inserts the rows, and takes over the archive's identity and write counter. The loop then builds `index.db` with Sinex's store as an extra blob root. - Daemon: `$XDG_CONFIG_HOME/polylogue/sinex.toml` with `mode = "primary"` adds Sinex's store as a blob root, restores an empty archive named by `archive = "<id>"`, and publishes once a minute. A file that does not parse pauses publishing and never switches mode. - The row codec lives in `polylogue-store::rows` (only the store opens SQLite); `archive.db` now carries an `archive_id`. **Proof** (`crates/sinex/tests/proof.rs`, ignored by default; how to run it is in `docs/development.md`): the Claude Code examples converge standalone, publish to a real `sinexd` over a throwaway PostgreSQL and NATS (a second publish sends nothing), restore into an empty archive, converge with no provider files present, and every session and message comes back identical. Passed (18 s). Verification: `xtask fast`; nextest on store, engine and sinex (56 passed); the proof run against `sinexd` built from Sinex #2779. Not done (follow-ups filed): normalized segments and object-level equivalence keys (joint #3–#5); excision orders across the boundary (joint #6, #19); the pending area that drops local copies once Sinex confirms; tables without `local_seq` (`kept_result`, `variant`, `variant_alignment`, `notice_delivery`) and `delivery_event`s added after their delivery's publish; publishing from another host (bytes over NATS); the real-corpus rebuild before any cutover. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
The Sinex side of Polylogue's
primarymode (architecture §9; sxnext-8er).polylogue.rows: one unit of a Polylogue archive'sarchive.dbrows (a revision with its input, extents, observations and blob rows; a note with its targets and relations; an excision; a setting; a delivery). The rows travel as a record-batch material; the event is anchored at its start and names the input blobs the rows cite, each a material placed before it. Keyed by archive and position (the unit's place in the archive's write order, which only appends), so a resend is a repeat and Sinex holds an archive whole up to its first missing position. Sinex never parses either.ingress/tests.rs: units are admitted once by archive and position, a resend in a new frame is a repeat,haveanswers per frame.Polylogue's rebuild proof (Sinity/polylogue,
crates/sinex/tests/proof.rs) drives these frames through a realsinexdover PostgreSQL and NATS: an archive published, restored into an empty archive and rebuilt with no provider files gives identical answers.Verification:
xtask check(fmt, boundaries, clippy) passed;xtask test ingress5/5;sinex-modelkind test.🤖 Generated with Claude Code
https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em