Skip to content

fix(corpus): spread the replicate runs so a seconds clock reads as fresh - #4

Merged
koabula merged 2 commits into
mainfrom
fix/corpus-replicate-spread
Nov 11, 2026
Merged

koabula merged 2 commits into
mainfrom
fix/corpus-replicate-spread

Conversation

@koabula

@koabula koabula commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Why

CI on main failed after #3 in leakage_corpus::only_a_payloads_size_reaches_the_host, though the same code passed on the PR (run 42968815830):

b_accept/Deferred("publish_shared_state_request")/body#json.devices[].keypackageRef.createdAt carries {Identity(Alice), Identity(Bob), Body(Alice), Body(Bob), AttachmentName, AttachmentLen}

The corpus ran its three replicate runs first and back to back. A KeyPackage's createdAt, notBefore and expiresAt are whole seconds (src/mls_adapter/mod.rs, now_seconds * 1000). When the three replicates fell inside one second and a later run did not, those fields held still across the replicates and differed elsewhere, so the classifier read them as carrying every secret. Whether the test passed depended on where the second boundaries fell.

What

matrix() now places the replicates at the first run, the last and one in the middle, and returns their indices. Runs execute in order, so a value read off a coarse clock either differs between the two ends and is fresh, or is the same in every run. Constant verdicts cannot change, because they depend only on the values and not on which runs are replicates; only a clock-dependent field can move from carrying to fresh.

Test code only: the module is #[cfg(test)].

Not verified locally

No Rust toolchain on this machine; CI is the first build.

🤖 Generated with Claude Code

koala and others added 2 commits November 11, 2026 14:16
The leakage corpus ran its three replicate runs first and back to back. A
KeyPackage's createdAt, notBefore and expiresAt are whole seconds
(mls_adapter: now_seconds * 1000), so when those three runs fell inside one
second and a later run did not, the fields held still across the
replicates yet differed elsewhere, and the classifier read them as
carrying every secret. only_a_payloads_size_reaches_the_host then failed
on main after #3, though the same code had passed on the PR.

The replicates now sit at the first run, the last and one in the middle.
Runs execute in order, so a value read off a coarse clock either differs
between the two ends and is fresh, or is the same in every run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@koabula
koabula merged commit 90b5235 into main Nov 11, 2026
7 checks passed
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.

1 participant