Repository navigation
id: program gallery read surface (list, fetch, search) and --gallery-dir - #11690
Merged
Merged
Conversation
The gallery's public read surface (#10003, v3 design G1, G3, G7) over the registry core from #11500. - Bundle manifests gain signed discovery metadata: an optional description and up to 8 portable categories, bounded and checked at export and decode. - id-worlds program_gallery: a SearchIndex rebuildable from registry records alone, with the documented deterministic order (exact name, then category, then most recent version; no engagement ranking), and a Gallery that keeps the index in step with publish, unpublish and remove. - id-web /api/gallery/records, /bundles/{hash} and /search, cacheable (bundles immutable by content hash), 404 when no gallery is wired. - id serve --gallery-dir <dir> (requires --web) verifies every stored bundle at start and serves them. Closes #10003 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dezren39
marked this pull request as ready for review
November 18, 2026 06:18
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Before: the registry core from #11500 could hold verified program bundles, but no server exposed them, bundles carried no discovery metadata, and nothing could search them.
After:
id serve --web --gallery-dir <dir>serves a public gallery read surface. It lists signed records, fetches bundles by content hash, and searches the authors' signed descriptions and categories in a fixed, documented order.This implements v3 design G1 (the endpoint is a read surface over D6, unchanged), G3 (search over signed metadata from a rebuildable index, deterministic order, no engagement ranking) and G7 (answers are cacheable because records are signed and bundles are content-addressed).
How:
program_bundle.rs:BundleManifestgains optional signeddescription(at most 4096 bytes) andcategories(at most 8, lower-case ASCII, digits and-, no repeats). They are omitted from the JSON when absent, so existing bundles decode unchanged.ProgramSpecgains matching fields.program_gallery.rs(new, id-worlds):SearchIndex::rebuild(records)indexes only records that verify.searchmatches every query word against name, description, categories and author key.Gallerywraps aRegistryand keeps the index in step with publish, unpublish and remove;rebuild_index()recreates it from records alone.id-web/src/gallery.rs(new):GET /api/gallery/records?author=&name=andGET /api/gallery/search?q=&category=&limit=return JSON records withCache-Control: public, max-age=60. Search answers also state their order.GET /api/gallery/bundles/{hash}returns the exact bundle bytes, immutable, with the hash as the ETag; a malformed hash gets 400.AppState::set_gallery. The routes sit inside the listener's existing security guard.id serve --gallery-dir(requires--web, envID_GALLERY_DIR) opens the directory withRegistry::open_dir, which verifies every bundle and fails the start on a bad file. There is no publish route: the operator decides what goes in the directory, so the admission-posture question in the v3 design stays open.Testing:
cargo test -p id-worlds --lib -- program_passes (50), including 9 gallery tests: ordering, category filter, limit, permutation-invariant order, rebuild, withdrawal tracking, unverifiable records and query length, plus a discovery-metadata signing and bounds test.cargo test -p id-web --libpasses (723), including 4 route tests.cargo checkpasses foridand forid-cliwith and withoutweb.Closes #10003
Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.