Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/synapse/blob/main/evidence/b5-derivation-attestation/red-green/review-fixes.txt # synapse A component of the AienOS ecosystem. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `synapse / evidence / b5-derivation-attestation / red-green / review-fixes.txt` 63 lines ยท 4488 bytes Raw Blame History 1 # Review fixes for PR #95 (2026-10-17, on B5 head `50295c3`): red before green 2 # Review comment: aien-dev/synapse#95 issuecomment-`6228539788`, findings 1 and 5. 3 4 ## Fix 1: server key lookup bound to the repository (DerivationIdentityRepoMismatch) 5 # Red: test written with only the new refusal code added; check_derivation unchanged. 6 # Command: cargo test --locked -p synapse-api --test b5_derivation_attestation b5_identity_log_of_another_repository 7 test b5_identity_log_of_another_repository_is_refused_at_admission_and_replay ... FAILED 8 thread 'b5_identity_log_of_another_repository_is_refused_at_admission_and_replay' panicked at crates/synapse-api/tests/b5_derivation_attestation.rs:575:5: 9 assertion `left == right` failed: refused at admission 10 left: Ok(()) 11 right: Err(DerivationIdentityRepoMismatch) 12 test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 8 filtered out; finished in 0.06s 13 14 ## Fix 2: admission-to-write sequence check in every build profile (WalSequenceGap) 15 # Red (debug build): the debug_assert_eq! panics. 16 # Command: cargo test --locked -p synapse-api --test b5_derivation_attestation b5_derivation_written_at 17 test b5_derivation_written_at_another_sequence_than_it_was_checked_at_is_refused ... FAILED 18 thread 'b5_derivation_written_at_another_sequence_than_it_was_checked_at_is_refused' panicked at crates/synapse-store/src/revision.rs:769:9: 19 assertion `left == right` failed: derivation checked at the sequence it was written at 20 left: WalSeq(5) 21 right: WalSeq(4) 22 test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 9 filtered out; finished in 0.05s 23 24 # Red (release build): the record checked at seq 4 is admitted at seq 5. 25 # Command: cargo test --release --locked -p synapse-api --test b5_derivation_attestation b5_derivation_written_at 26 test b5_derivation_written_at_another_sequence_than_it_was_checked_at_is_refused ... FAILED 27 thread 'b5_derivation_written_at_another_sequence_than_it_was_checked_at_is_refused' panicked at crates/synapse-api/tests/b5_derivation_attestation.rs:748:5: 28 assertion `left == right` failed: refused with a typed error, not admitted and not a panic 29 left: Ok(WalSeq(5)) 30 right: Err(WalSequenceGap) 31 test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 9 filtered out; finished in 0.05s 32 33 ## Green, both fixes (debug build) 34 # Command: cargo test --locked -p synapse-api --test b5_derivation_attestation 35 test b5_attestation_naming_a_different_rule_is_refused_at_admission_and_replay ... ok 36 test b5_attestation_naming_different_inputs_is_refused_at_admission_and_replay ... ok 37 test b5_attestation_signed_by_another_key_is_refused_at_admission_and_replay ... ok 38 test b5_derivation_written_at_another_sequence_than_it_was_checked_at_is_refused ... ok 39 test b5_derived_revision_presented_with_an_agent_signature_it_does_not_have_is_refused ... ok 40 test b5_identity_log_of_another_repository_is_refused_at_admission_and_replay ... ok 41 test b5_recomputation_that_disagrees_is_refused_at_admission_and_replay ... ok 42 test b5_replayed_attestation_is_refused_at_admission_and_replay ... ok 43 test b5_replica_recomputes_every_derived_revision_and_gets_the_same_digests ... ok 44 test b5_unregistered_server_key_is_refused_at_admission_and_replay ... ok 45 test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12s 46 47 ## Green, both fixes (release build) 48 # Command: cargo test --release --locked -p synapse-api --test b5_derivation_attestation 49 test b5_attestation_naming_a_different_rule_is_refused_at_admission_and_replay ... ok 50 test b5_attestation_naming_different_inputs_is_refused_at_admission_and_replay ... ok 51 test b5_attestation_signed_by_another_key_is_refused_at_admission_and_replay ... ok 52 test b5_derivation_written_at_another_sequence_than_it_was_checked_at_is_refused ... ok 53 test b5_derived_revision_presented_with_an_agent_signature_it_does_not_have_is_refused ... ok 54 test b5_identity_log_of_another_repository_is_refused_at_admission_and_replay ... ok 55 test b5_recomputation_that_disagrees_is_refused_at_admission_and_replay ... ok 56 test b5_replayed_attestation_is_refused_at_admission_and_replay ... ok 57 test b5_replica_recomputes_every_derived_revision_and_gets_the_same_digests ... ok 58 test b5_unregistered_server_key_is_refused_at_admission_and_replay ... ok 59 test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s 60 61 ## Workspace 62 # Command: nice -n 19 cargo test --locked --workspace -j 4 63 45 test binaries: 342 passed, 0 failed, 1 ignored