Skip to content

proofs(agda): strict OPTIONS everywhere, strict CLI flags, stdlib digest pin, Veblen Smoke pins - #16

Merged
hyperpolymath merged 3 commits into
mainfrom
proofs/strict-flags-and-ci-pin
Nov 16, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
proofs/strict-flags-and-ci-pin

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

This is upkeep on the Agda gate. The Agda climb stays frozen (D-2026-06-21). This PR changes no definitions or theorems. Order-type fidelity of the Buchholz notation to ψ₀(Ω_ω) remains OPEN. The two Fidelity.agda postulates (carrier-height, denotation) are unchanged and still quarantined.

Changes

  • Strict pragma on all 77 modules. Every .agda file under verification/proofs/agda now opens with {-# OPTIONS --safe --without-K --cubical-compatible --exact-split --no-sized-types --no-guardedness #-}. No module raised an --exact-split rejection, so no clause was touched and no CATCHALL was added.

    • One departure, for review: Ordinal/Buchholz/Fidelity.agda gets the same pragma without --safe. It is outside the --safe cone by design, and a --safe pragma would make it uncheckable in any mode. If you want --safe there as well, it is a one-line change, and the file still fails the gate for the same reason.
  • Strict CLI flags. scripts/check-proofs.sh (line 102) and the canonical-invocation step in quality.yml now run agda --safe --without-K --cubical-compatible --double-check -W error -W noUnsupportedIndexedMatch. The manifest gate still requires the quarantined module to fail.

  • stdlib digest pin. STDLIB_SHA256 is now 407286af16f2b5b8aebe577b3610ae9b40ce296ed3c03c66444b5801c2fa3012. How it was obtained: the archive URL https://github.com/agda/agda-stdlib/archive/refs/tags/v2.3.tar.gz returned 403 from the session sandbox, so this digest is reproduced, not downloaded. It is the sha256 of git archive --format=tar --prefix=agda-stdlib-2.3/ v2.3 | gzip -cn, run on a clone of tag v2.3 (commit 8326c7475af1fa456ca04a0203c168d5d7ff842b, git 2.43.0). The job checks the pin against the real download and now prints the observed digest on a mismatch. This PR's CI run is the first real test of the pin. If it fails at the digest step, the correct value is in the log.

  • Smoke pins. Ordinal/Buchholz/Smoke.agda gains one open import … using (…) block per module, each with a header comment:

    Module Pinned names
    OrdinalExp ε₀-ε-number, ω^^-infl
    VeblenPhi φ₁-ε-number
    VeblenPhiNormal next-ε-least
    VeblenBinary φ-cont
    VeblenBinaryNormal φ-mono₂, φ-infl, φ-level-fixed-≤, φ-level-fixed-≥
    VeblenBinaryMono Γ₀-prefixed

    next-ε-least is exported by VeblenPhiNormal, not VeblenBinaryNormal. That is why VeblenPhiNormal has its own block, and why VeblenBinaryNormal pins its own headline theorems instead.

Testing

Run locally with Agda 2.7.0.1 (release tarball, sha256 matches AGDA_SHA256) and agda-stdlib v2.3 from git tag v2.3 @ 8326c74, with LC_ALL=C.UTF-8:

Command Result
bash scripts/check-proofs.sh agda on main, before the change PASS, as a baseline
LC_ALL=C.UTF-8 bash scripts/check-proofs.sh agda on this branch PASS: 76 gated modules PASS; Fidelity.agda "fail (quarantined, expected)"; all 77 files accounted for
cd verification/proofs/agda && find . -name '*.agdai' -delete && agda --ignore-interfaces --safe --without-K --cubical-compatible --double-check -W error -W noUnsupportedIndexedMatch All.agda rc 0, cold, 75 first-party modules checked, no warnings or errors
bash scripts/check-agda-trusted-base.sh PASS: exactly 2 postulate blocks (carrier-height, denotation) in Fidelity.agda, no escape pragmas

Fidelity still fails for its original reason:

File version Flags Output
main old Cannot postulate carrier-height with safe flag, then … denotation …
this branch new Cannot postulate carrier-height with safe flag, rc 42
this branch without --safe compiles, rc 0

With -W error, Agda stops at the first of the two postulates. The reason is the same, and no new flag error appears.

Negative test: misspelling one pin (Γ₀-prefixedX) fails Smoke with rc 42. Without -W error, Agda reports a missing using name only as a warning, so the new CLI flag is what makes these pins load-bearing.

CI has not run yet. Nothing here claims CI passed.

RSR Quality Checklist

Required

  • Tests pass: the local runs above. CI is pending.
  • Code is formatted: not applicable, no formatter covers .agda here.
  • No banned language patterns.
  • No banned functions (scan-dangerous runs inside the manifest gate).
  • SPDX headers unchanged and present.
  • No secrets.

As Applicable

  • docs/status/PROOF-STATUS.adoc still describes the §2.1 minimum invocation. It is not updated here: the added flags only make the gate stricter, and its dated receipts are historical.

Notes for review

  • Signing: the commits carry SSH signatures from the session's signing helper, not the owner's id_ed25519_signing key. I could not verify the signatures locally because no allowedSigners file is configured, so check GitHub's verification badge.
  • Beyond this repo: the session sandbox could not reach github.com/agda/agda-stdlib/archive/... (403), even with codeload.github.com added to the allowlist. Anonymous git clone of public repos worked. Agda upkeep sessions anywhere in the estate will need either that archive route or the git-archive reproduction used here.

Generated by Claude Code

Every .agda file under verification/proofs/agda now opens with
  {-# OPTIONS --safe --without-K --cubical-compatible --exact-split
      --no-sized-types --no-guardedness #-}
(76 gated modules). No --exact-split rejection arose under Agda 2.7.0.1 +
agda-stdlib v2.3, so no clause was changed and no CATCHALL was added.

Ordinal/Buchholz/Fidelity.agda is the one exception: it gets the same
pragma WITHOUT --safe. It is outside the --safe cone by design (it
declares the two open postulates carrier-height and denotation), and a
--safe pragma would make it uncheckable in any mode. It still fails the
manifest gate's --safe invocation for its original reason ("Cannot
postulate carrier-height with safe flag"), and compiles without --safe
under the remaining strict flags.

Claude-Session: https://claude.ai/code/session_01J4QvDj3HpjUjBmkva3d4HQ
One `open import ... using (...)` block per module, each with a header
comment: OrdinalExp (ε₀-ε-number, ω^^-infl), VeblenPhi (φ₁-ε-number),
VeblenPhiNormal (next-ε-least, which lives there, not in
VeblenBinaryNormal), VeblenBinary (φ-cont), VeblenBinaryNormal (φ-mono₂,
φ-infl, φ-level-fixed-≤, φ-level-fixed-≥) and VeblenBinaryMono
(Γ₀-prefixed). These are target-side facts only; Buchholz order-type
fidelity stays open.

A misspelled pin was checked to fail (rc 42) under -W error; without
-W error Agda reports a missing `using` name only as a warning.

Claude-Session: https://claude.ai/code/session_01J4QvDj3HpjUjBmkva3d4HQ
STDLIB_SHA256 is set to 407286af16f2b5b8aebe577b3610ae9b40ce296ed3c03c66444b5801c2fa3012.
It is REPRODUCED, not downloaded: the archive URL answered 403 from the
session sandbox, so the digest is of `git archive --format=tar
--prefix=agda-stdlib-2.3/ v2.3 | gzip -cn` on a clone of tag v2.3
(commit 8326c7475af1fa456ca04a0203c168d5d7ff842b, git 2.43.0). The job
compares it with the real download and now prints the observed digest on
a mismatch, so a wrong pin fails loudly and is fixed from the CI log.

scripts/check-proofs.sh and the canonical-invocation step both run
  agda --safe --without-K --cubical-compatible --double-check
       -W error -W noUnsupportedIndexedMatch
The manifest gate still requires the quarantined Fidelity.agda to fail.

Claude-Session: https://claude.ai/code/session_01J4QvDj3HpjUjBmkva3d4HQ
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Hypatia grid green

🟢 clean · commit 1ca4b870c4f8 · run 43940823235 · scope: this change (79 file(s))

Advisory: 11 row(s), worst 🔴 high (0 critical, 9 high in grid scope) — reported, never grading the change.

Unique graded findings across gating and advisory rows: 21 (21 reporter observations; 21 without sufficient identity to corroborate). Row counts remain per reporter; unique totals do not change gating.
Raw Hypatia alert-derived observations: 38 (code-scanning, Dependabot and secret-scanning; some may also be in SARIF; not an extra total).

Reporter Gate Status Critical High Medium Minor Since previous revision
Hypatia scan gating 🟢 clean 0 0 0 0 — same commit (no revision comparison)
panic-attack assail advisory 🟡 medium 0 0 2 0 — same commit (no revision comparison)
pons asinorum advisory 🟢 clean 0 0 0 0 — same commit (no revision comparison)
echidnabot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
rhodibot (RSR compliance) advisory 🟢 clean 0 0 0 0 — same commit (no revision comparison)
panicbot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
sustainabot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
glambot (presentation quality) advisory 🔵 minor 0 0 0 5 — same commit (no revision comparison)
seambot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
finishingbot (release readiness) advisory 🔴 high 0 9 5 0 — same commit (no revision comparison)
cipherbot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
accessibilitybot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
Hypatia scan: 1 finding(s)
  • 1 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
panic-attack assail: 19 finding(s)
  • medium ProofDrift — verification/proofs/agda/Ordinal/Buchholz/Fidelity.agda — 2 postulate block(s) (unproven axiom — verify these hold) in verification/proofs/agda/Ordinal/Buchholz/Fidelity.agda
  • medium CommandInjection — scripts/check-proofs.sh — 33 potentially unquoted variable expansions in scripts/check-proofs.sh
  • 17 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
pons asinorum: 9 finding(s)
  • 9 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
echidnabot: not_applicable — template default: enrol once the repository carries proofs and an ECHIDNA engine is configured
  • ⚪ not applicable: template default: enrol once the repository carries proofs and an ECHIDNA engine is configured
rhodibot (RSR compliance): 11 finding(s)
  • 11 further finding(s) in files this change does not touch: reported, not graded (0 critical, 10 high).
panicbot: not_applicable — panic-attack is already graded by the verdict grid's own panic-attack row, from static-analysis-gate.yml evidence; enrolling panicbot would report one scanner twice and give two rows that can disagree
  • ⚪ not applicable: panic-attack is already graded by the verdict grid's own panic-attack row, from static-analysis-gate.yml evidence; enrolling panicbot would report one scanner twice and give two rows that can disagree
sustainabot: not_applicable — reserved fleet slot; no adapter exists (gitbot-fleet bots/sustainabot/README.adoc)
  • ⚪ not applicable: reserved fleet slot; no adapter exists (gitbot-fleet bots/sustainabot/README.adoc)
glambot (presentation quality): 93 finding(s)
  • info GS-001 — Install git-seo for comprehensive SEO analysis: https://github.com/hyperpolymath/git-seo
  • info MACH-007 — ECOSYSTEM.scm not found in .machine_readable/ directory.
  • info MACH-007 — META.scm not found in .machine_readable/ directory.
  • info MACH-007 — STATE.scm not found in .machine_readable/ directory.
  • info MACH-005 — No robots.txt found. Consider adding one for crawler control.
  • 88 further finding(s) in files this change does not touch: reported, not graded (0 critical, 2 high).
seambot: not_applicable — template default: enrol once a seam register exists at spec/seams/seam-register.json
  • ⚪ not applicable: template default: enrol once a seam register exists at spec/seams/seam-register.json
finishingbot (release readiness): 206 finding(s)
  • high V1-DOC-ROADMAP.adoc — Required file ROADMAP.adoc not found (Project roadmap).
  • high TOOL-001 — .tool-versions file not found for asdf/mise version management.
  • high SCM-001-NEUROSYM.scm — Required SCM file NEUROSYM.scm not found (Neurosymbolic AI documentation).
  • high SCM-001-AGENTIC.scm — Required SCM file AGENTIC.scm not found (Agentic AI integration documentation).
  • high SCM-001-PLAYBOOK.scm — Required SCM file PLAYBOOK.scm not found (Operational playbooks and procedures).
  • high SCM-001-ECOSYSTEM.scm — Required SCM file ECOSYSTEM.scm not found (Project's place in the ecosystem).
  • high SCM-001-META.scm — Required SCM file META.scm not found (Meta-level information and architectural decisions).
  • high SCM-001-STATE.scm — Required SCM file STATE.scm not found (Project state and progress tracking).
  • high PH-100 — Found 127 placeholders, exceeds maximum allowed (0)
  • medium V1-COM-CONTRIBUTING.md — CONTRIBUTING.md file not found (Contribution guidelines).
  • medium V1-COM-CODE_OF_CONDUCT.md — CODE_OF_CONDUCT.md file not found (Code of conduct).
  • medium V1-SEC-001 — SECURITY.md not found for responsible disclosure.
  • medium TEST-001 — Could not determine if this is a Rust or Deno project.
  • medium REL-004 — No SECURITY.md file found
  • 192 further finding(s) in files this change does not touch: reported, not graded (0 critical, 4 high).
cipherbot: not_applicable — template default: enrol once the repository implements cryptography
  • ⚪ not applicable: template default: enrol once the repository implements cryptography
accessibilitybot: not_applicable — template default: enrol once the repository serves HTML
  • ⚪ not applicable: template default: enrol once the repository serves HTML

Scope: static findings reported by each row's tool at the named commit. The table grades only findings in files this change touches, so the colour answers "does this change introduce anything?", not "what does the whole repository still carry?". Standing findings are counted in each accordion and in report.json; the baseline filter remains the place where acknowledged debt is recorded. The lane state is the worst GATING row; advisory rows are listed and counted but never set it. Purple, red, yellow and blue grade the worst GRADED finding present; orange is evidence missing, malformed or a scanner that did not run; grey is an explicit scope exclusion with its reason. No row is a security certification. report.json, badge.json and the raw findings are in the verdict-grid artifact on the linked run.

Copy link
Copy Markdown
Owner Author

The Agda job has not run on this PR, and it has never run anywhere. The Code Quality workflow (quality.yml) ended in startup_failure on this PR (run 43939531015). This happens on main too (runs 42 and 44) and on every run since run 12 (2026-11-09). So none of the workflow's jobs start, agda included, and neither the stdlib digest pin nor the new flags have been tested in CI.

The failure is not caused by this PR:

Run Date Result
11 2026-11-02 success
12 2026-11-09 13:19 startup_failure

quality.yml was not changed between those two runs; the agda job was only added later, in #5. That points to a change outside the repo, probably in the Actions policy settings, but that is a guess. The reason for a startup failure is shown on the run page, which the session sandbox cannot load (403), and the API does not return it.

One candidate: editorconfig-checker/action-editorconfig-checker@51f63319… is the only action in quality.yml that no other workflow here uses. The other workflows use the same actions/checkout pin and start normally. I have not confirmed this.

Until the workflow starts, the local runs in the PR description are the only evidence for this PR.


Generated by Claude Code

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 16, 2026 19:44
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Repository owner deleted a comment from coderabbitai Bot Nov 16, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Nov 16, 2026
Repository owner deleted a comment from coderabbitai Bot Nov 16, 2026
@hyperpolymath
hyperpolymath merged commit 06a9d94 into main Nov 16, 2026
43 of 44 checks passed
@hyperpolymath
hyperpolymath deleted the proofs/strict-flags-and-ci-pin branch November 16, 2026 19:45
@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Caution

CodeRabbit couldn't update its existing comment. The review summary may be out of date.

Check that CodeRabbit still has permission to update comments.

Error details

Not Found - https://docs.github.com/rest/issues/comments#update-an-issue-comment

hyperpolymath added a commit that referenced this pull request Nov 16, 2026
## Summary

The `agda` job moves unchanged from `quality.yml` into a new workflow,
`.github/workflows/agda-proofs.yml` ("Agda Proofs"). Every Code Quality
run since 2026-11-09 has ended in `startup_failure` with no job started,
on `main` (most recently run 43942559816, the #16 merge) and on PRs. As
a result, the Agda gate, including the stdlib digest pin and the strict
flags from #16, has never produced a CI receipt.

`quality.yml` did not change between the last successful run (run 11,
2026-11-02) and the first failure (run 12, 2026-11-09). The reason is
not exposed through the run API, so **the cause is still unknown. This
PR does not fix Code Quality's startup failure; it only takes the Agda
gate out of the failing workflow.**

## Changes

- New `.github/workflows/agda-proofs.yml`:
- It has the same triggers (push to `main`/`master`, `pull_request`),
the same concurrency group pattern and top-level `permissions: contents:
read` as `quality.yml`.
  - The `agda` job is byte-for-byte the job from `quality.yml`.
- `quality.yml`: the `agda` job is removed. The `lint`, `mint-gates` and
`docs` jobs are unchanged.
- `actions.lock`: there is a new entry for `agda-proofs.yml`. It uses
`actions/checkout@3d3c42e…`, which already has a `dependencies:` record,
so the lock stays transitively closed.

## RSR Quality Checklist

### Required

- [x] Tests pass: the local workflow checks below. CI is pending.
- [x] No banned language patterns.
- [x] No secrets.
- [x] SPDX header present on the new workflow.

## Testing

All checks were run locally on this branch:

| Check | Result |
|---|---|
| `bash scripts/check-lock-sync.sh` | in sync and transitively closed,
rc 0 |
| `bash scripts/check-workflow-edges.sh` | rc 0 |
| `bash scripts/check-required-contexts.sh` | rc 0 |
| `bun scripts/check-action-pinning.js` | all action refs pinned |
|
`tests/workflows/{validate_workflows,runtime_policy_fold,hypatia_ignore,check_lock_sync,workflow_edges,governance_policy}_test.sh`
| all rc 0 |
| `yq` on both workflow files and `actions.lock` | parse |

**What this PR's CI run will show:**
- **Whether Agda Proofs starts.** If it also hits `startup_failure`, the
cause is something shared by both workflows rather than `quality.yml`
alone.
- **The first real check of the stdlib digest pin.** A mismatch prints
the observed digest.

I haven't claimed anything here about CI results.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01J4QvDj3HpjUjBmkva3d4HQ)_

Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants