GeezerVison is showing github.com — Wire the blob membership gate into id serve (#173) — crate-split port of #7181 by dezren39 · Pull Request #9734 · developing-today/code
Conversation
dezren39
commented
Nov 14, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
What
The crate-split port of PR #7181 (task 13492, lane any-a). PR #7181 carried the blob membership gate wiring for #173 but was authored against the pre-split pkgs/id layout; the pkgs/id crate split (#4407/#4408) then moved every file it touches, leaving it CONFLICTING with no rebase path. This PR cherry-picks #7181's five commits and relocates their changes onto current main at the post-split homes:
id-groups::blob_gate: decide_with_local (local-reader trust), build_reference_index, hashseq_children; blob_events/blob_events_with_blocks take the local_readers set and compose local trust ahead of membership/block verdicts.
id-worlds::blob_gate: FoldedWorlds gains the group-projection membership mode (world_key, fold_group_events, group_projection_member) and RefreshingWorlds.
id-cli serve: build_blob_gate (group-log fold + the store's document references, with the bounded HashSeq expansion from the Wire the blob membership gate into id serve (#173) #7181 review), the gated BlobsProtocol wiring with node key + client key as local readers, and the refresh task; LocalNode::set_blob_gate for embedders.
id-events: EventStore::document_references + the LocalEvents wrapper.
- Facade: the new names are re-exported at the historical
id::blob_gate paths.
Closes #173. Supersedes #7181 (closed with a salvage note; every file in its diff has a counterpart here — see the file mapping in the closing comment there).
Codex findings from #7181 — disposition
All three findings were fixed in #7181's head fa56e7e7d1 and are carried into this port, re-verified by tests at the ported head:
- P1 local reads locked out when the gate is enabled →
decide_with_local + local readers in serve/LocalNode; covered by a_local_reader_fetches_an_unreferenced_blob_but_a_stranger_cannot and the peer-level tests in tests/blob_gate.rs.
- P1 design record required before activating authorization wiring →
doc/2026-11-13T09-00-00Z_design_blob_gate_authorization_wiring.md, included unchanged.
- P2 unbounded HashSeq reference-index reads → expansion only for group-referenced blobs, read only when the store status reports a positive multiple-of-32 size ≤
MAX_HASHSEQ_BYTES (1 MiB), in build_blob_gate.
Tests (laptop, this head)
cargo check -p id-groups -p id-worlds -p id-events -p id-cli -p id --all-features — pass.
cargo test -p id-groups --lib — 118 passed. -p id-worlds --lib — 637 passed. -p id-events --lib — 289 passed. -p id-cli --lib — 671 passed.
cargo test -p id --test blob_gate — 16 passed; --test documents — 10 passed; --test content_removal — 12 passed.
- The three Codex fix behaviors are covered at the ported head: local client-key fetch of an unreferenced blob admitted, remote non-member refused, reference-index build does not read ungrouped blobs (bounded expansion in
build_blob_gate + hashseq_children/build_reference_index unit tests).
One note: an early combined test run showed 6 failures in unrelated suites from stale pooled-target binaries (code#8392 pattern); a clean re-run of the identical command was fully green, as were the per-package runs.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The blob gate (blob_gate::decide/blob_events) decided fetches and observes
from a reference index that had no producer, so it was never wired into a
serving path and blobs were served to any peer.
- blob_gate: build_reference_index (with transitive HashSeq children),
hashseq_children, fold_group_events (group log -> Worlds, world key =
group create-hash hex), RefreshingWorlds (producer-swappable fold).
- event_store: EventStore::document_references — applied, unremoved
document.put events as (blob hash, group) pairs; LocalEvents exposes it.
- serve: when the event store is open (web UI), BlobsProtocol runs the
gate handler (push still decided by the AccessPolicy); a refresh task
re-folds on the group-warning cadence so removals revoke fetch. Without
the store, serve keeps push-only handling and warns the gate is inactive.
- local: LocalNode::set_blob_gate lets an embedder supply the gate to
serve(); default behavior unchanged.
- groups::worlds::Worlds::empty for fail-closed fallbacks.
Tests: blob_gate producer tests (index + HashSeq attribution, group-log
fold gating, refresh revoking a removed member); existing suites pass.
fold_group_events partitioned the group log by world, but
GroupLog::record names the log's global heads as after, so any second
group's events name dependencies living in another partition. fold::index
rejects those partitions with MissingDependency and build_blob_gate
failed the whole gate closed, denying even authorized members.
Keep only intra-partition after edges: ordering inside a world is
preserved and membership reads each world's own projection, so no
authority is lost.
Adds a regression test with two groups where the second create names
the first group's events, as a real group log would.
… design record (#173)
P1 (serve wiring): the gate now trusts the node's own key and the data
directory client key as local readers (decide_with_local), mirroring
build_access_policy — the local CLI/REPL keep reading locally published
(group: None) and uploaded blobs with the gate on; remote peers still
need world membership for every hash.
P2 (reference index build): HashSeq expansion only considers
group-referenced blobs and reads a blob only when the store status
reports it complete with a positive multiple-of-32 size no larger than
MAX_HASHSEQ_BYTES (1 MiB), so index building no longer loads whole
documents into memory to guess at collections.
P1 (docs): dated design record for the authorization wiring —
reference source, HashSeq inference, refresh/revocation timing, local
trust, and the ungated non-web behavior — per pkgs/id AGENTS.md.
Tests: blob_gate lib 19 passed (new decide_with_local unit test),
blob_gate integration 11 passed (new peer-level local-reader test:
local reader fetches an unreferenced blob, stranger refused),
documents 7 passed, content_removal 5 passed; cargo check --features
web passes.
The five shepherd commits were authored against the pre-split pkgs/id
layout. This commit relocates their changes onto current main:
- id-groups::blob_gate: decide_with_local, build_reference_index,
hashseq_children; blob_events/blob_events_with_blocks take the
local_readers set and compose local trust ahead of membership.
- id-worlds::blob_gate: FoldedWorlds gains the group-projection
membership mode (world_key, fold_group_events,
group_projection_member) and RefreshingWorlds.
- id-cli serve: build_blob_gate + gated BlobsProtocol wiring and the
refresh task, at the post-split paths; LocalNode::set_blob_gate.
- id-events LocalEvents::document_references wrapper.
- Facade re-exports the new names at the historical id::blob_gate
paths; the resurrected pre-split serve.rs/local_events.rs are
removed again.
…e-abuse MetaProtocol construction, pass the resolved groups log path to build_blob_gate
Codex Review Summary: ❌ Failed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
❌ Failed 2026-11-14T05:05:02.018734Z We couldn’t complete this review. Comment @codex review to try again. |
af6e057 |
PR opened |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 34 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
35f3a966-5526-42aa-b98b-172b248b5019
Commits
-
Reviewing files that changed from the base of the PR and between 65876ae and af6e057.
Files selected for processing: 12
-
doc/2026-11-13T09-00-00Z_design_blob_gate_authorization_wiring.md
pkgs/id/crates/id-cli/src/commands/serve.rs
pkgs/id/crates/id-cli/src/local.rs
pkgs/id/crates/id-events/src/event_store/documents.rs
pkgs/id/crates/id-events/src/local_events.rs
pkgs/id/crates/id-groups/src/blob_gate.rs
pkgs/id/crates/id-worlds/src/blob_gate.rs
pkgs/id/crates/id-worlds/src/groups/worlds.rs
pkgs/id/src/blob_gate.rs
pkgs/id/tests/blob_gate.rs
pkgs/id/tests/content_removal.rs
pkgs/id/tests/documents.rs
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🤖 Agent note · task 13492 — closing as superseded by PR #9723 (merged)
While this port was in verification, the parallel shepherd task 5874 lane (repo-worker-tmp-code-b) merged PR #9723, "Port blob gate wiring from #7181 onto the pkgs/id crate split (#173)" — the same port, independently built. Salvage check before closing: every behavior in this PR is present on main via #9723 — decide_with_local, build_reference_index, hashseq_children, fold_group_events, world_key, RefreshingWorlds, LocalNode::set_blob_gate, the bounded MAX_HASHSEQ_BYTES HashSeq expansion, EventStore::document_references, the design record, and the local-reader tests in both the unit and tests/blob_gate.rs suites (all verified by fresh git grep + file mapping against origin/main). The remaining tree differences are presentational (which crate hosts which test, a lib.rs shim vs facade imports). Nothing unique is lost by closing this PR.
This PR's own verification (all green at its head): cargo check --all-features for the five crates; lib suites id-groups 118, id-worlds 637, id-events 289, id-cli 671; integration blob_gate 16, documents 10, content_removal 12.
Codex: the review on this PR failed on Codex usage limits and produced no findings; the three #7181 findings were dispositioned on #7181 and are test-covered on main.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 14, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|