Skip to content

fix(oplog): correct stale control v2 composition docs and pin a forked revocation - #1366

Merged
skakri merged 2 commits into
mainfrom
fix/1311-post-manifest-corrections
Sep 17, 2026
Merged

skakri merged 2 commits into
mainfrom
fix/1311-post-manifest-corrections

Conversation

@skakri

@skakri skakri commented Sep 17, 2026

Copy link
Copy Markdown
Member

Three corrections exposed once #1364 made a control v2 revocation reachable end to end. No production logic changes.

The docs said the opposite of what the code does

fold/v2.rs still told readers, in its module header and on pinned_history, that this has no production caller, that execute_held cannot supply a manifest, that nothing persists one, and that every revocation therefore parks. All of that was true when written and all of it is now false: execute_held takes manifests, the annex log persists them, and a refold demonstrably reaches the composition with a cut to apply.

Both sites now state what holds today — a refold reaches this with cuts; a revocation whose manifest is stored applies, one whose manifest is missing parks — and name what is still absent, which is a production path that authors a v2 cut or manifest. Pin install remains test-only.

A doc that contradicts the code on one line teaches a reader to distrust it on all of them, which matters most in the module deciding who may revoke whom.

An assertion that could pass for the wrong reason

The guard test checked an aggregate count of open roster seats, 2 → 1. The revoked subject is the enrolled device by construction, so it was correct — but a bug that closed the founder's seat instead would have passed identically. It now asserts the subject's seat closes and the founder's stays open, via a seat_open(conn, fingerprint) helper.

A forked revocation's registers revoke nothing — now covered

pinned_history is composed inside derive_pinned_projection's fork-elimination loop, not once outside it, so a forked cut's registers never apply. Equivocation tests existed, but both used DeviceAdd siblings — nothing exercised that loop with a register-installing cut, leaving the property asserted nowhere.

a_forked_v2_revocations_registers_revoke_nothing forks a revocation and proves the losing sibling revokes nothing. It and a_v2_revocation_parks_for_want_of_its_manifest_and_applies_once_it_is_stored name each other, so a later cleanup cannot delete the half carrying the positive proof.

Worth recording for anyone who touches that loop: the obvious way to break this property does not fail, it hangs. Dropping the forked filter re-adds the forked entry to the effective set every round, so newly_forked never empties and the fixpoint spins forever — the loop's termination and the security property rest on the same filter. The mutation therefore feeds the composition a separate pre-fork verdict list and leaves the loop's own filter intact.

Verification

  • cargo nextest run --workspace — 5718 passed, 7 skipped
  • cargo clippy --workspace --all-targets -- -D warnings, cargo check --workspace --all-targets, cargo +nightly fmt --check — clean

Mutation, with the injected marker confirmed present and the original absent before building, and the mutant confirmed to compile: the new test fails by name on its own assertion, while its positive complement still passes — which is what shows the failure is the fork property rather than a broken fixture. Restored, 14/14 pass.

Gate semantics are untouched, no production authoring path is added, and no v2 execution decision changes.

Refs #1311.

…apply

The module header and `pinned_history`'s own doc both claimed the
composition had no production caller: that every revocation names a
detached pre-cut manifest `execute_held` cannot supply and nothing
persists, so each one parks. Manifests are durable now, `execute_held`
is handed the ones the account holds, and a refold reaches the
composition with cuts to apply.

State the rule that holds: a revocation whose manifest is stored
applies and composes, one whose manifest is missing parks and composes
nothing, and what no production path does is author a v2 cut or a
manifest — installing a pin is test-only.
… forked one

The post-manifest check counted open roster seats (2 -> 1). The revoked
subject is the enrolled device by construction, so the count was
correct, but a bug that closed the founder's seat instead would have
passed it too. Assert on the subject's own fingerprint, and assert the
founder's seat is untouched.

Add `a_forked_v2_revocations_registers_revoke_nothing`. Two revocations
at one chain slot both cite a stored manifest, so the executor applies
both and the coherence walk forks the loser. The forked one named the
enrolled member, and that member keeps its seat — the property that
makes `derive_pinned_projection` compose `pinned_history` inside its
elimination loop rather than once above it. The existing manifest test
is its positive complement; each names the other.
@github-actions

Copy link
Copy Markdown
Contributor

SCIP oracle — resolution report

Heuristic→compiler edge resolution per corpus. Δ compares resolved-after to the main baseline (only when the corpus profile + tool version match).

corpus tool edges resolved (heuristic → compiler) precision recall monikers Δ vs main
c-libuv scip-clang 12894 37.9% → 48.6% 90.2% 55.3% 679 +0.0pp
cpp-yaml scip-clang 9423 43.2% → 72.9% 83.2% 40.6% 1056 +0.0pp
py-django scip-python 12937 28.8% → 73.5% 96.7% 84.1% 3701 +0.0pp
py-rich scip-python 8383 27.6% → 92.3% 95.0% 81.3% 1196 +0.0pp
rust-time rust-analyzer 11040 37.6% → 56.9% 82.2% 83.6% 574 +0.0pp
ts-rxjs scip-typescript 7875 39.6% → 94.9% 87.3% 77.4% 631 +0.0pp

resolved = Exact/Syntactic + compiler upgrades + resolved-external, over edge candidates with a callee range. precision/recall are the oracle eval metrics.

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectrag-rat
Branchfix/1311-post-manifest-corrections
Testbedhetzner-bigmem

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkEstimated Cyclescycles x 1e6Instructionsinstructions x 1e6L1 Hitshits x 1e6LL Hitshits x 1e6RAM Hitshits x 1e3Total read+writereads/writes x 1e6
rag_pipeline::pipeline::index cargo_resolver:resolver_config()📈 view plot
⚠️ NO THRESHOLD
1,851.41 x 1e6📈 view plot
⚠️ NO THRESHOLD
1,157.51 x 1e6📈 view plot
⚠️ NO THRESHOLD
1,618.09 x 1e6📈 view plot
⚠️ NO THRESHOLD
37.58 x 1e6📈 view plot
⚠️ NO THRESHOLD
1,298.29 x 1e3📈 view plot
⚠️ NO THRESHOLD
1,656.96 x 1e6
rag_pipeline::pipeline::query_cold cargo_resolver:resolver_built_config()📈 view plot
⚠️ NO THRESHOLD
265.12 x 1e6📈 view plot
⚠️ NO THRESHOLD
175.59 x 1e6📈 view plot
⚠️ NO THRESHOLD
249.74 x 1e6📈 view plot
⚠️ NO THRESHOLD
2.85 x 1e6📈 view plot
⚠️ NO THRESHOLD
31.55 x 1e3📈 view plot
⚠️ NO THRESHOLD
252.63 x 1e6
rag_pipeline::pipeline::query_warm cargo_resolver:resolver_index()📈 view plot
⚠️ NO THRESHOLD
238.20 x 1e6📈 view plot
⚠️ NO THRESHOLD
157.21 x 1e6📈 view plot
⚠️ NO THRESHOLD
224.26 x 1e6📈 view plot
⚠️ NO THRESHOLD
2.56 x 1e6📈 view plot
⚠️ NO THRESHOLD
31.83 x 1e3📈 view plot
⚠️ NO THRESHOLD
226.86 x 1e6
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectrag-rat
Branchfix/1311-post-manifest-corrections
Testbedhetzner-bigmem
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
seconds (s)
(Result Δ%)
Upper Boundary
seconds (s)
(Limit %)
index_time/full_rebuild_cargo📈 view plot
🚷 view threshold
5.89 s
(+1.56%)Baseline: 5.79 s
7.10 s
(82.93%)
🐰 View full continuous benchmarking report in Bencher

@skakri
skakri merged commit 31b5536 into main Sep 17, 2026
26 checks passed
@skakri
skakri deleted the fix/1311-post-manifest-corrections branch September 17, 2026 03:27
@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

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