Repository navigation
Conversation
Tags are claims: tag.set names a subject (any event ID), a name and an optional value, and tag.clear names the claims it removes. Both are signed events with the kind in the header and the body committed by hash. A clear removes a named claim only when the claim is in the clear's causal past: the transitive closure of its after hashes and backlink. Concurrent adds survive, and a clear of an unseen claim does nothing to it (S8). The store keeps each tag body in a tag_ops table, written when the event is kept, and reads applied tag events back for the fold. Format is now v7.
Each live claim is indexed as (subject, name, value, claim) and as (value, name, subject, claim) in tuple order, so prefix scans answer the tags of a subject, its tags by name and value, and the subjects with a value, in both directions. A bare tag's value is tuple null. Every text and byte field is terminated, so the name a does not match a NUL b. A property over random tags checks each scan against a filter.
The tag operation moves from a body beside the event into the signed header, as the ChainExt tag field. Sync moves events, so a receiver that has the event has the tag. A tag event takes no payload body, and its tag must fit its kind. The tag_ops table and its write path are removed. The store format is v8, because a v7 store holds tag events whose operation is not in the header. A tag value is at most 512 bytes, the most the header decoder declares for text.
A clear used to walk its causal past on its own, so the fold cost was clears times history. compacted_claims makes one pass over the parent links. Each event gets the set of live claims in its past, built from its parents' sets. A clear removes the claims it names that are in its parents' sets, and removed claims are dropped from every later set. The result matches live_claims, which stays as the reference. The property checks the two folds agree for histories of two or three writers, at 16 cases. A clear from an author who had not seen a claim leaves it live. The store's tag_claims uses the compacted fold. This is an in-memory fold, not a persisted snapshot at a causal cut (N33). Snapshots are open.
Keeps the two property failures as regressions. The regression file holds the persisted case, which replays under both properties. Two named tests use the exact (seed, steps, writers) of each failure: every event's causal past is the set its author had seen, and the store, the causal walk and the compacted fold all reach the oracle. Both fail until the generator fix.
…1, P5.3] The generator shadowed the writer count with the clear's claim count, so a clear's after named only the first 1 to 3 writers. The writer then had seen events its clear did not name, and the oracle counted them as seen while the causal past did not. The fold and the causal walk agreed on every history. The fix keeps the writer count in the frontier.
Records the root cause of the two tag property failures: the test history generator shadowed the writer count, so a clear's frontier named too few writers. The fold and the causal walk were not at fault.
Red: tests/aliases.rs states the four decided rules over the store's tag claims. src/aliases.rs holds the final API with stub bodies (no aliases, no rows), so each test fails on its assertion. Stubs are replaced in the next commit.
…s [P5.7] src/aliases.rs reads an alias as a tag.set named alias, on the object's ID. A view shows a pet name first, then the stored server primary (looked up by a group's ID), then one alias alone, or every alias as contested. Each row carries the shortest unique prefix of its ID, at least 7 hex digits, and the full ID when no prefix is unique. Nothing is unique. The creation date is not shown: the signed header has no time field (open).
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (28)
✨ Finishing Touches
Comment |
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.
Phase 5 of the id design.
Full run on the merged tree: 1479 passed, 9 ignored, 1 failed. The failure is serve_tests::test_world_module_shared_over_iroh_and_web_presentations (#190), which also fails on the phase-3 tip.
Open, in issues: #185 who may clear a claim, #160 user subject, #183 persisted tag index, #195 what removal does to new content (keep vs hide). Not run here: just crash-gate, nix checks.