Skip to content

test(id-import-atproto): repair the two failing test oracles (#16928) - #16938

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/16928-atproto-oracles
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/16928-atproto-oracles

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

What

Repairs the two failing test oracles in pkgs/id/crates/id-import-atproto reported 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_point asserted decoded == sample, but the decoder returns map keys in canonical (encoded-form) order (did, data, nested, version) while sample() 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_link never reached the prev-link check: the fixture's signed_op signed with raw sign_prehash, which produces a high-S signature for this fixture's genesis digest, and AtprotoKey::verify correctly 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-prev rejection 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

Refs #16928 (left open for Felix's merge + done check).


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

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.
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 154c1bf4-a098-47e3-9cf5-826556ce75b1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet
developing-today-fleet Bot merged commit 96105bf into main Nov 29, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/16928-atproto-oracles branch November 29, 2026 19:01
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

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 (couldn't find remote ref refs/heads/felix/16928-atproto-oracles). Zero tests ran — a checkout artifact, not a code failure.

Corrective verification against current main with the same command (cd pkgs/id && cargo test -p id-import-atproto --lib): run 46305982122. Its log is the verification of record for this merged fix; verdict will be recorded on #16928.

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

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: cd pkgs/id && cargo test -p id-import-atproto --lib on main @ d558905 → 34 passed / 0 failed, including the cbor canonical-order and plc chain tests by name; marker ID16928-VERIFY-OK printed. Verdict also recorded on #16928. This PR is now proven on the merged tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants