WIP: proto: block IDs with the server as authority (#671) #735

Closed
kayg wants to merge 1 commit from proto/block-identity-server into dev
Owner

Adds an isolated Rust server-authority prototype for ADR 0056 B1–B5. Devices address text by stable private handles, propose public IDs and retain offline proposal receipts. The server admits identity decisions once in ordered history, reserves retired IDs, keeps join aliases attached to their original owners and restores deletions only through the author’s delete receipt. Native Yrs carries text; there is no custom text replay protocol.

The format plugin preserves source bytes at file boundaries and owns marker parsing/writing. Device typing maintains an incremental rope from native Yrs deltas. Checkpoints cover server state and device outboxes. The design is in docs/design/block-ids-server.md; no app UI is wired.

Validation: fmt, workspace clippy with -D warnings and workspace tests pass. The native suite passes 13 authority/restart/file tests and all 41 ported break2 probes. The three-device break test passes 100,000 histories, seeds 671–100670, with 3,964,744 sync checks and no failing seed. Earlier runs exposed three fixed prototype bugs (seeds 713, 801 and 973). Issue #671 records the evidence, probe adaptations and all gate attempts, including missing dependencies, an auth migration assertion that passed on rerun, and corrected lints.

The random oracle checks delete receipts, link lineage, text tokens, unique live owners, marker-free projection and byte-exact file round trips. Shared vectors and focused tests check expected edited bytes. This bounded test does not establish exact intended file bytes for arbitrary Markdown histories.

Adoption limits remain: general splitting of joined fragment groups, colliding legacy note-local IDs across notes, browser/room and provisional-URL integration, general outside-file reconciliation, and transactional persistence/performance. Cold ambiguous imports are retained as conflicts. This draft is not a production adoption claim.

Related to #671. No merge or deployment.

Adds an isolated Rust server-authority prototype for ADR 0056 B1–B5. Devices address text by stable private handles, propose public IDs and retain offline proposal receipts. The server admits identity decisions once in ordered history, reserves retired IDs, keeps join aliases attached to their original owners and restores deletions only through the author’s delete receipt. Native Yrs carries text; there is no custom text replay protocol. The format plugin preserves source bytes at file boundaries and owns marker parsing/writing. Device typing maintains an incremental rope from native Yrs deltas. Checkpoints cover server state and device outboxes. The design is in docs/design/block-ids-server.md; no app UI is wired. Validation: fmt, workspace clippy with -D warnings and workspace tests pass. The native suite passes 13 authority/restart/file tests and all 41 ported break2 probes. The three-device break test passes 100,000 histories, seeds 671–100670, with 3,964,744 sync checks and no failing seed. Earlier runs exposed three fixed prototype bugs (seeds 713, 801 and 973). Issue #671 records the evidence, probe adaptations and all gate attempts, including missing dependencies, an auth migration assertion that passed on rerun, and corrected lints. The random oracle checks delete receipts, link lineage, text tokens, unique live owners, marker-free projection and byte-exact file round trips. Shared vectors and focused tests check expected edited bytes. This bounded test does not establish exact intended file bytes for arbitrary Markdown histories. Adoption limits remain: general splitting of joined fragment groups, colliding legacy note-local IDs across notes, browser/room and provisional-URL integration, general outside-file reconciliation, and transactional persistence/performance. Cold ambiguous imports are retained as conflicts. This draft is not a production adoption claim. Related to #671. No merge or deployment.
proto: make the server authority for block identities
Some checks failed
CI / server (pull_request) Successful in 1m15s
CI / rust (pull_request) Failing after 13m39s
CI / web (pull_request) Failing after 1h23m31s
0bfaff33ba
kayg changed title from proto: block IDs with the server as authority (#671) to WIP: proto: block IDs with the server as authority (#671) 2026-10-28 17:34:52 +00:00
Author
Owner

UNSOUND at author head 0bfaff33ba. The final independent corpus ran 200,000 seeds (0–199999), 100,000 with three devices and 100,000 with five. It found six distinct behavior failures: 95,120 unique failing seeds and 105,148 failed directed/random history checks, with 6,274,766 admission checks. Multiple checks can fail for one seed.

The strongest new witnesses are concurrent splits duplicating original text and a concurrent insertion moving away from its original character anchors. Server authority and delete receipts do not repair that structural text copying. The retired-offline-ID, remote split Undo, and joined deletion-provenance probes did not fail in this bounded corpus.

The oracle and executable tests were written before reading the PR description and the author's latest result comment (67037). No author test vectors or helpers are imported. Every seed runs a separately modeled random history of 12–24 actions and a directed concurrent regression. Transport drops, duplicates and reorders packets, retries lost replies, checks rejected admissions for atomicity, restarts the server from checkpoints, and drains fairly for convergence. Independent expected rows and per-note bytes are checked for composed edits; token, multiplicity and position oracles cover concurrent edits.

Minimal reproductions and final directed counts:

Case Failed histories First seed Observation
3 13,334 3 Join ABCD + EFGH, then split: refused instead of the required two parts.
4 13,334 4 Import abc123 in note-a and note-b: second legacy marker is rekeyed instead of remaining note-local.
5 13,333 5 Join ABCD + EFGH, type at byte 8: invalid scalar boundary.
7 13,333 7 Two offline splits of ABCDEFGH at 1 and 7: flattened text ABCDEFGHH duplicates H.
8 13,333 8 create("pasted ^abc123"): visible projection exposes ^abc123.
13 13,333 13 Split ABCDEFGH at 3 while offline device inserts X at 7: expected ABCDEFGXH, actual ABCXDEFGH.

Separately composed random histories failed 25,148 times, reproducing the joined-fragment editing/splitting limitations. These overlap the directed failure counts and are not additional distinct defects.

The author already discloses the joined-split and legacy namespace gaps. The duplication, character-position error, visible suffix edit refusal, and create marker exposure are executable observations beyond those two disclosed gaps.

Coverage is blocked for actual redo chains, general external-file replacement/ID-marker removal, provisional Markdown-link rewriting, and actual UI/source/search/accessibility surfaces: this prototype has no entry points for them. Known-revision outside insertions with duplicate markers are tested. Receipt links are tested; bare provisional URLs are not. No passing claim is made for missing integration. An early exploratory replacement passed to outside_paste violated that insertion-only contract and was removed before the final corpus; it is excluded from final counts.

Gate output follows verbatim. All local heavy commands used build-slot.sh; Cargo used -j3. The independent test's exit 101 is the expected red gate for the counterexamples. The first clippy attempt rejected std::fs::write for the optional diagnostic artifact; a documented test-only allowance was added, and final clippy passes.

$ cargo fmt -p calternal-block-ids --check

exit=0
$ cargo clippy -j3 -p calternal-block-ids --all-targets -- -D warnings
    Checking calternal-block-ids v0.1.0 (/home/agent/wt/ids-verify3/crates/block-ids)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.10s
exit=0
$ cargo test -j3 -p calternal-block-ids --lib --test authority --test break2 -- --nocapture
   Compiling calternal-block-ids v0.1.0 (/home/agent/wt/ids-verify3/crates/block-ids)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.38s
     Running unittests src/lib.rs (target/debug/deps/calternal_block_ids-1bd42f86a04ac69c)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/authority.rs (target/debug/deps/authority-4a5d4c68cd3df26e)

running 13 tests
test cold_duplicate_import_preserves_file_as_conflict ... ok
test cut_paste_keeps_id_and_moves_exact_file_bytes ... ok
test format_policy_proposes_only_when_requested ... ok
test gaps_and_changed_duplicates_are_rejected_atomically ... ok
test restart_retries_outbox_without_allocating_again ... ok
test restoring_join_owner_keeps_one_primary_for_new_links ... ok
test retired_collision_stays_reserved_and_foreign_undo_is_refused ... ok
test stale_alias_receipt_never_changes_owner_seed_973 ... ok
test stale_structural_undo_returns_conflict_without_erasing_text ... ok
test undo_empty_copy_does_not_consume_old_typing_seed_713 ... ok
test undo_empty_creation_restores_exact_file_bytes ... ok
test undo_nonempty_creation_preserves_remote_or_removes_empty_container ... ok
test unicode_edits_use_byte_boundaries ... ok

test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/break2.rs (target/debug/deps/break2-2e1e44b45f9aee35)

running 41 tests
test b2_late_proposal_cannot_reactivate ... ok
test b2_actor_2 ... ok
test b2_independent_deletes_need_both_undos ... ok
test b2_minimal_offline_first_link ... ok
test backslashes_survive_unrelated_edit ... ok
test b2_actor_5 ... ok
test checksum_corruption_does_not_change_room ... ok
test delete_concurrent_first_link_retires_both ... ok
test late_conversion_is_recoverable_after_delete ... ok
test equal_proposals_keep_each_published_target ... ok
test legacy_footer_migration ... ok
test map_preserves_unlinked_text ... ok
test mapped_mixed_endings_reopen_exactly ... ok
test outside_cannot_bootstrap_live_room ... ok
test outside_cr ... ok
test outside_crlf ... ok
test outside_lf ... ok
test reject_00 ... ok
test reject_01 ... ok
test reject_02 ... ok
test reject_03 ... ok
test removed_standalone_marker_stays_gone ... ok
test simultaneous_first_links_one_primary ... ok
test split_rejects_interior_scalar ... ok
test structure_code_boundary ... ok
test retired_join_alias_does_not_poison_primary ... ok
test structure_table_boundary ... ok
test task_conversion_keeps_identity ... ok
test undo_empty_split_preserves_remote ... ok
test vector_00 ... ok
test large_code_typing_preserves_rest ... ok
test undo_insert_preserves_remote ... ok
test vector_01 ... ok
test vector_02 ... ok
test vector_03 ... ok
test undo_replace_preserves_remote ... ok
test vector_04 ... ok
test vector_05 ... ok
test vector_06 ... ok
test vector_07 ... ok
test vector_08 ... ok

test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
exit=0
$ VERIFY3_RUNS=200000 VERIFY3_REPORT=/tmp/ids-verify3/final.json CARGO_PROFILE_TEST_OPT_LEVEL=2 cargo test -j3 -p calternal-block-ids --test verify3 -- --nocapture
   Compiling calternal-block-ids v0.1.0 (/home/agent/wt/ids-verify3/crates/block-ids)
    Finished `test` profile [optimized + debuginfo] target(s) in 0.48s
     Running tests/verify3.rs (target/debug/deps/verify3-e18d7d4838ddefae)

running 1 test
RANDOM CATEGORY invalid scalar boundary seed=2: invalid scalar boundary; trace=["step 0: op=0 row=0 writer=2", "step 1: op=8 row=0 writer=2", "step 2: op=2 row=0 writer=1", "step 3: op=9 row=0 writer=1", "step 4: op=0 row=1 writer=1", "step 5: op=4 row=1 writer=1", "step 6: op=5 row=1 writer=1", "step 7: op=7 row=0 writer=1", "step 8: op=3 row=0 writer=1", "step 9: op=3 row=1 writer=1", "step 10: op=5 row=1 writer=1", "step 11: op=6 row=2 writer=1", "step 12: op=0 row=1 writer=1", "step 13: op=6 row=1 writer=2", "step 14: op=2 row=0 writer=2"]; oracle_rows=[Row { key: Key(3, 1), text: "R4", note: "note", ids: ["0007nss82y45ja78"] }, Row { key: Key(3, 6), text: "R4", note: "note", ids: [] }, Row { key: Key(3, 11), text: "R12", note: "note", ids: [] }, Row { key: Key(3, 9), text: "R4", note: "note", ids: [] }]
FIRST FAILURE case=100 seed=2 devices=3: invalid scalar boundary; trace=["step 0: op=0 row=0 writer=2", "step 1: op=8 row=0 writer=2", "step 2: op=2 row=0 writer=1", "step 3: op=9 row=0 writer=1", "step 4: op=0 row=1 writer=1", "step 5: op=4 row=1 writer=1", "step 6: op=5 row=1 writer=1", "step 7: op=7 row=0 writer=1", "step 8: op=3 row=0 writer=1", "step 9: op=3 row=1 writer=1", "step 10: op=5 row=1 writer=1", "step 11: op=6 row=2 writer=1", "step 12: op=0 row=1 writer=1", "step 13: op=6 row=1 writer=2", "step 14: op=2 row=0 writer=2"]; oracle_rows=[Row { key: Key(3, 1), text: "R4", note: "note", ids: ["0007nss82y45ja78"] }, Row { key: Key(3, 6), text: "R4", note: "note", ids: [] }, Row { key: Key(3, 11), text: "R12", note: "note", ids: [] }, Row { key: Key(3, 9), text: "R4", note: "note", ids: [] }]
FIRST FAILURE case=3 seed=3 devices=5: split joined ABCDEFGH at 6: invalid scalar boundary
FIRST FAILURE case=4 seed=4 devices=3: legacy note-local IDs changed: "FIRST ^abc123\n", "SECOND ^7c005pcn3vtnrzde\n"
FIRST FAILURE case=5 seed=5 devices=5: type into joined ABCDEFGH at 8: invalid scalar boundary
FIRST FAILURE case=7 seed=7 devices=5: concurrent splits at 1,7: expected one H, got "ABCDEFGHH"
FIRST FAILURE case=8 seed=8 devices=3: expected ["pasted"], got ["pasted ^abc123"]
FIRST FAILURE case=13 seed=13 devices=5: split at 3, offline insertion at 7: expected "ABCDEFGXH", got "ABCXDEFGH"
RANDOM CATEGORY joined split refused seed=17: split of joined fragments requires a fragment boundary; trace=["step 0: op=0 row=0 writer=1", "step 1: op=9 row=0 writer=1", "step 2: op=1 row=0 writer=1", "step 3: op=9 row=0 writer=1", "step 4: op=3 row=0 writer=1", "step 5: op=7 row=0 writer=3", "step 6: op=0 row=0 writer=3", "step 7: op=4 row=0 writer=2", "step 8: op=5 row=0 writer=2", "step 9: op=2 row=1 writer=2", "step 10: op=9 row=1 writer=2", "step 11: op=6 row=0 writer=0", "step 12: op=3 row=0 writer=2", "step 13: op=4 row=1 writer=2", "step 14: op=1 row=0 writer=2", "step 15: op=2 row=0 writer=2"]; oracle_rows=[Row { key: Key(5, 2), text: "RX6", note: "other", ids: [] }]
progress=10000 elapsed=9.3s
progress=20000 elapsed=18.4s
progress=30000 elapsed=27.8s
progress=40000 elapsed=37.1s
progress=50000 elapsed=47.3s
progress=60000 elapsed=56.8s
test independent_seeded_adr0056_verification has been running for over 60 seconds
progress=70000 elapsed=66.0s
progress=80000 elapsed=75.2s
progress=90000 elapsed=84.4s
progress=100000 elapsed=93.6s
progress=110000 elapsed=103.0s
progress=120000 elapsed=112.4s
progress=130000 elapsed=121.5s
progress=140000 elapsed=131.4s
progress=150000 elapsed=142.1s
progress=160000 elapsed=151.6s
progress=170000 elapsed=160.9s
progress=180000 elapsed=170.2s
progress=190000 elapsed=179.2s
progress=200000 elapsed=188.8s
VERIFY3 runs=200000 failed_checks=105148 failed_seeds=95120 failure_classes=7 admission_checks=6274766
case=3 failures=13334 first_seed=3: split joined ABCDEFGH at 6: invalid scalar boundary
case=4 failures=13334 first_seed=4: legacy note-local IDs changed: "FIRST ^abc123\n", "SECOND ^7c005pcn3vtnrzde\n"
case=5 failures=13333 first_seed=5: type into joined ABCDEFGH at 8: invalid scalar boundary
case=7 failures=13333 first_seed=7: concurrent splits at 1,7: expected one H, got "ABCDEFGHH"
case=8 failures=13333 first_seed=8: expected ["pasted"], got ["pasted ^abc123"]
case=13 failures=13333 first_seed=13: split at 3, offline insertion at 7: expected "ABCDEFGXH", got "ABCXDEFGH"
case=100 failures=25148 first_seed=2: invalid scalar boundary; trace=["step 0: op=0 row=0 writer=2", "step 1: op=8 row=0 writer=2", "step 2: op=2 row=0 writer=1", "step 3: op=9 row=0 writer=1", "step 4: op=0 row=1 writer=1", "step 5: op=4 row=1 writer=1", "step 6: op=5 row=1 writer=1", "step 7: op=7 row=0 writer=1", "step 8: op=3 row=0 writer=1", "step 9: op=3 row=1 writer=1", "step 10: op=5 row=1 writer=1", "step 11: op=6 row=2 writer=1", "step 12: op=0 row=1 writer=1", "step 13: op=6 row=1 writer=2", "step 14: op=2 row=0 writer=2"]; oracle_rows=[Row { key: Key(3, 1), text: "R4", note: "note", ids: ["0007nss82y45ja78"] }, Row { key: Key(3, 6), text: "R4", note: "note", ids: [] }, Row { key: Key(3, 11), text: "R12", note: "note", ids: [] }, Row { key: Key(3, 9), text: "R4", note: "note", ids: [] }]

thread 'independent_seeded_adr0056_verification' (201048) panicked at crates/block-ids/tests/verify3.rs:113:5:
assertion `left == right` failed: ADR 0056 independent verification found counterexamples
  left: 105148
 right: 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test independent_seeded_adr0056_verification ... FAILED

failures:

failures:
    independent_seeded_adr0056_verification

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 188.82s

error: test failed, to rerun pass `-p calternal-block-ids --test verify3`
exit=101

Test harness: branch test/ids-verify3, head 0679f34929, base 0bfaff33ba. Only the independent tests are committed. findings.md and all gate/report artifacts remain uncommitted; the issue comments retain the evidence. No merge, deploy, issue closure, or author-branch push.

Harness source: 0679f34929/crates/block-ids/tests/verify3.rs

UNSOUND at author head 0bfaff33ba7a6bf7eeb372b0bcb4e214d840e2d0. The final independent corpus ran 200,000 seeds (0–199999), 100,000 with three devices and 100,000 with five. It found six distinct behavior failures: 95,120 unique failing seeds and 105,148 failed directed/random history checks, with 6,274,766 admission checks. Multiple checks can fail for one seed. The strongest new witnesses are concurrent splits duplicating original text and a concurrent insertion moving away from its original character anchors. Server authority and delete receipts do not repair that structural text copying. The retired-offline-ID, remote split Undo, and joined deletion-provenance probes did not fail in this bounded corpus. The oracle and executable tests were written before reading the PR description and the author's latest result comment (67037). No author test vectors or helpers are imported. Every seed runs a separately modeled random history of 12–24 actions and a directed concurrent regression. Transport drops, duplicates and reorders packets, retries lost replies, checks rejected admissions for atomicity, restarts the server from checkpoints, and drains fairly for convergence. Independent expected rows and per-note bytes are checked for composed edits; token, multiplicity and position oracles cover concurrent edits. Minimal reproductions and final directed counts: | Case | Failed histories | First seed | Observation | | --- | ---: | ---: | --- | | 3 | 13,334 | 3 | Join ABCD + EFGH, then split: refused instead of the required two parts. | | 4 | 13,334 | 4 | Import abc123 in note-a and note-b: second legacy marker is rekeyed instead of remaining note-local. | | 5 | 13,333 | 5 | Join ABCD + EFGH, type at byte 8: invalid scalar boundary. | | 7 | 13,333 | 7 | Two offline splits of ABCDEFGH at 1 and 7: flattened text ABCDEFGHH duplicates H. | | 8 | 13,333 | 8 | create("pasted ^abc123"): visible projection exposes ^abc123. | | 13 | 13,333 | 13 | Split ABCDEFGH at 3 while offline device inserts X at 7: expected ABCDEFGXH, actual ABCXDEFGH. | Separately composed random histories failed 25,148 times, reproducing the joined-fragment editing/splitting limitations. These overlap the directed failure counts and are not additional distinct defects. The author already discloses the joined-split and legacy namespace gaps. The duplication, character-position error, visible suffix edit refusal, and create marker exposure are executable observations beyond those two disclosed gaps. Coverage is blocked for actual redo chains, general external-file replacement/ID-marker removal, provisional Markdown-link rewriting, and actual UI/source/search/accessibility surfaces: this prototype has no entry points for them. Known-revision outside insertions with duplicate markers are tested. Receipt links are tested; bare provisional URLs are not. No passing claim is made for missing integration. An early exploratory replacement passed to outside_paste violated that insertion-only contract and was removed before the final corpus; it is excluded from final counts. Gate output follows verbatim. All local heavy commands used build-slot.sh; Cargo used -j3. The independent test's exit 101 is the expected red gate for the counterexamples. The first clippy attempt rejected std::fs::write for the optional diagnostic artifact; a documented test-only allowance was added, and final clippy passes. ```text $ cargo fmt -p calternal-block-ids --check exit=0 $ cargo clippy -j3 -p calternal-block-ids --all-targets -- -D warnings Checking calternal-block-ids v0.1.0 (/home/agent/wt/ids-verify3/crates/block-ids) Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.10s exit=0 $ cargo test -j3 -p calternal-block-ids --lib --test authority --test break2 -- --nocapture Compiling calternal-block-ids v0.1.0 (/home/agent/wt/ids-verify3/crates/block-ids) Finished `test` profile [unoptimized + debuginfo] target(s) in 0.38s Running unittests src/lib.rs (target/debug/deps/calternal_block_ids-1bd42f86a04ac69c) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running tests/authority.rs (target/debug/deps/authority-4a5d4c68cd3df26e) running 13 tests test cold_duplicate_import_preserves_file_as_conflict ... ok test cut_paste_keeps_id_and_moves_exact_file_bytes ... ok test format_policy_proposes_only_when_requested ... ok test gaps_and_changed_duplicates_are_rejected_atomically ... ok test restart_retries_outbox_without_allocating_again ... ok test restoring_join_owner_keeps_one_primary_for_new_links ... ok test retired_collision_stays_reserved_and_foreign_undo_is_refused ... ok test stale_alias_receipt_never_changes_owner_seed_973 ... ok test stale_structural_undo_returns_conflict_without_erasing_text ... ok test undo_empty_copy_does_not_consume_old_typing_seed_713 ... ok test undo_empty_creation_restores_exact_file_bytes ... ok test undo_nonempty_creation_preserves_remote_or_removes_empty_container ... ok test unicode_edits_use_byte_boundaries ... ok test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running tests/break2.rs (target/debug/deps/break2-2e1e44b45f9aee35) running 41 tests test b2_late_proposal_cannot_reactivate ... ok test b2_actor_2 ... ok test b2_independent_deletes_need_both_undos ... ok test b2_minimal_offline_first_link ... ok test backslashes_survive_unrelated_edit ... ok test b2_actor_5 ... ok test checksum_corruption_does_not_change_room ... ok test delete_concurrent_first_link_retires_both ... ok test late_conversion_is_recoverable_after_delete ... ok test equal_proposals_keep_each_published_target ... ok test legacy_footer_migration ... ok test map_preserves_unlinked_text ... ok test mapped_mixed_endings_reopen_exactly ... ok test outside_cannot_bootstrap_live_room ... ok test outside_cr ... ok test outside_crlf ... ok test outside_lf ... ok test reject_00 ... ok test reject_01 ... ok test reject_02 ... ok test reject_03 ... ok test removed_standalone_marker_stays_gone ... ok test simultaneous_first_links_one_primary ... ok test split_rejects_interior_scalar ... ok test structure_code_boundary ... ok test retired_join_alias_does_not_poison_primary ... ok test structure_table_boundary ... ok test task_conversion_keeps_identity ... ok test undo_empty_split_preserves_remote ... ok test vector_00 ... ok test large_code_typing_preserves_rest ... ok test undo_insert_preserves_remote ... ok test vector_01 ... ok test vector_02 ... ok test vector_03 ... ok test undo_replace_preserves_remote ... ok test vector_04 ... ok test vector_05 ... ok test vector_06 ... ok test vector_07 ... ok test vector_08 ... ok test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s exit=0 $ VERIFY3_RUNS=200000 VERIFY3_REPORT=/tmp/ids-verify3/final.json CARGO_PROFILE_TEST_OPT_LEVEL=2 cargo test -j3 -p calternal-block-ids --test verify3 -- --nocapture Compiling calternal-block-ids v0.1.0 (/home/agent/wt/ids-verify3/crates/block-ids) Finished `test` profile [optimized + debuginfo] target(s) in 0.48s Running tests/verify3.rs (target/debug/deps/verify3-e18d7d4838ddefae) running 1 test RANDOM CATEGORY invalid scalar boundary seed=2: invalid scalar boundary; trace=["step 0: op=0 row=0 writer=2", "step 1: op=8 row=0 writer=2", "step 2: op=2 row=0 writer=1", "step 3: op=9 row=0 writer=1", "step 4: op=0 row=1 writer=1", "step 5: op=4 row=1 writer=1", "step 6: op=5 row=1 writer=1", "step 7: op=7 row=0 writer=1", "step 8: op=3 row=0 writer=1", "step 9: op=3 row=1 writer=1", "step 10: op=5 row=1 writer=1", "step 11: op=6 row=2 writer=1", "step 12: op=0 row=1 writer=1", "step 13: op=6 row=1 writer=2", "step 14: op=2 row=0 writer=2"]; oracle_rows=[Row { key: Key(3, 1), text: "R4", note: "note", ids: ["0007nss82y45ja78"] }, Row { key: Key(3, 6), text: "R4", note: "note", ids: [] }, Row { key: Key(3, 11), text: "R12", note: "note", ids: [] }, Row { key: Key(3, 9), text: "R4", note: "note", ids: [] }] FIRST FAILURE case=100 seed=2 devices=3: invalid scalar boundary; trace=["step 0: op=0 row=0 writer=2", "step 1: op=8 row=0 writer=2", "step 2: op=2 row=0 writer=1", "step 3: op=9 row=0 writer=1", "step 4: op=0 row=1 writer=1", "step 5: op=4 row=1 writer=1", "step 6: op=5 row=1 writer=1", "step 7: op=7 row=0 writer=1", "step 8: op=3 row=0 writer=1", "step 9: op=3 row=1 writer=1", "step 10: op=5 row=1 writer=1", "step 11: op=6 row=2 writer=1", "step 12: op=0 row=1 writer=1", "step 13: op=6 row=1 writer=2", "step 14: op=2 row=0 writer=2"]; oracle_rows=[Row { key: Key(3, 1), text: "R4", note: "note", ids: ["0007nss82y45ja78"] }, Row { key: Key(3, 6), text: "R4", note: "note", ids: [] }, Row { key: Key(3, 11), text: "R12", note: "note", ids: [] }, Row { key: Key(3, 9), text: "R4", note: "note", ids: [] }] FIRST FAILURE case=3 seed=3 devices=5: split joined ABCDEFGH at 6: invalid scalar boundary FIRST FAILURE case=4 seed=4 devices=3: legacy note-local IDs changed: "FIRST ^abc123\n", "SECOND ^7c005pcn3vtnrzde\n" FIRST FAILURE case=5 seed=5 devices=5: type into joined ABCDEFGH at 8: invalid scalar boundary FIRST FAILURE case=7 seed=7 devices=5: concurrent splits at 1,7: expected one H, got "ABCDEFGHH" FIRST FAILURE case=8 seed=8 devices=3: expected ["pasted"], got ["pasted ^abc123"] FIRST FAILURE case=13 seed=13 devices=5: split at 3, offline insertion at 7: expected "ABCDEFGXH", got "ABCXDEFGH" RANDOM CATEGORY joined split refused seed=17: split of joined fragments requires a fragment boundary; trace=["step 0: op=0 row=0 writer=1", "step 1: op=9 row=0 writer=1", "step 2: op=1 row=0 writer=1", "step 3: op=9 row=0 writer=1", "step 4: op=3 row=0 writer=1", "step 5: op=7 row=0 writer=3", "step 6: op=0 row=0 writer=3", "step 7: op=4 row=0 writer=2", "step 8: op=5 row=0 writer=2", "step 9: op=2 row=1 writer=2", "step 10: op=9 row=1 writer=2", "step 11: op=6 row=0 writer=0", "step 12: op=3 row=0 writer=2", "step 13: op=4 row=1 writer=2", "step 14: op=1 row=0 writer=2", "step 15: op=2 row=0 writer=2"]; oracle_rows=[Row { key: Key(5, 2), text: "RX6", note: "other", ids: [] }] progress=10000 elapsed=9.3s progress=20000 elapsed=18.4s progress=30000 elapsed=27.8s progress=40000 elapsed=37.1s progress=50000 elapsed=47.3s progress=60000 elapsed=56.8s test independent_seeded_adr0056_verification has been running for over 60 seconds progress=70000 elapsed=66.0s progress=80000 elapsed=75.2s progress=90000 elapsed=84.4s progress=100000 elapsed=93.6s progress=110000 elapsed=103.0s progress=120000 elapsed=112.4s progress=130000 elapsed=121.5s progress=140000 elapsed=131.4s progress=150000 elapsed=142.1s progress=160000 elapsed=151.6s progress=170000 elapsed=160.9s progress=180000 elapsed=170.2s progress=190000 elapsed=179.2s progress=200000 elapsed=188.8s VERIFY3 runs=200000 failed_checks=105148 failed_seeds=95120 failure_classes=7 admission_checks=6274766 case=3 failures=13334 first_seed=3: split joined ABCDEFGH at 6: invalid scalar boundary case=4 failures=13334 first_seed=4: legacy note-local IDs changed: "FIRST ^abc123\n", "SECOND ^7c005pcn3vtnrzde\n" case=5 failures=13333 first_seed=5: type into joined ABCDEFGH at 8: invalid scalar boundary case=7 failures=13333 first_seed=7: concurrent splits at 1,7: expected one H, got "ABCDEFGHH" case=8 failures=13333 first_seed=8: expected ["pasted"], got ["pasted ^abc123"] case=13 failures=13333 first_seed=13: split at 3, offline insertion at 7: expected "ABCDEFGXH", got "ABCXDEFGH" case=100 failures=25148 first_seed=2: invalid scalar boundary; trace=["step 0: op=0 row=0 writer=2", "step 1: op=8 row=0 writer=2", "step 2: op=2 row=0 writer=1", "step 3: op=9 row=0 writer=1", "step 4: op=0 row=1 writer=1", "step 5: op=4 row=1 writer=1", "step 6: op=5 row=1 writer=1", "step 7: op=7 row=0 writer=1", "step 8: op=3 row=0 writer=1", "step 9: op=3 row=1 writer=1", "step 10: op=5 row=1 writer=1", "step 11: op=6 row=2 writer=1", "step 12: op=0 row=1 writer=1", "step 13: op=6 row=1 writer=2", "step 14: op=2 row=0 writer=2"]; oracle_rows=[Row { key: Key(3, 1), text: "R4", note: "note", ids: ["0007nss82y45ja78"] }, Row { key: Key(3, 6), text: "R4", note: "note", ids: [] }, Row { key: Key(3, 11), text: "R12", note: "note", ids: [] }, Row { key: Key(3, 9), text: "R4", note: "note", ids: [] }] thread 'independent_seeded_adr0056_verification' (201048) panicked at crates/block-ids/tests/verify3.rs:113:5: assertion `left == right` failed: ADR 0056 independent verification found counterexamples left: 105148 right: 0 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace test independent_seeded_adr0056_verification ... FAILED failures: failures: independent_seeded_adr0056_verification test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 188.82s error: test failed, to rerun pass `-p calternal-block-ids --test verify3` exit=101 ``` Test harness: branch test/ids-verify3, head 0679f349294be69eb43e19657e791796cfc8198f, base 0bfaff33ba7a6bf7eeb372b0bcb4e214d840e2d0. Only the independent tests are committed. findings.md and all gate/report artifacts remain uncommitted; the issue comments retain the evidence. No merge, deploy, issue closure, or author-branch push. Harness source: https://git.kayg.org/kayg/calternal/src/commit/0679f349294be69eb43e19657e791796cfc8198f/crates/block-ids/tests/verify3.rs
Author
Owner

Closing per #931: #758 is the surviving block identity implementation.

Closing per #931: #758 is the surviving block identity implementation.
kayg closed this pull request 2026-11-04 17:37:38 +00:00
Some checks failed
CI / server (pull_request) Successful in 1m15s
CI / rust (pull_request) Failing after 13m39s
CI / web (pull_request) Failing after 1h23m31s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!735
No description provided.