Skip to content

feat(assurance): MC/DC with cargo-mvl-mcdc, as in db-core - #318

Merged
iheitlager merged 8 commits into
mainfrom
feat/317-mcdc
Nov 14, 2026
Merged

iheitlager merged 8 commits into
mainfrom
feat/317-mcdc

Conversation

@iheitlager

Copy link
Copy Markdown
Member

Summary

  • MC/DC for FRANK, set up as in db-core (ADR-025): cargo-mvl-mcdc lists every decision of crates/*/src in a committed snapshot, and tests named mcdc__<id>__v<N>_<what> cover each decision of two or more conditions, one per vector.
  • All 48 such decisions are covered (148 vectors, 148 tagged tests). They sit on the access rules: the admin API's role and scope checks, small-cell suppression and the partner gate, the SSO flow, token and label checks.
  • make test-mcdc fails while one is open and runs in CI; make check-mcdc-fresh fails a stale snapshot; check-assurance shows a MC/DC box and MCDC_MIN gates 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 plain cargo 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.
  • ADR-025; spec 002 requirements 11-13; a MC/DC section in CONTRIBUTING.md and README lines.
  • 148 tagged tests in the modules of the decisions, and in crates/frank/tests/api.rs and cli.rs where the full app is needed.

Changed

  • make check-assurance shows a MC/DC box and accepts MCDC_MIN.
  • CI runs make test-mcdc with cargo-mvl-mcdc at db-core's pin (MVL_MCDC_REV) and uploads mcdc.json with 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

  • Nothing user-visible.

Changelog

  • Assurance: MC/DC over every decision of two or more conditions (make test-mcdc, ADR-025), with the admin, disclosure, SSO and token rules covered vector by vector.

Testing

  • cargo test --workspace --locked: no failures
  • make test-mcdc: 48/48 decisions covered, check-mcdc-fresh current
  • make lint (fmt, clippy native and wasm32) and cargo clippy --features frank/tls -D warnings
  • make check-mvl-limit, make check-assurance (100% of scenarios tested, 0 dead links)
  • Unit tests added/updated (148 tagged tests)
  • CI run on this branch: the MC/DC step is new, so it is the first run of cargo install of cargo-mvl-mcdc at the pinned revision

Related 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

iheitlager and others added 6 commits November 14, 2026 13:43
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>
@iheitlager iheitlager closed this Nov 14, 2026
@iheitlager
iheitlager deleted the feat/317-mcdc branch November 14, 2026 13:14
iheitlager and others added 2 commits November 14, 2026 14:32
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>
@iheitlager iheitlager reopened this Nov 14, 2026
@iheitlager
iheitlager merged commit 6dc2f69 into main Nov 14, 2026
6 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.

feat(assurance): MC/DC obligations and discharge with rust-mcdc, as in db-core

1 participant