fix(oplog): correct stale control v2 composition docs and pin a forked revocation - #1366
Merged
Merged
Conversation
…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.
Contributor
SCIP oracle — resolution reportHeuristic→compiler edge resolution per corpus. Δ compares resolved-after to the
resolved = |
Contributor
|
| Project | rag-rat |
| Branch | fix/1311-post-manifest-corrections |
| Testbed | hetzner-bigmem |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
- Total read+write (reads/writes)
- L1 Hits (hits)
- RAM Hits (hits)
- Instructions (instructions)
- Estimated Cycles (cycles)
- LL Hits (hits)
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-thresholdsflag.
Click to view all benchmark results
| Benchmark | Estimated Cycles | cycles x 1e6 | Instructions | instructions x 1e6 | L1 Hits | hits x 1e6 | LL Hits | hits x 1e6 | RAM Hits | hits x 1e3 | Total read+write | reads/writes x 1e6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| rag_pipeline::pipeline::index cargo_resolver:resolver_config() | 📈 view plot | 1,851.41 x 1e6 | 📈 view plot | 1,157.51 x 1e6 | 📈 view plot | 1,618.09 x 1e6 | 📈 view plot | 37.58 x 1e6 | 📈 view plot | 1,298.29 x 1e3 | 📈 view plot | 1,656.96 x 1e6 |
| rag_pipeline::pipeline::query_cold cargo_resolver:resolver_built_config() | 📈 view plot | 265.12 x 1e6 | 📈 view plot | 175.59 x 1e6 | 📈 view plot | 249.74 x 1e6 | 📈 view plot | 2.85 x 1e6 | 📈 view plot | 31.55 x 1e3 | 📈 view plot | 252.63 x 1e6 |
| rag_pipeline::pipeline::query_warm cargo_resolver:resolver_index() | 📈 view plot | 238.20 x 1e6 | 📈 view plot | 157.21 x 1e6 | 📈 view plot | 224.26 x 1e6 | 📈 view plot | 2.56 x 1e6 | 📈 view plot | 31.83 x 1e3 | 📈 view plot | 226.86 x 1e6 |
Contributor
|
| Project | rag-rat |
| Branch | fix/1311-post-manifest-corrections |
| Testbed | hetzner-bigmem |
Click to view all benchmark results
| Benchmark | Latency | Benchmark 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%) |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.rsstill told readers, in its module header and onpinned_history, that this has no production caller, thatexecute_heldcannot 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_heldtakes 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_historyis composed insidederive_pinned_projection's fork-elimination loop, not once outside it, so a forked cut's registers never apply. Equivocation tests existed, but both usedDeviceAddsiblings — nothing exercised that loop with a register-installing cut, leaving the property asserted nowhere.a_forked_v2_revocations_registers_revoke_nothingforks a revocation and proves the losing sibling revokes nothing. It anda_v2_revocation_parks_for_want_of_its_manifest_and_applies_once_it_is_storedname 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_forkednever 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 skippedcargo clippy --workspace --all-targets -- -D warnings,cargo check --workspace --all-targets,cargo +nightly fmt --check— cleanMutation, 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.