Skip to content

ci(coq-build): expand Print Assumptions to all four Phase D theorems#243

Merged
hyperpolymath merged 1 commit into
mainfrom
ci/coq-build-print-assumptions-expand
May 30, 2026
Merged

ci(coq-build): expand Print Assumptions to all four Phase D theorems#243
hyperpolymath merged 1 commit into
mainfrom
ci/coq-build-print-assumptions-expand

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

  • Expands the `coq-build.yml` Print Assumptions audit from 1 theorem to 4 — surfaces `Admitted` / `Axiom` slippage on EVERY Phase D top-level result, not just `preservation_l2_via_l1`.
  • Single `coqtop` session amortises ML startup across four prints.
  • Tail bumped from 40 to 160 lines to fit four print blocks (~40 lines each).

What changes

The Print Assumptions step now invokes all four Phase D top-level results:

Theorem File Landed in
`preservation_l1` `Semantics_L1.v` (pre-Phase D — Theorem)
`preservation_l2_via_l1` `TypingL2.v` (L2-hybrid landing)
`preservation_l2_app_eff_beta_linear` `TypingL2.v` #228
`preservation_l2_app_eff_beta_ground_nonlinear` `TypingL2.v` #233

Why this matters

`coq-build.yml` shipped in #231 (closed #227) covered only `preservation_l2_via_l1`. The original acceptance criteria called for the four-theorem set so that every Phase D result the build oracle backs is audited per-PR. Without this, a new `Admitted.` in a β-case lemma would slip through with green CI as long as `preservation_l2_via_l1`'s assumption set didn't change.

Relationship to other in-flight work

Test plan

Refs

🤖 Generated with Claude Code

Adds three more Phase D top-level results to the build-oracle's Print
Assumptions audit so any new Admitted / Axiom slippage shows up as a
diff in CI output, not just slippage in `preservation_l2_via_l1`:

  - preservation_l1                                (Semantics_L1.v)
  - preservation_l2_app_eff_beta_linear            (TypingL2.v, #228)
  - preservation_l2_app_eff_beta_ground_nonlinear  (TypingL2.v, #233)

One coqtop session prints all four, amortising the OCaml/Coq startup
cost. Tail bumped from 40 to 160 lines to fit four print blocks.

Refs #227 (closed by #231 which shipped the workflow): the original
acceptance criteria called for these four theorems; #231 landed only
the first. This closes the per-theorem coverage gap.

Complementary to #236 (touches container.options, different section
of the file, no expected conflict). Independent of the ruleset gap
(workflow remains informational until `required_status_checks` is
added — owner action).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath enabled auto-merge (squash) May 30, 2026 16:06
@hyperpolymath hyperpolymath merged commit 7068cc3 into main May 30, 2026
6 of 16 checks passed
@hyperpolymath hyperpolymath deleted the ci/coq-build-print-assumptions-expand branch May 30, 2026 16:22
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 75 issues detected

Severity Count
🔴 Critical 11
🟠 High 16
🟡 Medium 48

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Action perpolymath/standards/.github/workflows/governance-reusable.yml@main\n needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in abi-verify.yml",
    "type": "missing_timeout_minutes",
    "file": "abi-verify.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in boj-build.yml",
    "type": "missing_timeout_minutes",
    "file": "boj-build.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in codeql.yml",
    "type": "missing_timeout_minutes",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in coq-build.yml",
    "type": "missing_timeout_minutes",
    "file": "coq-build.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in governance.yml",
    "type": "missing_timeout_minutes",
    "file": "governance.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in hypatia-scan.yml",
    "type": "missing_timeout_minutes",
    "file": "hypatia-scan.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in instant-sync.yml",
    "type": "missing_timeout_minutes",
    "file": "instant-sync.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in mirror.yml",
    "type": "missing_timeout_minutes",
    "file": "mirror.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in rust-ci.yml",
    "type": "missing_timeout_minutes",
    "file": "rust-ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

hyperpolymath added a commit that referenced this pull request May 30, 2026
…locker) (#254)

## Summary

Closes the path-filter blocker that prevents #244 (the owner action that
adds `required_status_checks` to the Base ruleset on `main`) from
landing
without collateral damage.

The `Coq build — formal/_CoqProject` check shipped in #231 is
path-filtered
to `formal/**` + the workflow file itself. Once the Base ruleset (id
`14285235`) gains a `required_status_checks` rule naming that context,
every
PR that does NOT touch `formal/**` would leave the check "expected but
not
reported" and be blocked indefinitely.

Fix: refactor to the always-on aggregator pattern. The single new
context
that goes into the ruleset is `coq-build-gate`; it ALWAYS runs and
reports
the right verdict regardless of which paths changed.

## Mechanics

1. `on:` block drops the `paths:` filter — workflow triggers on every PR
   and every push to main.
2. New `detect-relevant-changes` job diffs against the PR base
(`github.event.pull_request.base.sha` / `github.event.before`) and sets
`outputs.relevant = true|false` using the same path list that lived in
   the on-trigger (`formal/` + this workflow).
3. The existing `coq-build` job gains `needs: detect-relevant-changes` +
   `if: needs.detect-relevant-changes.outputs.relevant == 'true'`. It
   skips cleanly on irrelevant PRs.
4. New `coq-build-gate` job (`if: always()`, `needs: [detect,
coq-build]`):
   - SUCCESS immediately if `RELEVANT != 'true'`.
- FAILURE if `detect-relevant-changes` itself didn't succeed
(fail-safe).
   - SUCCESS iff `coq-build.result == 'success'` on a relevant change.
   - FAILURE otherwise.

The `coq-build` job itself is untouched: same `coqorg/coq:8.18`
container
with `--user root`, same `coq_makefile -f _CoqProject -o build.mk &&
make`,
same `Print Assumptions` audit of the four Phase D theorems
(`preservation_l1`, `preservation_l2_via_l1`,
`preservation_l2_app_eff_beta_linear`,
`preservation_l2_app_eff_beta_ground_nonlinear`).

## Ruleset migration (post-merge, separate operation)

Once this PR is green on main, the #244 owner action becomes:

```bash
# Append required_status_checks naming `coq-build-gate` (NOT the underlying
# `Coq build — formal/_CoqProject`, because that one skips on irrelevant PRs
# and would re-introduce the exact "expected but not reported" block this
# PR exists to avoid).
gh api -X PUT repos/hyperpolymath/ephapax/rulesets/14285235 --input /tmp/patch.json
```

## Test plan

- [ ] `coq-build-gate` green on this PR (path is
`.github/workflows/coq-build.yml`
      → relevant=true → coq-build runs → gate aggregates).
- [ ] After merge, a no-formal-change PR shows `coq-build-gate` green
while
      `coq-build` is "Skipped".
- [ ] After merge, the #244 owner action switches the Base ruleset's
      required context from absent to `coq-build-gate`.
- [ ] An intentional broken-build PR (touching `formal/`) shows
      `coq-build-gate` red and admin-merge blocked.

## Prior-art

panic-attack#90 (already landed) applied the same pattern to
`chapel-ci.yml`.
This PR is the single-job variant of the same refactor.

## Refs

- #244 — owner action this PR unblocks
- #231 — `coq-build.yml` ships
- #236 — EACCES container fix
- #243 — Print Assumptions audit expansion
- panic-attack#90 — prior-art (chapel-ci aggregator)

Generated with [Claude Code](https://claude.com/claude-code)
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.

ci: add Coq build oracle to workflows — admin-merge can land broken main today

1 participant