feat(validation): add cross-engine conformance inventory contract - #1081
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds a provider-neutral Python conformance inventory. It validates immutable engine, evidence, capability, and inventory records, produces deterministic manifests and fingerprints, documents the contract, and adds extensive edge-case and record-sealing tests. ChangesCross-engine conformance inventory
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟡 Moderate · up to The contract can currently publish covered or partially covered capabilities without any executed evidence, allowing conformance manifests to overstate validated coverage; merge should wait until at least one executed result is required. Unicode fingerprint normalization and stricter test patterns are localized follow-ups. Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Exact-head review completed at b210652. The inventory remains provider-neutral and source-free; the Git provenance validator now accepts full SHA-1 and SHA-256 commit identifiers, and the APA 7 doctoring record is present. Focused contract, fail-closed edge, and record-sealing tests pass (38 passed); Ruff and diff checks pass. Full external-engine harness execution remains intentionally outside this bounded slice. |
|
Current-head RCA and repair: CodeRabbit identified that covered or partially_covered capabilities could contain only not_executed or not_applicable evidence. At 05b7b8f, both statuses now require at least one passed, failed, or indeterminate executed evidence row; unavailable/planned evidence remains explicit and cannot overstate validation. Added regression coverage for both statuses, updated APA doctoring/changelog guidance, and preserved the source-free/Rust-owned boundary. Focused contract, edge, and record-sealing tests: 38 passed; Ruff and diff checks pass. Re-review and regenerate all protected Checks for this exact head. |
|
Review exact current head 05b7b8f. The prior actionable finding is fixed: covered and partially_covered now require executed evidence. Review the evidence-state invariant, nested record sealing, SHA-1/SHA-256 provenance boundary, Rust numerical ownership, and current protected Checks only. @opencode-agent review @cwl-noema-review review |
Pull request was converted to draft
|
Exact-head review request for aef1598:\n\nThe remote head advanced. Please run the established review agents on exact current HEAD ; the conformance edge suite and docstring evidence were re-run locally against this exact head. |
|
Exact-head review request for aef1598: the remote head advanced; please run the established review agents on this exact HEAD. The conformance edge suite and changed-file docstring evidence were re-run locally against this exact head. |
|
@opencode-agent review @cwl-noema-review review Exact-current-head review request for Revalidated the prior review findings against this exact head: NFC normalization is present before conformance text hashing; all three schema-version regex assertions match literal |
|
Exact-head triage for inline finding 3822650386: the reported coverage asymmetry is already fixed in current head 4f14a75. ConformanceCapability now requires at least one PASSED, FAILED, or INDETERMINATE row for covered/partially_covered status and retains the empty-evidence error. The NFC normalization and literal schema-version regex fixes are also present. Focused proof: PYTHONPATH=.:python python -m pytest -q tests/test_cross_engine_conformance.py tests/test_cross_engine_conformance_edges.py tests/test_cross_engine_conformance_coverage_execution.py tests/test_cross_engine_conformance_record_sealing.py -> 40 passed. No source edit is needed; please publish a fresh exact-head formal review against this SHA rather than carrying the predecessor inline comment. |
* feat(validation): add conformance run provenance * fix(changelog): restore fragment headings * test(validation): reproduce run provenance replay bypass * fix(validation): replay run provenance before serialization * docs(validation): record provenance replay integrity * fix(validation): bind executed conformance to run output provenance (#1093) * test(conformance): require output provenance for executed evidence * fix(conformance): bind executed evidence to run outputs * test(conformance): align fixtures with executed provenance contract * docs(changelog): record executed conformance provenance gate * test(conformance): seal mutated output provenance before execution gate * test(conformance): provide provenance for executed mutation fixture * Revert "test(conformance): provide provenance for executed mutation fixture" This reverts commit b94cf2e. * test(conformance): provide legacy provenance fixture * feat(validation): complete conformance runtime provenance (#1095) * test(conformance): require runtime and redistribution provenance * feat(conformance): bind runtime and redistribution provenance * test(conformance): align inventory fixtures with runtime provenance * test(conformance): carry runtime identities in provenance replay fixture * test(conformance): carry runtime identities in execution fixture * docs(changelog): record runtime provenance contract * test(conformance): cover malformed runtime provenance controls * test(conformance): provide provenance for executed mutation fixture * feat(validation): strictly replay persisted conformance manifests (#1097) * test(conformance): require strict persisted manifest replay * feat(conformance): strictly replay persisted manifests * docs(changelog): record strict conformance manifest replay * test(conformance): cover nested manifest replay boundaries * test(conformance): require stable JSON resource failures * fix(conformance): stabilize bounded JSON replay failures * fix(conformance): bound parsed manifest nesting * test(conformance): provide provenance for executed mutation fixture
Current-head dispositionThe downstream conformance-provenance PR #1085 was merged into this root branch at Exact-head local verification at
No source edit is warranted. Fresh protected Checks and formal review must bind to this exact head; no stale approval or predecessor result is reused. |
…#1164) * test(validation): require accessible conformance evidence report * feat(validation): render accessible conformance evidence * docs(changelog): record conformance evidence report * test(validation): require downloadable long-form conformance rows * feat(validation): export long-form conformance evidence rows * docs(changelog): record long-form conformance export
…ine report Strix flagged this exact pattern on this PR (CWE-693, CVSS 6.5): escape(_CSP, quote=True) converts the CSP's literal 'none' source expression to 'none', which browsers do not parse as valid CSP syntax, silently disabling the meta-delivered policy. _CSP is a fixed module constant with no user-controlled content, so interpolating it directly is safe. This mirrors the same fix already applied to every other report generator on main in #1230. Added a regression assertion that the CSP is embedded unescaped. Verified: pytest tests/test_cross_engine_conformance_report.py -- 8 passed.
…ross-engine report" This reverts commit 051bc1b.
|
Self-correction: reverted my own `051bc1b` in `e48eebf`. That commit removed `escape(_CSP, quote=True)` on a false-positive premise (same one `fast-mlsirm#1230` was independently closed for): HTML character references in attribute source markup are decoded by the HTML parser before the attribute value is consumed, so `content="default-src 'none'"` yields the DOM attribute value `default-src 'none'` — the CSP pragma reads the decoded string, not the literal `'` bytes. See https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute#decoded_character_references_in_attribute_values . Strix's original finding on this PR was a false positive; escaping the attribute value was correct standard practice and removing it reduces defense-in-depth without fixing anything. Restored the escape call and reverted the two test assertions that pinned the (unnecessary) unescaped serialization spelling; the underlying 8-test suite passes unchanged. |
|
Caution Review failedAn error occurred during the review process. Please try again later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Advances #1077.
Bounded product slice
Introduce a provider-neutral, source-free
fast_mlsirm.cross_engine_conformancecontract for the first machine-readable cross-engine conformance inventory slice.covered,partially_covered,no_independent_engine,not_comparable, andplannedcapability states;passed,failed,indeterminate,not_executed, andnot_applicableexecution states without collapsing unavailable optional engines into success;Review and replay-integrity remediation
covered/partially_coveredcapabilities to contain at least one actually executed evidence row; that finding is resolved in the branch and covered by dedicated regressions.c0f6fa724b5629816cad19227360790ad20eb9b2adds regressions showing that Python'sobject.__setattr__can otherwise mutate an exact frozen/slots record after construction and let replay bypass semantic-control/container admission.9b278f22ae223f83bc670e93292f9d609b08b02erevalidates exact engine, evidence, capability, and inventory records before manifest/fingerprint replay. Mutated enum controls are rejected before.valuecallbacks and rebound collection subclasses are rejected before iteration.f021a4fd918e36ff3697556d963e1dc521579965records the replay-integrity boundary in the governed changelog without moving numerical ownership.f9ca1c2a786935db017377d262b85be859fbcd75is a compatible successor that adds only docstrings to replay test-fixture builders.4f14a754a1e016edd9a81bbd4ad4bfa367f8f4ccis the direct successor tof9ca1c2...; it repairs the authoritative changelog fragment to the canonical# Title/## Addedstructure. Production source is unchanged from the replay-integrity remediation lineage.Ownership boundary
This slice is Python schema, validation, provenance, and serialization only. It adds no likelihood, estimator, fitting, scoring, alignment, discrepancy, uncertainty, Monte Carlo, or other psychometric/statistical arithmetic. Production numerical work remains Rust-owned. External R/Stan/commercial engines remain optional isolated validation dependencies, never package/runtime dependencies or sole correctness oracles.
Acceptance boundary
This PR does not close #1077. Fixed-parameter harness execution, fitted-result alignment, bias/MAE/RMSE and discrepancy computation, ADEMP/Monte Carlo evidence, full protected-main capability inventory generation, isolated external-engine workflows, accessible HTML, disagreement registers, and release qualification remain subsequent bounded slices.
Current exact head is
4f14a754a1e016edd9a81bbd4ad4bfa367f8f4ccagainst protectedmain@04d0bc21a2a20693bcf16108cd76d394fe844d23; the branch is 18 commits ahead / 0 behind with merge-base exactly protected main. The stacked #1085 base tip is this exact head. Keep Draft until exact-current-head CI/security/package/coverage/docstring/review evidence is terminal and clean; predecessor-head evidence does not transfer.Summary by CodeRabbit
New Features
Documentation
Tests