Repository navigation
fix(off_record): a room save carries the room handles its NOTE, CLAIM and shell name into vault custody (FIX ROOM-CUSTODY-SAVED-ARTIFACTS) - #10019
Open
olety wants to merge 4 commits into
Conversation
…e names its base custody record (FIX ROOM-CUSTODY-SAVED-ARTIFACTS) A selected save (vault.off_record.artifacts.save) lands a NOTE or a CLAIM an off-record room holds. One that quotes the room handle of a key the room keeps in its own custody must land naming the handle of a base custody record that holds the key, never the room handle or the key, and only that save teaches base's known-value index the fingerprint. A later save of a claim quoting the same room handle takes the same base record. On the stack top (cb53bdf) the saved NOTE's markdown and the saved CLAIM's value keep the room handle as written.
… and shell name into vault custody (FIX ROOM-CUSTODY-SAVED-ARTIFACTS) A room keeps a fresh key in its own custody, under a room handle (`[secret r1]`), and a NOTE, CLAIM or conversation shell the room holds may quote that handle. The room save carried the handles a saved turn's rows name (carry_room_secrets_in_txn), but a selected save (vault.off_record.artifacts.save) landed its NOTE, CLAIM and shell as written: the saved row named a room handle that names nothing outside the room, and the key never reached the vault's custody. batch/secret_scan/mask/room_carry.rs: RoomCarry is one save's carry out of a room (RoomCarry::of). Beside a save's rows (ops_in_txn, as before) it carries one MessagePack value (value_in_txn) and one text (text_in_txn: the carried text and each span it replaced). Each room handle takes the handle of a base custody record holding the value: the one this save moved it to, else the one base custody holds it in, else one minted now; only that mint teaches the known-value index the fingerprint. carry_room_secrets_in_txn stays the turn rows' wrapper. off_record/promote.rs: FloorWrites::room_carry, the carry of the room a floor saves out of. off_record/lifecycle/scratch.rs: PreparedScratchSave::land carries each artifact in the save's transaction before it lands, through one carry: a NOTE's live text and title (note/saved.rs carry_room_secrets_in_txn: the document takes each base handle as a mask on write takes a handle, at its span, with the mask's commit; the NOTE row holds no text; each pin keeps the quote its hash binds), a CLAIM's opaque values (val, evid, scope) before its rows are built, and a shell's row as a turn's rows are. Stored change: keep (a saved row names a base custody handle, as before).
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
|
Warning Review limit reached
This review includes 7 billable files and costs up to $1.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 54 minutes for your next included review. View limit details
|
…ts layer (REVIEW-10003, FIX ROOM-CUSTODY-SAVED-ARTIFACTS)
…s (REVIEW-10003, FIX ROOM-CUSTODY-SAVED-ARTIFACTS) Since REVIEW-10003 a field the side-row wall lifts whole in a room holds the bare room handle (`r0123456789abcdef.1`), and a room's handles are spelled with the room's own tag. RoomCarry::text_in_txn now carries a whole text that is a bare room handle to the bare base handle of the record that holds its value, as a field a base mask lifted whole holds `sc12`. The row filter looks for the handles the room keeps, bare or in a text, in place of the `[secret r` opening alone. tests/room_custody_saved_artifacts.rs: a claim whose whole value is the bare room handle lands holding the bare base handle of the same record.
This branch has not been deployed
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.
FIX ROOM-CUSTODY-SAVED-ARTIFACTS (P3; the part of ROOM-LOCAL-CUSTODY the stack #10002-#10004 left out). Built on #10004's branch, not linked into its stack; it is retargeted to main once the stack lands.
What was wrong
An off-record room keeps a fresh key in its own custody, under a room handle (
[secret r1]), and a NOTE, CLAIM or conversation shell the room holds may quote that handle. #10004 carries the room handles a saved turn's rows name into vault custody, but a selected save (vault.off_record.artifacts.save,OffRecordSession::save_artifact_as/save_artifact_by) landed its NOTE, CLAIM and shell as written: the saved row named a room handle that names nothing outside the room, and the key never reached the vault's custody. It failed closed (no value reached base).Change
batch/secret_scan/mask/room_carry.rs:RoomCarryis one save's carry out of a room (RoomCarry::of). Beside a save's rows (ops_in_txn, the loopcarry_room_secrets_in_txnran before), it carries one MessagePack value (value_in_txn) and one text (text_in_txn: the carried text and each span it replaced). Each room handle takes the handle of a base custody record that holds the value: the one this save moved it to, else the record base custody holds it in, else one minted now. Only that mint teaches the known-value index the fingerprint.carry_room_secrets_in_txnstays as the turn rows' wrapper.off_record/promote.rs:FloorWrites::room_carry, the carry of the room a floor saves out of.off_record/lifecycle/scratch.rs:PreparedScratchSave::landcarries each artifact in the save's transaction before it lands, through one carry:note/saved.rsPreparedSavedNote::carry_room_secrets_in_txn): the document takes each base handle the way a mask on write takes a handle (NoteDocument::mask_bodyat the carried spans,mask_title, with the mask's commit). The NOTE row holds no text (NoteCore). Each pin keeps the quote its hash binds;val,evid,scope), before its rows are built from the body;Stored change: keep (a saved row names a base custody handle, as before).
No new verb, grant or attestation.
Tests
New stem
crates/oneiron/tests/room_custody_saved_artifacts.rs(public doors:create_note_in_session,claim_upsert_in_session,save_artifact_as; reads through theoneiron_test_supportdoors of #10002):a_saved_note_names_the_base_record_of_the_room_secret_it_quotesa_saved_claim_names_the_base_record_of_the_room_secret_it_quotes(a second claim quoting the same room handle takes the same base record)Red at the test commit 70c3f80 (on #10004's head), green at the head; runs booked in the lane's proof chain.
RUSTFLAGS="--cfg oneiron_test_support" cargo test --locked -p oneiron --all-features --test room_custody_saved_artifacts