GeezerVison is showing github.com — id: tag scope — local-only vs shared claims, selectable and reviewable (#1793) by dezren39 · Pull Request #7344 · developing-today/code
Conversation
dezren39
commented
Nov 8, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
What
Tags in pkgs/id were always shared event-store claims (tag.set events, replicated to every peer) with no local-only variant and no scope choice. This adds the scope choice issue #1793 bullet 2 asks for, as an additive change that leaves existing claims meaning exactly what they meant.
How
TagScope (shared | local) on every live Claim, defaulting to shared.
- The signed
tag.set wire form is untouched. No field is added to TagOp::Set, so v1 event IDs and encodings are byte-identical and a shared claim is replicated exactly as before. (An earlier draft put the scope in the signed claim; that would have made local claims part of the replicated event chain, which is the opposite of the requirement, so it was dropped.)
- Local claims live in a new
local_claims store beside the event store (local-claims.jsonl, atomic rewrite via temp file + rename). They are never signed, never enter the event store, and therefore never enter the range-sync set. A test pins sync_entries() unchanged across a local set and a local clear.
LocalEvents::set_tag_scoped / set_tag_scope create a claim at a scope and move one between scopes. Moving to local records the local claim and then clears only this node's own claims by ID (clear_claim_ids), so another author's same-named claims are never touched.
tags_on, search and the new review_tags merge shared and local claims, each row carrying its scope. review_tags sorts local claims first so they are reviewable on their own.
- CLI:
id claim set SUBJECT NAME [VALUE] --scope local|shared, id claim scope SUBJECT NAME SCOPE, and id claim review (every visible claim with its scope).
- Petnames: already viewer-private by construction (local journal, never replicated, per
references.rs and petname.rs); pinned by the existing tests, so no change was needed. The shared surface that needed the scope decision is the tag claim store.
Acceptance against the packet
- Scope selectable at create/edit time, defaulting to today's shared behaviour, no migration that changes the meaning of landed claims (wire form untouched).
- Scope honoured: a local-only tag never leaves the node — not in the event store, not in the sync set, not in
tag_claims().
- Existing tags reviewable by scope:
id claim review / LocalEvents::review_tags.
- Petnames confirmed viewer-private by test.
- Tests cover create local vs shared, edit scope, local-only absent from the shared claim set, review listing shows scope.
Tests
cargo test --lib -- tag_claims:: tag_index:: local_events:: search:: aliases:: # 36 passed
cargo test --test tag_claims --test tag_index --test tag_clear_authority \
--test search --test documents --test aliases --test content_removal # all passed
New tests: local_claims::tests::* (round-trip, idempotence, ID boundary separation, author-scoped clear, tamper rejection, prefix parsing) and three local_events tests (local claim reviewable but sync set unchanged; scope edit local→shared→local; local clear signs nothing).
Refs #1793
![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.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
#1793)
Tags were always shared event-store claims with no local-only variant. This
adds the scope choice issue #1793 bullet 2 asks for, without changing what an
existing claim means.
- `TagScope` (shared | local) on every live `Claim`, defaulting to shared, so
already-landed claims decode and behave exactly as before. The signed
`tag.set` wire form is untouched: no field is added, so v1 event IDs and
encodings are unchanged and a shared claim is still replicated as it was.
- Local claims live in a new `local_claims` store beside the event store
(`local-claims.jsonl`, atomic rewrite). They are never signed, never enter
the event store, and therefore never enter the range-sync set — a test pins
the sync set unchanged across a local set/clear.
- `LocalEvents::set_tag_scoped` and `set_tag_scope` create and move claims
between scopes; moving to local copies then clears only this node's own
claims by ID, so another author's same-named claims are untouched.
- `tags_on`, `search` and the new `review_tags` merge shared and local claims,
each row carrying its scope.
- CLI: `id claim set --scope local|shared`, `id claim scope SUBJECT NAME
SCOPE`, and `id claim review` lists every visible claim with its scope.
- Petnames were already viewer-private (local journal, never replicated); the
existing tests pin that, so no change was needed there.
Tests: pkgs/id lib tag/claim/index/search/alias suites and the tag_claims,
tag_index, tag_clear_authority, search, documents, aliases and content_removal
integration tests all pass.
Refs #1793
coderabbitai
Bot
commented
Nov 8, 2026
•
edited
Loading
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 6 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:
a4ee0bb3-29a6-4207-bfdf-cd9259939824
Commits
-
Reviewing files that changed from the base of the PR and between cfd7efd and 3653ec9.
Files selected for processing: 10
-
doc/2026-11-08T06-25-00Z_design_tag_scope/2026-11-08T06-25-00Z_design_tag_scope.md
pkgs/id/src/aliases.rs
pkgs/id/src/cli.rs
pkgs/id/src/commands/claim.rs
pkgs/id/src/lib.rs
pkgs/id/src/local_claims.rs
pkgs/id/src/local_events.rs
pkgs/id/src/tag_claims.rs
pkgs/id/src/tag_index.rs
pkgs/id/tests/tag_index.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.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-08T06:28:45.626879Z |
3653ec9 |
New commits |
ℹ️ 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6124115dbc
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
Worker state note (task 12572, lane bf419306-c4ef-470f-a553-beabf93239de): this PR is the landed outcome of #1793 bullet 2. The worker's queue claim expired when the execution host restarted mid-run, before it could complete the task, so the queue row returned to queued with the work already pushed here. A resuming worker should verify this PR is still open and its head is 6124115dbc, then complete task 12572 as pr_opened, or merge under the standing criteria if checks are green and the diff matches intent.
Verified locally: cargo test for the pkgs/id tag/claim/index/search/alias suites and the tag_claims, tag_index, tag_clear_authority, search, documents, aliases and content_removal integration tests all pass.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Filter local->shared scope moves by author so one identity cannot publish another identity's local-only claims sharing the same event store; regression test pins it. Restore the established event field name in claim set output (list/search/review already use event; cli_tags/cli_documents consumers read it). Add the design record pkgs/id/AGENTS.md requires for the tag-scope feature (doc/2026-11-08T06-25-00Z_design_tag_scope).
Tests: cargo test --lib scope (32 pass incl. new test_scope_edit_to_shared_publishes_only_own_local_claims); cargo test --test cli_tags --test cli_documents (7+8 pass).
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 8, 2026
This was referenced Nov 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|