[ACP-HARDEN-110] Isolate scaffold output from model-check evidence#3666
Conversation
❓ Code Generation Drift DetectionStatus: Automated by AE-Framework Codegen |
🔍 Verification Summary
Unlinked (top 5)Linked examples (up to 3)Hit basis (tests/formal)- Test hits: title=0 id=0 tag=0 - Formal hits: title=0 id=0 tag=0Non-OK completed modules (top 5)Alloy non-OK completed executions (top 5) |
Generate Artifacts PreviewGenerated at: 2026-07-22T18:03:08.529Z
|
CodeX Artifacts Summary
|
AE-Spec Validation ReportStatus: ✅ Passed Validation Results
AE-IR Summary
BDD Step Lint (non-blocking)Usecases: 1 Issues: 1
|
KvOnce Trace Validation
|
There was a problem hiding this comment.
Pull request overview
This PR hardens the formal-evidence boundary by separating FormalAgent/Codex scaffold generation from actual model-check execution evidence, introducing a new execution-report contract for model checking, and ensuring Assurance/policy/PR summaries only count runner-reported executions.
Changes:
- Remove pseudo model-check surfaces (FormalAgent/MCP/Codex/quickstart) and make scaffold output explicitly
artifactStatus=draft(non-evidence). - Introduce and enforce
model-check-report/v1execution-report semantics (executed/failed/tool-error/not-run) with per-attempt provenance (tool/version/input/result/scope/assumptions). - Fail-closed / reject untrusted formal artifacts in Assurance aggregation and CI enforcement, with regression tests and updated docs.
Reviewed changes
Copilot reviewed 46 out of 49 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/scripts/render-codex-summary.test.ts | Asserts summary rendering ignores legacy pseudo artifacts |
| tests/unit/scripts/codex-quickstart-cli.test.ts | Guards quickstart stays scaffold-only (no pseudo evidence) |
| tests/unit/formal/run-model-checks-security.test.ts | Validates execution-report schema + status boundaries |
| tests/unit/formal/generate-formal-summary-v1.test.ts | Adds runner-reported executionEvidence expectations |
| tests/unit/ci/verify-workflow-formal-summary.test.ts | Locks workflow summary to executed-only counting |
| tests/unit/ci/validate-formal-summary-v2.test.ts | Enforces required fields for executionEvidence in v2 |
| tests/unit/ci/policy-gate.test.ts | Regression: model claim blocks when evidence missing |
| tests/unit/agents/formal-agent.test.ts | Confirms deterministic draft scaffold + no model-check API |
| tests/unit/agents/codex-task-adapter.test.ts | Ensures Codex formal phase reports not-run + no model-check.json |
| tests/scripts/claim-evidence-manifest.test.ts | Ensures rejected formal artifacts don’t become evidence |
| tests/scripts/assurance-aggregate-lanes.test.ts | Rejects pseudo/draft/incomplete formal summaries from lanes |
| tests/agents/agent-mcp-boundary-smoke.test.ts | MCP smoke: tool list excludes model_check; draft scaffold exposed |
| src/self-improvement/phase3-simple.ts | Removes enableModelChecking config usage |
| src/self-improvement/phase3-formal-testing.ts | Removes enableModelChecking config usage |
| src/mcp-server/formal-server.ts | Removes model_check tool; switches listTools schemas to JSON Schema |
| src/agents/user-stories-task-adapter.ts | Removes enableModelChecking config usage |
| src/agents/ui-ux-task-adapter.ts | Removes enableModelChecking config usage |
| src/agents/task-types.ts | Adds structured formal scaffold vs modelChecking separation |
| src/agents/natural-language-task-adapter.ts | Removes enableModelChecking config usage |
| src/agents/formal-agent.ts | Draft-only FormalAgent; deterministic IDs; removes pseudo model checking |
| src/agents/domain-modeling-task-adapter.ts | Removes enableModelChecking config usage |
| src/agents/codex-task-adapter.ts | Stops writing pseudo model-check evidence; reports runner commands |
| scripts/verify/run-model-checks.mjs | Produces model-check-report/v1 execution report + per-attempt evidence |
| scripts/verify/render-codex-summary.mjs | Renders execution-report status; ignores legacy pseudo contracts |
| scripts/formal/generate-formal-summary-v1.mjs | Preserves only runner-reported executionEvidence (no backfill) |
| scripts/codex/quickstart.mjs | Quickstart now scaffold-only; documents checker “not run” |
| scripts/assurance/aggregate-lanes.mjs | Rejects untrusted formal artifacts; requires executionEvidence for promotion |
| schema/model-check-execution-v1.schema.json | New execution-report schema for model-check.json |
| schema/formal-summary-v2.schema.json | Adds executionEvidence object constraints |
| schema/formal-summary-v1.schema.json | Adds executionEvidence object constraints |
| schema/codex-task-response.schema.json | Adds formal scaffold/modelChecking structure to contract |
| schema/assurance-summary.schema.json | Adds warning code for untrusted-formal-summary |
| README.md | Documents generation vs execution boundary |
| package.json | Routes model-check script to the real runner |
| docs/verify/VERIFY-LABELS.md | Updates enforce-formal semantics (executed-only, fail-closed) |
| docs/verify/FORMAL-CHECKS.md | Documents ALLOY_CMD_JSON argv-safe execution + report semantics |
| docs/reference/CONTRACT-CATALOG.md | Adds model-check execution-report contract + evidence rules |
| docs/quality/formal-runbook.md | SSOT for scaffold/execution boundary + evidence eligibility |
| docs/phases/phase-6-uiux.md | Removes enableModelChecking mention in example config |
| docs/legacy/agents/formal-agent.md | Marks legacy model-check surfaces as historical/non-evidence |
| docs/integrations/QUICK-START-CODEX.md | Updates quickstart outputs and notes model checker not run |
| docs/integrations/examples/model-check.example.json | Replaces legacy pseudo example with not-run execution report |
| docs/integrations/CODEX-INTEGRATION.md | Updates formal phase behavior description (scaffold-only) |
| docs/integrations/CODEX-ARTIFACTS.md | Clarifies scaffold vs actual model-check artifacts and semantics |
| docs/agents/commands.md | Updates lastVerified stamp |
| artifacts/types/src/agents/formal-agent.d.ts | Updates public typings: draft-only, no runModelChecking |
| artifacts/reference/types/public-types.current.d.ts | Updates public type snapshot for FormalAgent changes |
| api/public-types.d.ts | Updates public-types snapshot SHA and FormalAgent types |
| .github/workflows/verify.yml | Summary/enforcement counts only completed executed results; adds Alloy version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ootakazuhiko
left a comment
There was a problem hiding this comment.
Independent review found four remaining blockers in the truthful formal-evidence boundary. The PR should remain Draft until the inline items are addressed and exact-head CI is rerun.
❓ Code Generation Drift DetectionStatus: Automated by AE-Framework Codegen |
Cedar Policies (report-only)Files: 1 (json=0, cedar=0) Policy: report-only |
🔍 Verification Summary
Unlinked (top 5)Linked examples (up to 3)Hit basis (tests/formal)- Test hits: title=0 id=0 tag=0 - Formal hits: title=0 id=0 tag=0Non-OK completed modules (top 5)Alloy non-OK completed executions (top 5) |
CodeX Artifacts Summary
|
❓ Code Generation Drift DetectionStatus: Automated by AE-Framework Codegen |
❓ Code Generation Drift DetectionStatus: Automated by AE-Framework Codegen |
🔍 Verification Summary
Unlinked (top 5)Linked examples (up to 3)Hit basis (tests/formal)- Test hits: title=0 id=0 tag=0 - Formal hits: title=0 id=0 tag=0Non-OK completed modules (top 5)Alloy non-OK completed executions (top 5) |
1 similar comment
🔍 Verification Summary
Unlinked (top 5)Linked examples (up to 3)Hit basis (tests/formal)- Test hits: title=0 id=0 tag=0 - Formal hits: title=0 id=0 tag=0Non-OK completed modules (top 5)Alloy non-OK completed executions (top 5) |
CodeX Artifacts Summary
|
❓ Code Generation Drift DetectionStatus: Automated by AE-Framework Codegen |
🔍 Verification Summary
Unlinked (top 5)Linked examples (up to 3)Hit basis (tests/formal)- Test hits: title=0 id=0 tag=0 - Formal hits: title=0 id=0 tag=0Non-OK completed modules (top 5)Alloy non-OK completed executions (top 5) |
CodeX Artifacts Summary
|
❓ Code Generation Drift DetectionStatus: Automated by AE-Framework Codegen |
🔍 Verification Summary
Unlinked (top 5)Linked examples (up to 3)Hit basis (tests/formal)- Test hits: title=0 id=0 tag=0 - Formal hits: title=0 id=0 tag=0Non-OK completed modules (top 5)Alloy non-OK completed executions (top 5) |
CodeX Artifacts Summary
|
❓ Code Generation Drift DetectionStatus: Automated by AE-Framework Codegen |
🔍 Verification Summary
Unlinked (top 5)Linked examples (up to 3)Hit basis (tests/formal)- Test hits: title=0 id=0 tag=0 - Formal hits: title=0 id=0 tag=0Non-OK completed modules (top 5)Alloy non-OK completed executions (top 5) |
CodeX Artifacts Summary
|
❓ Code Generation Drift DetectionStatus: Automated by AE-Framework Codegen |
🔍 Verification Summary
Unlinked (top 5)Linked examples (up to 3)Hit basis (tests/formal)- Test hits: title=0 id=0 tag=0 - Formal hits: title=0 id=0 tag=0Non-OK completed modules (top 5)Alloy non-OK completed executions (top 5) |
Human review response summary — five requested correctionsAll five chat-supplied human review requirements have been implemented and validated on exact head
Exact fix commits
Validation
Remaining limitations
|
🔍 Verification Summary
Unlinked (top 5)Linked examples (up to 3)Hit basis (tests/formal)- Test hits: title=0 id=0 tag=0 - Formal hits: title=0 id=0 tag=0Non-OK completed modules (top 5)Alloy non-OK completed executions (top 5) |
CodeX Artifacts Summary
|
❓ Code Generation Drift DetectionStatus: Automated by AE-Framework Codegen |
🔍 Verification Summary
Unlinked (top 5)Linked examples (up to 3)Hit basis (tests/formal)- Test hits: title=0 id=0 tag=0 - Formal hits: title=0 id=0 tag=0Non-OK completed modules (top 5)Alloy non-OK completed executions (top 5) |
CodeX Artifacts Summary
|
Solo-maintainer merge decision
This decision does not represent AI review as human approval. |
Summary
FormalAgent, the formal MCP boundary, and the Codex adapter limited to deterministic scaffold generation withartifactStatus=draftandmodelChecking.status=not-runformal-runner-output/v1andformal-execution-evidence/v1contractsverificationKindcapability semantics and derive claim eligibility deterministically instead of trusting runner names or runner-supplied claim classesmodel-check-resultsFive review requirements
1. Verification capability semantics
verificationKind:presence | build | typecheck | conformance | model-check | proof-check.verificationKind; it is not an independently writable authority.cspx:typecheckremainstypecheck, current Leanlake buildremainsbuild, and Kani tool detection remainspresence. None can satisfy model/proof claims.2. SMT and SPIN semantics
sat | unsat | unknownresult token and binds solver/version/input/expected/actual/timeout/exit/log/assumptions. Success requires expected=actual; unknown, missing expectation, malformed/multiple results, timeout, nonzero exit, and mismatch are non-success.3. Referenced-log packaging
model-check-resultsnow containsmodel-check.json, all*.tlc.log.txt, and all*.alloy.log.txt.4. Required/optional materialization
required=true; OpenAPI convenience scaffold:required=false.formal-primary-artifact-materialization-failed, omits nonexistent paths and checker commands, and requires materialization retry.partial, warning-only, and non-blocking.5. Actual label-gated Formal Verify
run-formalandenforce-formalare applied and retained on the PR.56c36bd4dd9609bd2e3a1a81bef757a2223c2ef3.Formal Reports Aggregateexecuted successfully.strict_formal_summary_v1: true;Enforce Formal Summary v1 JSON (strict)executed and succeeded instead of being skipped.--require.typecheck, Lean remainedbuild, and Kani remainedpresence; the proof lane remained unobserved.Exact head
6f4ac772a5c6222170b864e6d9cdf7695635b9499811a0d4240ad0a2edd6866b146750cda7780c659a410d3772431dc738a2d9c3eb5f928466cf3ef697dbdb2e5d679db4e14b724f79e32cf86b6e9a4460b8e637a98d123af6658d9fb8343224030740a056c36bd4dd9609bd2e3a1a81bef757a2223c2ef39811a0d4240ad0a2edd6866b146750cda7780c65— preserve deterministic scaffold identity and metadata on repeated generationmainValidation
types:check,build, andgit diff --checkpassedmodel-checkproducersverify:model: detected 8 / executed 8 / skipped 0; TLC 5/5, Alloy 3/3, strict enforcement passedbuild,api:check, JSON/schema validation (99 schemas), doc consistency (448 docs / 0 failures / 0 warnings),verify:lite,verify:formal, actionlint v1.7.12, public type snapshot, Context Pack, Boundary Map, andgit diff --check: passedExact-head required CI
All 6/6 required check surfaces succeeded against
9811a0d4240ad0a2edd6866b146750cda7780c65.Exact-head Formal Verify
strict_formal_summary_v1=true; Formal Summary v1/v2 required validation success; workflow conclusion success.Compatibility impact
verificationKind; unknown producer/kind pairs and omitted/mutated kinds are rejected.requiredand truthful per-artifact materialization state. Failed artifacts no longer expose nonexistent paths.Remaining limitations
lake builddoes not establish the sorry/admit, proof declaration scope, or untrusted axiom policies needed forproof-check; it remains build evidence only.Review status
9811a0d4240ad0a2edd6866b146750cda7780c65run-formalandenforce-formalremain applied so future commits rerun the strict path.Refs #3656
Parent: #3655