Skip to content

ruvnet-brain: content-addressed corpus releases, sig/receipt recorded - #15

Merged
jjohare merged 2 commits into
mainfrom
ruflo/brain-corpus-sha
Oct 3, 2026
Merged

jjohare merged 2 commits into
mainfrom
ruflo/brain-corpus-sha

Conversation

@jjohare

@jjohare jjohare commented Oct 3, 2026

Copy link
Copy Markdown
Member

The ingest now handles upstream's signed, content-addressed corpus generations (corpus-sha256-<archive digest>). This PR is the CI vehicle; per the owner it lands on main once CI is green.

  • Release selection: the ingest now takes GitHub's designated /releases/latest. The list API had ordered v4.5.2 ahead of the promoted corpus-sha256-832bae01…, so the old first-in-list logic would have stamped the wrong corpus. It falls back to the list only when the designated release has no zip.
  • Content-addressing proof: .zip.sha256 must equal the tag digest, checked before the download, and the downloaded bytes must hash to it.
  • Signature and receipt: .zip.sig and corpus-receipt.json are fetched beside the zip. The receipt's archive digest must equal the zip digest, and the receipt must match the release body's Receipt SHA-256. The signature is only recorded: signature_verified: false with the reason "no published public key". No key is guessed.
  • Manifest: keeps the full tag and adds content_addressed, archive_sha256, sig_present, sig_bytes, receipt_sha256, receipt_matches_archive and shipped_runtime. ruvnet_brain_status gains a derived provenance block.
  • Skill: documents the tag scheme and the provenance fields. It states that npx ruvnet-brain is not our path, links the isovision.ai docs, and corrects the rebuild command to the serial REINDEX.
  • Tests: node --test tests/ruvnet-brain-ingest.spec.mjs runs 16 tests, all written red first.

Live reconcile, 2026-10-03: v4.5.1 → corpus-sha256-832bae01…. Of 162,292 chunks, 1,518 were embedded, 160,774 were unchanged and 450 were pruned, with 0 failures, in 9 min 9 s. The ingest does not rebuild the HNSW index; the serial REINDEX is a follow-up.

🤖 Generated by Claude Code

claude and others added 2 commits October 3, 2026 12:38
Upstream stuinfla/ruvnet-brain now publishes signed, content-addressed
generations (tags corpus-sha256-<archive digest>, with .zip.sig and
corpus-receipt.json). The ingest now:

- selects GitHub's designated /releases/latest, falling back to the list
  only when that release lacks the zip. The list API orders by creation
  time and put runtime release v4.5.2 ahead of the promoted
  corpus-sha256-832bae01…, so first-in-list picked the wrong corpus;
- for corpus-sha256-* tags, requires the published .zip.sha256 to equal the
  tag digest before downloading, and the bytes to hash to it;
- fetches .zip.sig and corpus-receipt.json beside the zip, refuses a receipt
  whose archive digest differs from the zip, or whose own digest differs from
  the release body's "Receipt SHA-256";
- records sig_present/sig_bytes, receipt_sha256, receipt_matches_archive,
  archive_sha256, content_addressed and shipped_runtime in the manifest, and
  keeps the full tag as corpus_version. signature_verified is always false
  ("no published public key"): no key is guessed;
- is import-safe (entry guard, pg loaded in main) so the pure helpers are
  unit-tested in tests/ruvnet-brain-ingest.spec.mjs (16 tests, node --test).

ruvnet_brain_status gains a derived provenance block. The skill documents the
tag scheme, the provenance fields, that `npx ruvnet-brain` (RVF into
~/.cache) is not our path, the isovision.ai docs link, and the serial
REINDEX the ingest does not perform.

Co-Authored-By: jjohare <github@thedreamlab.uk>
… on ADR-2104 and the skill

Co-Authored-By: jjohare <github@thedreamlab.uk>
@jjohare
jjohare merged commit 46b8eb4 into main Oct 3, 2026
8 checks passed
@jjohare
jjohare deleted the ruflo/brain-corpus-sha branch October 7, 2026 07:28
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.

2 participants