Skip to content

Certified feature-model / variant consistency via ordeal's SAT core (EU AI Act evidence) #693

Description

@avrabe

rivet's variant solve (rivet-cli serve/variant.rs, feature-model*.yaml, #128/#466) validates configurations but produces no certificate, while EU AI Act Art. 12 audits (#99, #104) demand per-configuration trace evidence.

Proposal (two parts):

  1. Decide feature-model / variant consistency with ordeal's certified propositional-SAT core (exposed below the bit-blaster) and emit a cert.recheck()-able "config is valid / model is consistent" artifact — ordeal roadmap v0.14.0 (FEAT-011): the certificate as evidence — rules_ordeal + rivet artifact type + SAT front-end ordeal#67 (v0.13.0, propositional-SAT front-end).
  2. Define an ordeal-certificate rivet evidence artifact type (same ci: VS Code extension test infrastructure #67) so every verified transform in the toolchain — loom rule proofs, synth codegen, sigil overflow, spar layout, gale bitvector — lands as a machine-re-checkable DO-178C/ISO-26262/EU-AI-Act artifact rivet ingests. This is the cross-cutting evidence-spine piece; rivet is the natural consumer.

Boundary: feature-model consistency is propositional SAT (in scope, certified); no new theory needed.

Acceptance Criteria — Part 2 (ordeal-certificate artifact type — unblocked by ordeal v0.17.0)

  • New embedded schema (schemas/ordeal-certificate.yaml, or extend common.yaml) declares an ordeal-certificate artifact type carrying: produced-by (tool + version), checked-by (verifier + version), attests (claim: variant-consistent / variant-inconsistent / etc. + standards: DO-178C / ISO 26262 / EU-AI-Act-Art-12), cnf-sha256 + cnf-ref, proof-sha256 + proof-ref (LRAT for UNSAT / self-checked model for SAT per the honest boundary), and a structured recheck block (command, expect-exit).
  • Typed attests link-field: attests-transform (link → the artifact whose transform this certificate attests — a variant config, a loom rule, a synth codegen, a sigil overflow, a spar layout, a gale bitvector). Allowed-target rule declared so rivet validate's link-target-type check catches misuse.
  • rivet validate treats a re-checked certificate as a verification link, not a claimed status: a verifies link from a verification artifact to an ordeal-certificate whose recheck.command was run and exited 0 (recorded via verification-result or an equivalent field) counts toward coverage; a certificate whose recheck was never run does not.
  • Honest SAT boundary baked into the schema: for attests.claim: variant-consistent (SAT), the proof-* fields hold the self-checked model — ordeal ships no independently re-checkable SAT witness yet (UNSAT is the certificate-carrying verdict). Documented in the schema + the docs topic.
  • v1 reader boundary as an expected-error fixture: ordeal-cert/v1 is inline-payload-only — a bundle using cnf_ref/proof_ref indirection must surface as a legible Unsupported-class validation error, not a mystery deserialize failure (the boundary ordeal's from_cert_v1 enforces as BundleError::Unsupported).
  • Golden-file test: an ordeal-certificate artifact serializes / parses round-trip byte-identical; a link-target-type fixture demonstrates the attests-transform allowed-targets enforcement; a coverage-rule fixture demonstrates the "re-checked → counts" vs. "never re-checked → does not count" split.
  • rivet docs topic (e.g. docs/artifact-types/ordeal-certificate.md) explains the shape, the SAT boundary, and the recheck invocation contract, with ordeal-cert/v1 as shipped (ordeal v0.17.0, cert-bundle feature: Certificate::to_cert_v1 / from_cert_v1 with both content sha256s verified before parse returns, UnsatBundle::recheck()) linked as the upstream serialization contract.
  • Commit trailers: Implements: REQ-NNN (new REQ for the certificate ingestion type) + Refs: ordeal#67, #693.
  • Explicitly out of scope (Part 1, file separately): the --certify flag on rivet release check --variant / rivet variant solve that shells out to ordeal's propositional-SAT front-end and emits the certificate; the CI wiring; the rules_ordeal gate; the UNSAT-core surfacing as a variant validate diagnostic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions