Repository navigation
feat(assurance): MC/DC with cargo-mvl-mcdc, as in db-core - #318
Merged
Merged
Conversation
make mcdc-obligations writes the committed snapshot tests/mcdc/obligations.json from all of crates/*/src; check-mcdc-fresh compares it with a fresh scan; test-mcdc harvests the mcdc__<id>__v<N> tests (a cargo shim narrows the run to them, with frank/tls) into target/assurance/mcdc.json and fails while a decision of two or more conditions is not covered. scripts/mcdc_metrics.py reads it; check-assurance shows a MC/DC box and gates on MCDC_MIN. CI runs test-mcdc with cargo-mvl-mcdc at db-core's mvl-rust pin. The discharge test catches a tag whose decision is gone and an id shared by two files. unhex is the first decision covered; the objects.rs test loop no longer holds a two-condition decision of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
144 tests named mcdc__<id>__v<N>_<what> cover the 47 open decisions: the admin API's role and scope rules, small-cell suppression and the partner gate, SSO, token and label checks, and the rest. make test-mcdc: 48/48. ADR-025, spec 002 requirements 11-13, README and CONTRIBUTING describe the convention; the snapshot is regenerated with the new test modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release commit bumped the version and edited CHANGELOG.md; /merge does both. Restores 0.51.3, and the MC/DC entry moves to the PR's changelog block. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Takes main's #310 log streams (ADR-024) alongside the MC/DC work. The conflicts were additive: the api and cli MC/DC tests keep their place after the new tests, and the ADR index lists 024 before 025. The MC/DC snapshot is regenerated for main's decisions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
cargo-mvl-mcdclists every decision ofcrates/*/srcin a committed snapshot, and tests namedmcdc__<id>__v<N>_<what>cover each decision of two or more conditions, one per vector.make test-mcdcfails while one is open and runs in CI;make check-mcdc-freshfails a stale snapshot;check-assuranceshows a MC/DC box andMCDC_MINgates it.Changes
Added
scripts/mcdc_metrics.py: reads the harvest output and reports the open decisions, with the tests each still needs.crates/frank/tests/mcdc_discharge.rs: under a plaincargo test, fails when a tagged test names a decision the snapshot lacks, or when two files share an id.tests/mcdc/obligations.json: the committed snapshot of the 534 decisions.crates/frank/tests/api.rsandcli.rswhere the full app is needed.Changed
make check-assuranceshows a MC/DC box and acceptsMCDC_MIN.make test-mcdcwithcargo-mvl-mcdcat db-core's pin (MVL_MCDC_REV) and uploadsmcdc.jsonwith the other assurance output.crates/frank/src/objects.rs: the fake S3 server's read loop waits only for the body, which comes last, so the loop has one condition rather than two.Fixed
Changelog
make test-mcdc, ADR-025), with the admin, disclosure, SSO and token rules covered vector by vector.Testing
cargo test --workspace --locked: no failuresmake test-mcdc: 48/48 decisions covered,check-mcdc-freshcurrentmake lint(fmt, clippy native and wasm32) andcargo clippy --features frank/tls -D warningsmake check-mvl-limit,make check-assurance(100% of scenarios tested, 0 dead links)cargo installofcargo-mvl-mcdcat the pinned revisionRelated Issues
Closes #317
The ADR number 025 assumes ADR-024 (#310) lands first; if #310 merges later, the numbers stay as they are.
🤖 Generated with Claude Code