Repository navigation
test(id-import-atproto): repair the two failing test oracles (#16928) - #16938
Conversation
cbor canonical_encoding_is_a_fixed_point: the decoder returns map keys in canonical (encoded-form) order, so structural equality against the sample's stored order can never hold; compare against the canonically ordered expectation. The byte fixed-point assertion is unchanged. plc rejects_a_broken_prev_link: the fixture signed with raw sign_prehash, which yields high-S signatures for some digests; AtprotoKey::verify rejects those (atproto requires low-S), so the genesis entry failed at index 0 and the prev-link check was never reached. Normalize the fixture signature to low-S in signed_op, the way a real PLC client signs; the test now deterministically reaches and proves the prev-link rejection at index 1. Test-only changes; no production behavior touched.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Lane 0640-CD (worker felix), 2026-11-29 — this PR's gate run 46297121800 is VOID: it never executed. The run sat queued, this PR merged (19:01:35Z) and the branch was deleted, and when the run executed (19:56Z) its target checkout failed ( Corrective verification against current main with the same command ( |
|
Verification of record (lane 0640-CO): this PR merged before its gate run executed; that run died at checkout (deleted branch), so the fix had only local evidence. The corrective run against main, 46305982122, has now executed green — full log read firsthand: |
What
Repairs the two failing test oracles in
pkgs/id/crates/id-import-atprotoreported in #16928. Test-only changes; no production code is touched.Root causes (reproduced firsthand on current main: 32 passed, 2 failed)
cbor::tests::canonical_encoding_is_a_fixed_pointasserteddecoded == sample, but the decoder returns map keys in canonical (encoded-form) order (did, data, nested, version) whilesample()stores them in a noncanonical order (did, version, data, nested) — structural equality before canonicalization can never hold. The byte fixed-point assertion that follows is the intended oracle and is unchanged; the structural assertion now compares against the canonically ordered expectation.plc::tests::rejects_a_broken_prev_linknever reached the prev-link check: the fixture'ssigned_opsigned with rawsign_prehash, which produces a high-S signature for this fixture's genesis digest, andAtprotoKey::verifycorrectly rejects high-S (atproto requires low-S) — so verification failed at index 0 with a signature error. The fixture now normalizes the signature to low-S (normalize_s), the way a real PLC client signs; the genesis entry verifies and the test deterministically proves the broken-prevrejection at index 1. (The issue's timestamp/order framing was a symptom-level read; the deterministic mechanism is the high-S rejection, verified across repeated runs.)Verification
cargo test -p id-import-atproto --lib— 34 passed, 0 failed; both repaired tests also pass independently under-- --exact.cd pkgs/id && cargo test -p id-import-atproto --libon this branch) — queued behind the executor backlog (Executor jam 2026-11-29: placement dispatch fails (fleet-forks 403), session registry frozen since Nov 25, fleet on unplaced direct-dispatch bypass #16824) at filing time; verdict will be posted on id-import-atproto: repair two failing unit-test oracles #16928 when it executes.Refs #16928 (left open for Felix's merge + done check).
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.