Repository navigation
Specify LLVM vacuity and rejection analysis - #23
Conversation
|
Independent specification review requested for exact head 46285ad. Please review the classification lattice, LLVM segment/path interpretation, runtime/source-map identity boundary, and all-or-nothing packaging before implementation begins. Full local make ci passed; no hosted CI ran. |
Specification review — PR #23PR: #23 "Specify LLVM vacuity and rejection analysis" (draft, closes #5) Verdict: ⛔ Changes requested — 8 high / 9 medium / 3 low. Prior stateOne comment on the PR ( Issue #5 acceptance criteria against the diff:
HIGHS23-01 — Nothing in the spec makes a vacuous or unexecuted result a failure, anywhere
FR-004 specifies a classifier and a report. It never states that any classification is a failing verdict, and Failure this permits: an implementation that satisfies every FR-004 behaviour bullet literally returns a well-formed To close: state normatively which classifications are adverse, and require the analysis to yield a non-success outcome — distinct from S23-02 — The classification lattice is not a partition; the empty consequent set matches two rules at once
The lattice is four independent predicates with no stated precedence and no requirement that exactly one holds. For a clause with zero mapped
Failure this permits: first-match evaluation labels every implication-free clause To close: make the lattice a total, mutually exclusive function of ( S23-03 — No population floor, and the population is defined by the artifact it is supposed to guard
Worse: the schema has no way to declare that a clause is implication-bearing. Roles are a flat enum ( Failure this permits, concretely: a defect in the source-map emitter that drops To close: require the source map to declare, per clause, whether the clause is implication-bearing and how many consequent regions it must carry, with that count derived from the IR/lowering plan rather than from the map; require the analyser to reject a source map whose clause set does not exactly cover the generated artifact inventory it is analysed against; add a census row (analysed clauses, implication-bearing clauses, mapped consequents) and a floor beneath which the run is not a measurement. S23-04 — The
|
| # | Condition | What the spec obliges | Is success excluded? |
|---|---|---|---|
| 1 | Coverage export never supplied / operation never invoked | FR-004:15 "When … are supplied" — a guard with no else branch |
❌ No. The unsupplied case is unspecified; no record is produced |
| 2 | Export file absent or unreadable (producer never ran) | Nothing. interface-001:109 covers malformed and summary-only, not missing; io-failed is "reserved for atomic publication" (:60) |
❌ No |
| 3 | Generated file absent from the export | interface-001:98 "exactly one … filename matching" → reject |
✅ Yes |
| 4 | oracle_evaluation region absent from the source map |
interface-001:97 requires exactly one → missing region → reject |
✅ Yes — but nothing emits it (S23-04) |
| 5 | Region present, no LLVM segment covers it (optimised away, not instrumented) | Falls through to "not observed" → unexecuted |
❌ No. unexecuted has no defined verdict (S23-01), and "could not measure" is reported as "did not run" |
| 6 | rustc/LLVM version differs from the artifact's compiler | Nothing — not an input, not checked, not retained | ❌ No (S23-09) |
| 7 | Optimisation / -C instrument-coverage profile differs |
Nothing | ❌ No (S23-09) |
| 8 | Target triple differs / cross-compiled | Nothing — never mentioned | ❌ No (S23-09) |
| 9 | cargo-llvm-cov ≠ 0.9.0 or export ≠ 2.0.1, per the caller's declaration | FR-004:54 "fail as unsupported" |
✅ Yes — but on which axis is undefined (S23-10) |
| 10 | Producer identity is misdeclared by the caller | Nothing — declaration is never checked against the export's own root metadata | ❌ No (S23-05) |
| 11 | Test did not run / was skipped / was unavailable | Vocabulary is [passed, failed, aborted, not_computed]; no rule binds which applies; skipped/unavailable/inconclusive are not expressible |
❌ No (S23-05) |
| 12 | Test outcome contradicts the campaign counters (passed with failed > 0) |
Nothing — interface-001:107 forbids upgrading classification, not inconsistency |
❌ No (S23-05) |
| 13 | Campaign recorded zero cases (CampaignReport::new, never used) |
Nothing — no accepted-case floor for this slice | ❌ No (S23-17) |
| 14 | Source map covers only a subset of the generated clauses | Nothing — the analysed population is defined by the source map | ❌ No (S23-03) |
| 15 | Clause has zero mapped consequents because the emitter dropped them | interface-001:104 classifies it exercised |
❌ No — actively misreports (S23-03) |
| 16 | Attestation context invalid / digest mismatch / identity mismatch | interface-001:109 → diagnostics, no bundle |
|
| 17 | Analyser fails internally | inconclusive exists (interface-001:59) but is scoped to "internal syntax or serialization control failure" in lowering and is not mapped for coverage |
❌ No (S23-11) |
| 18 | Any analysed clause classifies vacuous or partially_exercised |
Report it. Nothing more | ❌ No. The bundle is produced and its attestation derives passed (S23-01) |
14 of 18 conditions do not exclude a success outcome. Under DO-330 §6 tool-operational-requirements terms, the specified tool can return "check performed, result acceptable" for a run in which it performed no check.
Traceability check
| New/changed requirement | Matrix row | Binds to |
|---|---|---|
FR-004:32-33 (consume, don't implement, a coverage engine) |
none | Nothing. No AC. Asserted, unverifiable |
FR-004:34-35 (vacuous definition) |
test-matrix.md:21 → TC-006 via AC-1 |
TC-006, 🚧 Planned. No implementation, no fixture |
FR-004:36-37 (unexecuted definition) |
:21 via AC-2 |
TC-006. Unfalsifiable today — S23-04 |
FR-004:38-40 (partially_exercised) |
:21 via AC-3 |
AC-3 does not name the value; pinned only in TC-006:33 prose — S23-02 |
FR-004:41-42 (implication-free clause) |
none | No AC. Contradicted by interface-001:104 — S23-02 |
FR-004:43-44 (counts/outcome independent) |
:21 via AC-6 |
TC-006. One-directional — S23-17 |
FR-004:45-47 (identity agreement, fail closed) |
:21 via AC-5 |
TC-006. Type mismatch unresolved — S23-12 |
FR-004:48-49 (path normalisation, no traversal) |
:21 via AC-5 |
TC-006. No staging rule — S23-08 |
FR-004:50-51 (retained identity set) |
:22 → "Inspection" |
Nothing. Not a test case, not a named procedure — S23-16 |
FR-004:52-54 (qualified profile; all else unsupported) |
none | No AC. Checked against a caller assertion — S23-05 |
interface-001:97 (oracle_evaluation per clause) |
none | No FR owns it, no AC, no row, nothing emits it — S23-04 |
interface-001:99 (segment semantics) |
none directly | The soundness core of the analysis has no requirement and no AC — S23-07 |
interface-001:106 (test_outcomes vocabulary) |
none | Not reconciled with PGM-01's twelve or with TC-012 — S23-05 |
interface-001:108 ("report schema identity") |
:22 via AC-4 |
Names a schema document that does not exist — S23-13 |
MP-001:64-72 (coverage producer + mutation controls) |
n/a (measurement policy) | Consistent with suites.md and MP-001:226-229 declining a suite. ✅ Correct |
schemas/…:21 (oracle_evaluation role) |
none | Widened enum; no producer, no consumer, no assertion — S23-04, S23-15 |
Six of sixteen new normative statements have no acceptance criterion. Two bind to the literal string Inspection. One binds to a nonexistent schema. Every TC-006-bound row is 🚧 Planned, which is honest and correctly stated at test-matrix.md:47 and MP-001:226-229.
What is right
Stating this so the rework is targeted rather than wholesale:
- The boundary is correct and consistently held: LLVM/cargo-llvm-cov produces, codegen validates/maps/classifies/packages, and
FR-004:32-33,MP-001:66-68and the review's Decision (planning/vacuity-preimplementation-review.md:49-53) all forbid a local coverage engine, evidence store, attestation schema or verifier. That is the right refusal. - Separating producer version from LLVM export-format version (
planning/vacuity-preimplementation-review.md:21-25) is a real distinction most specs collapse. - Refusing to declare an FR-004 suite or proof obligation while nothing exists (
spec/evidence/suites.md,MP-001:226-229) is exactly right: "a proof obligation whose subject does not exist is the most complete false green available." - The
failed ⊆ acceptedinvariant claimed atinterface-001:105is accurate againstquire-contract-runtime/src/accounting.rs:43-54, :88-93atorigin/main60749bc, and consuming the pinnedCampaignReportrather than a caller lookalike is the right call. - No
domain=anywhere; internal links relative (FR-004:69); ecosystem refsix://; no Mermaid; module keys unchanged.
Process feedback (recorded to the assurance-feedback log, not blocking)
-
Quoin's evidence schema cannot express which validator a negative fixture discriminates. S23-08 exists only because that fact is unrepresentable in evidence and therefore has to be pinned in prose in every spec, in every repo, forever. This repo has now written the rule twice by hand (
MP-001:86-92for attestation fields) and omitted it once (MP-001:64-72for coverage). Adiscriminates: <validator-id>field on a negative evidence row, plus a requiredcontrol: <row-id>naming the positive case, would make the omission mechanically detectable instead of a review finding. -
The shared verification vocabulary has no machine-readable definition, so every repo re-types it and drifts. PGM-01's twelve states live as prose at
quire-contract-ir/spec/program/PGM-01-governance.md:221-224.interface-001:106in this PR introducesaborted, which is in no vocabulary, and dropsskipped/unavailable/inconclusive, which are the three states the DO-330 posture most depends on.quire validatecannot catch this because there is nothing to validate against. A published enum — a schema or aquire-exported list — that specs can declare conformance to would turn S23-05 into a lint. -
The TestMatrix structure permits a verification method (
Inspection) in the Test Case column, which produces rows that bind to nothing.spec/test-matrix.md:19, 22, 26all carry the literal stringInspectionwhere a TC identifier belongs. A grep for coverage succeeds; the binding is empty. This is the "a tag that greps fine can still bind to nothing" pattern at the matrix level. EitherInspectionshould require a named inspection-record artifact ID, or the schema should reject a non-TC value in that column. Related and already tracked: the coverage selector expectsStatuswhile the TestMatrix structure requiresCoverage Status(spec/test-matrix.md:35-39, upstreamspec-artifacts-process#77), which means this matrix is not currently machine-checked at all.
Separately, and lower priority: no repo in this eight-crate family has a spec/usecase/ directory, though the program rule states every spec needs a usecase and a stakeholder. Either the rule does not apply to library crates and should say so, or eight repos are non-conformant and the cookiecutter should emit the artifact.
Recommendation
Do not un-draft. The eight highs are all closable in spec text plus one schema decision, and none of them requires implementation work to resolve. Priority order for the rework:
- S23-01 — give the analysis a verdict. Without it nothing else matters.
- S23-06 — emit an attestation on failure.
unavailablemust be reachable. - S23-07 — fix the segment/region observation rule and decide the column-granularity question.
- S23-04 + S23-03 — give
oracle_evaluationan owning requirement, and derive the population floor from something other than the source map. - S23-02, S23-05, S23-08 — partition the lattice, fix the outcome vocabulary, adopt the staging rule MP-001 already states.
- S23-14 before anything else touches
planning/— theREV-008collision and the duplicateplanning/vacuity-preimplementation-review.mdon Agent A's branch will conflict on merge regardless of this review's outcome.
Re-request review at the new exact head. Nothing was run, edited, or dispatched for this review; every citation above is read from 46285ad5da502f363782a22842d1bbb3c732db4e and from sibling repositories at their pushed origin/main heads (quire-contract-runtime 60749bc, quire-contract-ir 8ce5c2d, quire-analyze 5f37678, tl-syntax 4cb5787, tl-parse 1ba1cef, tl-rewrite e7411a4, tl-mltl 58f858e).
|
Recovery checkpoint published at The bounded slice adds generated entry probes, an independent typed implication census, strict bounded LLVM parsing, and measured exercised/vacuous/partial/unexecuted classification. Missing/gap/partial mappings remain unavailable rather than becoming measured zero. Existing source-size guards remain; probe extraction is linear. Real generated oracle controls establish LLVM JSON 3.0.1 with cargo-llvm-cov 0.9.0 and stable rustc 1.94.1. The earlier unqualified 2.0.1 assumption is explicitly corrected; unqualified versions remain unsupported. No tools were installed or silently substituted. Final-head verification: all ten oracle and five primitive tests on stable; native coverage plus five primitives under Rust1.75.0. The preceding implementation commit also passed all fifteen on1.75.0. Clippy all-targets, formatting, spec validation and diff checks passed. Independent review reran seven focused tests including the pinned native coverage fixture and found no blocker in this slice. FR004 remains planned: IR-owned complete population binding (#50), full package identity in maps, native campaign/run provenance, aggregate schema and consuming coverage gate are not yet implemented. No private binder, obsolete evidence framework, coverage attestation, or human sufficiency decision is introduced. REV014/015 preserve the preimplementation review and gap dispositions. Nonblocking review hardening remains: hoist the repeated root-prefix allocation outside the file loop. |
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDww4TaMhjT6b7U7rzsDPR # Conflicts: # plan/PLAN-001-codegen-v01/tasks/Task-005-backends.md # spec/test-matrix.md
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDww4TaMhjT6b7U7rzsDPR
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDww4TaMhjT6b7U7rzsDPR # Conflicts: # plan/PLAN-001-codegen-v01/tasks/Task-005-backends.md # spec/interface/interface-001-codegen-api.md
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDww4TaMhjT6b7U7rzsDPR # Conflicts: # Cargo.lock # Cargo.toml # plan/PLAN-001-codegen-v01/plan.md # plan/PLAN-001-codegen-v01/tasks/Task-005-backends.md # plan/PLAN-001-codegen-v01/tasks/Task-006-parity.md # spec/assurance/MP-001-codegen-measurements.md # spec/evidence/suites.md # spec/functional/FR-001-deterministic-oracles.md # spec/functional/FR-004-vacuity-evidence.md # spec/interface/interface-001-codegen-api.md # spec/test-matrix.md # spec/test/TC-006-vacuity.md # src/harness.rs # src/lib.rs # src/oracle.rs # src/publication.rs # src/vacuity.rs
Begins #5 at its required specification-review gate. This PR contains no analyzer implementation and closes no FR-004 matrix row.
The proposed boundary:
The preimplementation review records FND-2001 through FND-2010 in planning/vacuity-preimplementation-review.md. It explicitly forbids a local coverage engine, evidence store, attestation schema, or verifier.
Local verification at 46285ad:
The full local gate passed on Rust 1.75 and the native toolchain, including shared Quoin/Quire assurance. No hosted CI was dispatched and no workflow file changed.
Independent specification review is requested for exact head 46285ad. Implementation remains blocked on that review.