Skip to content

proof: meet the canonical Agda invocation (--cubical-compatible); grades as PWG-3 - #26

Closed
hyperpolymath wants to merge 2 commits into
mainfrom
claude/cubical-compatible
Closed

hyperpolymath wants to merge 2 commits into
mainfrom
claude/cubical-compatible

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

standards/3-practice/PROOF-POLICY.adoc §2.1 names agda --safe --without-K --cubical-compatible as the canonical invocation. §8.2 (owner ruling 2026-11-04) grants PWG-3 only to proofs checked under that invocation. The gate did not run --cubical-compatible (waiver W-1), so under §8 the proved rows were ungraded, although PROOF-STATUS said "mathesis Grade 3". This PR makes the gate meet §2.1 without changing any theorem statement, and records the result as PWG-3.

The last blocker was 13 -WUnsupportedIndexedMatch warnings in tini, go, confine and confineW. Each came from matching an equation exec fuel c s ≡ just t against refl, which needs just to be injective. W-1 said only a relational big-step semantics would remove them, and that this would restate N-5. It turns out not to be necessary.

SecretTypes.Prelude now defines from-just and just-injective e = cong (from-just a) e. This is a retraction: both sides reduce to the two values, so no injectivity rule is used. It is the same move suc-dec already makes with pred. The six affected clauses go through one helper, ≈-just. The semantics, N-5 and every statement are unchanged; the receipt's module hashes record the two changed modules.

Changes

  • src/SecretTypes/Prelude.agda adds from-just and just-injective. They replace the comment that said such a lemma could not exist.
  • src/SecretTypes/Noninterference/Generic.agda adds ≈-refl and ≈-just. Six clauses no longer match just … ≡ just ….
  • scripts/proof-flags.sh adds --cubical-compatible to the single flag set that check.sh, minimal-laws.sh and the receipt all read.
  • Receipt. verification/receipts/agda-grade3_praxis.deed is renamed to agda-pwg_praxis.deed, and scripts/grade-receipt.sh emits cubical-compatible "met". Each claim carries a §8.5 :pwg: 3 for the six theorems, and n/a for N-4 to N-6, which are checked demonstrations, not theorems (§8.1). The references in proofs.yml and proofs.just follow the rename.
  • Records. PROOF-STATUS.adoc, README.adoc, docs/EXPLAINME.adoc and docs/proof-debt.adoc now say PWG-3 and never a bare "Grade". W-1 is recorded as closed, with its history and the corrected arm.
    • The Rocq and Lean legs stay unavailable, and the text says PWG-3 does not discharge them (§8.4).
    • EXPLAINME's ledger already listed --cubical-compatible among the checker flags. That was not true until this PR.

RSR Quality Checklist

Required

  • Tests pass. Locally on Agda 2.6.4.3:
    • bash scripts/check.sh: core proofs pass, and all 4 expected rejections fail at their intended declarations.
    • bash scripts/minimal-laws.sh: 3 laws, each needed.
    • bash scripts/grade-receipt.sh --check: 15 modules, all sha256 verified.
  • Code is formatted
  • Linter is clean: the DEED lint of all three deeds, the new receipt included, passes against standards@8e48b1c.
  • No banned language patterns
  • No unsafe blocks without // SAFETY: comments
  • No banned functions: scripts/check-escape-hatches.sh is clean and the trust-base counts are all 0.
  • SPDX license headers present on all new/modified source files
  • No secrets, credentials, or .env files included

As Applicable

  • Documentation updated: PROOF-STATUS, README, EXPLAINME and proof-debt.
  • Repo deed (status) / (maturity): not changed. The project state is the same; only its grade wording is corrected.

Testing

As above. I also ran metadatastician/lintel's full gate against this branch with --cubical-compatible added on lintel's side. It needs one small lintel change of its own, which will be a separate lintel PR pinned to this branch's commit.

Not in this PR

  • The Rocq and Lean recheck legs (§2). These are the only way past PWG-3.
  • The reds already on main: Canon lockstep (standards moved to a draft canon 2.1.5), canary, and estate-rules (the inherited mint test).

Generated by Claude Code

Summary by CodeRabbit

  • Verification
    • The canonical proof check now includes Cubical compatibility, and the related waiver is closed.
    • The proof receipt records the updated verification status: selected claims are rated PWG-3, while independent Rocq and Lean checks remain outstanding.
  • Documentation
    • Proof status, proof debt, and the proof ledger now use Proof Witness Grade terminology and point to the updated receipt.
    • Documentation clarifies which claims are proven, which remain ungraded demonstrations, and that no waivers are open.

…des as PWG-3

PROOF-POLICY §2.1 names `agda --safe --without-K --cubical-compatible` as the
canonical invocation, and §8.2 (owner ruling 2026-11-04) makes PWG-3
conditional on it. The gate lacked the flag (waiver W-1), so the proved rows
were `ungraded` under §8, although PROOF-STATUS said "mathesis Grade 3".

The last blocker was 13 `-WUnsupportedIndexedMatch` warnings: the proofs
matched `exec fuel c s ≡ just t` against `refl`, which needs injectivity of
`just`. W-1 said only a relational semantics would remove them, at the cost
of restating N-5. That was unnecessary. SecretTypes.Prelude now defines
`from-just` and `just-injective e = cong (from-just a) e`, a retraction (the
same move `suc-dec` makes with `pred`), and Noninterference.Generic routes
the six affected clauses through one helper, `≈-just`. The semantics, N-5
and every theorem statement are unchanged.

- scripts/proof-flags.sh: adds --cubical-compatible to the single flag set.
  check.sh, minimal-laws.sh and the receipt all read it.
- Receipt renamed agda-grade3_praxis.deed to agda-pwg_praxis.deed. It records
  `cubical-compatible "met"` and a §8.5 `:pwg` per claim: 3 for the
  theorems, n/a for the checked demonstrations (§8.1).
- PROOF-STATUS, README, EXPLAINME and proof-debt now say PWG-3, never a
  bare grade. W-1 is recorded closed, with the history and the corrected arm.
  The Rocq and Lean legs stay `unavailable`, and PWG-3 is stated not to
  discharge them (§8.4).

Checked locally on Agda 2.6.4.3: scripts/check.sh (core proofs, all 4
expected rejections at their intended declarations), scripts/minimal-laws.sh
(3 laws, each needed), grade-receipt.sh --check (15 modules), and DEED lint
of the new receipt against standards@8e48b1c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BYbQRtNu216R13jtZLmoqs
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request updates the Agda proofs and canonical flags for Cubical compatibility, changes the generated verification receipt to PWG terminology, and revises the proof status, debt, policy, and governance records.

Changes: PWG proof gate and records

Layer / File(s) Summary
Cubical-compatible proof changes
src/SecretTypes/Prelude.agda, src/SecretTypes/Noninterference/Generic.agda
The Prelude adds from-just and just-injective. Confinement and noninterference cases use the helper to derive agreement for returned stores.
Canonical gate and PWG receipt
scripts/proof-flags.sh, scripts/grade-receipt.sh, verification/receipts/agda-pwg_praxis.deed, .github/workflows/proofs.yml, secret-types_chora.deed, tests/workflows/governance_policy_test.sh, build/just/proofs.just
The canonical flags include --cubical-compatible. The receipt generator and receipt record PWG values and mark compatibility as met. The workflow, canon metadata, governance test, and recipe comment reference the updated receipt or canon version.
Proof status and policy documentation
PROOF-STATUS.adoc, docs/proof-debt.adoc, docs/EXPLAINME.adoc, README.adoc
The documents assign PWG-3 to the listed theorems, describe the unavailable Rocq and Lean legs, and record W-1 as closed. They update receipt links and related proof-status references.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Possibly related PRs

Merge Risk: Minimal · up to efb9a

No actionable issue introduced by this change is established; it is mergeable subject to normal checks.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly identifies the main change: enabling the canonical Agda invocation and recording the proofs as PWG-3.
Description check Passed The description follows the template with a summary, key changes, checklist, and testing details. It also explains the remaining Rocq and Lean obligations and out-of-scope items.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 3 files. (10 skipped: 10 unsupported.)

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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between eee4e40 and efb9aa9.

Files selected for processing: 13

  • .github/workflows/proofs.yml
  • PROOF-STATUS.adoc
  • README.adoc
  • build/just/proofs.just
  • docs/EXPLAINME.adoc
  • docs/proof-debt.adoc
  • scripts/grade-receipt.sh
  • scripts/proof-flags.sh
  • secret-types_chora.deed
  • src/SecretTypes/Noninterference/Generic.agda
  • src/SecretTypes/Prelude.agda
  • tests/workflows/governance_policy_test.sh
  • verification/receipts/agda-pwg_praxis.deed

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Hypatia grid orange

🟠 indeterminate · commit efb9aa9ab390 · run 42629878232 · scope: this change (13 file(s))

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

Reporter Gate Status Critical High Medium Minor Since previous revision
Hypatia scan gating 🟠 indeterminate 0 0 0 0 — no comparable baseline
panic-attack assail advisory 🟢 clean 0 0 0 0 — no comparable baseline
pons asinorum advisory 🟢 clean 0 0 0 0 — no comparable baseline
finishingbot (release readiness) advisory 🔴 high 0 9 23 2 — no comparable baseline
glambot (presentation quality) advisory 🔵 minor 0 0 0 9 — no comparable baseline
rhodibot (RSR compliance) advisory 🟢 clean 0 0 0 0 — no comparable baseline
accessibilitybot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
cipherbot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
echidnabot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
panicbot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
seambot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
sustainabot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
Hypatia scan: error — the scanner produced no findings array
  • 🟠 indeterminate: the scanner produced no findings array
panic-attack assail: 14 finding(s)
  • 14 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).
finishingbot (release readiness): 173 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 124 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
  • medium PH-004 — secret-types_chora.deed:943 — Found 'HACK' in: :marker-scan ("TODO" "FIXME" "XXX" "HACK" "STUB" "PARTIAL")
  • medium PH-003 — secret-types_chora.deed:943 — Found 'XXX' in: :marker-scan ("TODO" "FIXME" "XXX" "HACK" "STUB" "PARTIAL")
  • medium PH-002 — secret-types_chora.deed:943 — Found 'FIXME' in: :marker-scan ("TODO" "FIXME" "XXX" "HACK" "STUB" "PARTIAL")
  • medium PH-001 — secret-types_chora.deed:943 — Found 'TODO' in: :marker-scan ("TODO" "FIXME" "XXX" "HACK" "STUB" "PARTIAL")
  • medium PH-004 — secret-types_chora.deed:840 — Found 'HACK' in: :marker_scan_required ("TODO" "FIXME" "XXX" "HACK" "STUB" "PARTIAL")
  • medium PH-003 — secret-types_chora.deed:840 — Found 'XXX' in: :marker_scan_required ("TODO" "FIXME" "XXX" "HACK" "STUB" "PARTIAL")
  • 14 more graded finding(s); see the structured report in the artifact.
  • 139 further finding(s) in files this change does not touch: reported, not graded (0 critical, 3 high).
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.
  • info VIS-005 — README.adoc:8 — Line 209 characters exceeds max length of 80.
  • info VIS-005 — PROOF-STATUS.adoc:14 — Line 84 characters exceeds max length of 80.
  • info VIS-005 — docs/proof-debt.adoc:7 — Line 83 characters exceeds max length of 80.
  • info VIS-005 — docs/EXPLAINME.adoc:4 — Line 124 characters exceeds max length of 80.
  • 84 further finding(s) in files this change does not touch: reported, not graded (0 critical, 2 high).
rhodibot (RSR compliance): 13 finding(s)
  • 13 further finding(s) in files this change does not touch: reported, not graded (0 critical, 12 high).
accessibilitybot: not_applicable — template default: enrol once the repository serves HTML
  • ⚪ not applicable: template default: enrol once the repository serves HTML
cipherbot: not_applicable — template default: enrol once the repository implements cryptography
  • ⚪ not applicable: template default: enrol once the repository implements cryptography
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
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
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
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)

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.

…o Canon lockstep goes green here)

Canon lockstep is red on main. standards' canon.lock records 2.1.5 (#1424:
gate table 0.3.1 and the applicability policy changed; the criteria did
not), and this deed declared 2.1.3. Port of hyperpolymath/rsr-template-repo#298,
the spine's adoption.

- secret-types_chora.deed (canon): :version 2.1.3 to 2.1.5, and
  :gates-sha256 2f31f46d… to 5c510bba…. The criteria hash is unchanged.
  The (provenance) clause keeps 2.1.3: it records the canon this repository
  was minted against, which is history.
- tests/workflows/governance_policy_test.sh expects the 2.1.5 tuple. That
  test already fails on main earlier, on the governance.yml pull_request
  filter that #15's caller carries; this does not change that.

canon.lock marks 2.1.5 status "draft"; this adopts the identity the lock
records, which is what the lockstep gate compares.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BYbQRtNu216R13jtZLmoqs
@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

Copy link
Copy Markdown
Owner Author

The two reds on this PR come from main, not from this change.

This PR's own gates pass on 2f342bc, and the receipt check passes too:

  • the proof suite, with all 4 expected rejections refused at their intended declarations;
  • the laws certificate.

Generated by Claude Code

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 9, 2026 15:46
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T15:46:38.208978Z
We couldn’t complete this review. Comment @codex review to try again.
efb9aa9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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.

hyperpolymath added a commit to metadatastician/lintel that referenced this pull request Nov 9, 2026
…-3 receipt and proof-status (#22)

## Summary

`standards/3-practice/PROOF-POLICY.adoc` §2.1 names `agda --safe
--without-K --cubical-compatible` as the canonical Agda invocation.
Under §8 (owner ruling 2026-11-04), grades are derived only from
receipts, and a proof reaches `PWG-3` only under that invocation. Lintel
met neither condition:

- the gate ran without `--cubical-compatible`;
- there was no receipt;
- `docs/status/PROOF-STATUS.adoc` was the template placeholder ("0%
proven", Idris ABI rows).

So the proofs were `ungraded`, and the mathesis census read a status
file that never described them. This PR makes the proofs meet §2.1 with
no statement changes, adds the receipt, and writes the real proof-status
record.

**Depends on hyperpolymath/secret-types#26.** The sibling needs the
matching change (`just-injective`), so this PR pins secret-types to that
branch's commit, `2f342bc`, the same way #17 did. Once #26 merges, a
follow-up re-pins secret-types to its `main`.

## Changes

- **`src/Lintel/Lattice.agda`**: `⊒-trans`, `⊒-antisym` and `∨-least`
matched a second `_⊒_` proof whose indices were already fixed. That
needs constructor injectivity, which `--cubical-compatible` refuses.
They now return that proof unmatched, or go through the new `⊒-open`.
- **`src/Lintel/Composition.agda`**: `writes-flow` matched the typing
derivation and the `Writes` derivation together on one `Cmd` index. It
now reads `Writes` into a private `Writes′` (the same relation, computed
by recursion on the command) and recurses on the typing derivation
alone. `Writes`, the relation L-7 is stated over, is unchanged.
- **`scripts/proof-flags.sh`** (new): the single flag set, ported from
secret-types. It is the §2.1 invocation plus `--no-libraries
--ignore-interfaces --double-check -W error`. `scripts/check.sh` reads
it, and so does the fixture in `tests/check-coverage-test.sh`.
- **`scripts/grade-receipt.sh`** (new), which writes
`verification/receipts/agda-pwg_praxis.deed`:
  - It records the flags, the Agda pin and a §8.5 `:pwg` for each claim.
- It hashes the import cone: the 4 Lintel modules plus the 7
secret-types modules they reach, at the pin.
- It cross-checks claim IDs against the README table, in both
directions.
- `proofs.yml` now checks the receipt for drift and re-emits it for the
commit under test.
- **`docs/status/PROOF-STATUS.adoc`**: the real §8.5 record.
  - `PWG-3` for L-1 to L-4, L-6 and L-7.
  - `n/a` for L-5 (checked refusals) and A-1 (an assumption).
- The Rocq and Lean legs are `unavailable`, and the file says `PWG-3`
does not discharge them (§8.4).
- **`docs/status/PROOF-NEEDS.adoc`**: lists the project's own
obligations, both recheck legs included.
- **`README.adoc`**: the proof paragraph now states the flags, the pin
and the grade.

## RSR Quality Checklist

### Required

- [x] Tests pass. Locally on Agda 2.6.4.3, with secret-types at
`2f342bc`, `bash scripts/check.sh` passes every step: coverage, the
sibling, `Lintel.All`, 5 positive controls, 4 expected rejections (each
at its `invalid` declaration), and the negative control. `bash
tests/check-coverage-test.sh` and `bash scripts/grade-receipt.sh
--check` also pass.
- [x] Code is formatted
- [x] Linter is clean: the DEED lint passes on every deed, the new
receipt included.
- [x] No banned language patterns
- [x] No `unsafe` blocks without `// SAFETY:` comments
- [x] No banned functions: `scripts/scan-dangerous.sh` is clean and the
trust-base counts are all 0.
- [x] SPDX license headers present on all new/modified source files
- [x] No secrets, credentials, or `.env` files included

### As Applicable

- [x] Documentation updated: README, PROOF-STATUS and PROOF-NEEDS.
- [ ] Repo deed `(status)` / `(maturity)`: not changed.

## Not in this PR

- The Rocq and Lean legs (R-1, R-2 in PROOF-NEEDS). These are the only
way past `PWG-3`.
- The re-pin to secret-types `main` after #26 merges.
- `scripts/check-no-placeholders.sh` fails on `main` already, and this
PR does not change that.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
@hyperpolymath
hyperpolymath added this pull request to stack #33 November 9, 2026 22:51
hyperpolymath added a commit that referenced this pull request Nov 10, 2026
#27)

## Summary

Canon lockstep is red on `main`. standards' `canon.lock` now records
canon 2.1.5 (metadatastician/standards#1424): the gate table moved to
0.3.1 and the applicability policy changed, but the criteria did not.
This deed still declares 2.1.3.

This ports hyperpolymath/rsr-template-repo#298, the template's adoption.
I've also ported the same commit into #25 and #26 so Canon lockstep goes
green there; the port becomes a no-op once this PR merges.

## Changes

- **`secret-types_chora.deed` `(canon …)`**: `:version` goes from 2.1.3
to 2.1.5, and `:gates-sha256` from `2f31f46d…` to `5c510bba…`. The
criteria hash is unchanged.
- **The `(provenance)` clause keeps 2.1.3.** It records the canon this
repository was minted against, which is history.
- **`tests/workflows/governance_policy_test.sh`** now expects the 2.1.5
tuple.

## RSR Quality Checklist

### Required

- [x] Linter is clean: the DEED lint passes against standards@8e48b1c.
- [x] No banned language patterns
- [x] No secrets, credentials, or `.env` files included
- [ ] Tests pass: `governance_policy_test.sh` already fails on `main`,
before it reaches the canon assertion. Its first check rejects
`governance.yml`'s `pull_request: branches: [main, master]` filter,
which came in with #15's canonical caller. This PR doesn't change that;
`deed-field.sh` returns the 2.1.5 tuple.

## Testing

`deed-field.sh` returns version 2.1.5, criteria `6a5aa885…` and gates
`5c510bba…`, the same values `canon.lock` has on standards `main`.

`canon.lock` still marks 2.1.5 as `status = "draft"`. This PR adopts the
identity the lock records, which is what the lockstep gate compares.

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

Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
hyperpolymath pushed a commit that referenced this pull request Nov 10, 2026
The owner chose #32 as the base for the
cubical-compatible change, so this branch now builds on it instead of
#26.

- Proof code, proof-flags.sh: #32's version (Prelude.just-inj,
  tests/flag-control/IndexedMatch.agda). The legs do not depend on the
  Agda helper names.
- Receipt: verification/receipts/agda_praxis.deed (#32's name), written
  by grade-receipt.sh --write. #32 derives each PWG from the legs' §2.2
  states, so N-1..3 and N-7..9 now carry route re-proved and state
  RECONCILED for both legs, and their grade derives as 2ii. A
  RECONCILED leg's token is proven. This branch's (legs) block, leg
  input hashes and the correspondence-record check are carried over.
- proofs.yml: #32's receipt step plus this branch's legs job.
- PROOF-STATUS, README, EXPLAINME, proof-debt: #32's wording, with this
  branch's leg facts and the new receipt path.

Checked locally with Agda 2.6.4.3, Coq 8.18.0 and Lean 4.24.0:
check.sh (core proofs, 4 rejections, flag control), minimal-laws.sh,
check-legs.sh (both legs), grade-receipt.sh --check (15 modules),
check-escape-hatches.sh and the invisible-character scan. Negative
control: removing the N-9 row from verification/legs/README.adoc makes
grade-receipt.sh --check fail with "only in grade-receipt.sh: N-9".
check-adoc-renders.sh was not run here (no asciidoctor in this session).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZmAsYpFA9gxfQLF3F6
Signed-off-by: Claude <noreply@anthropic.com>
hyperpolymath pushed a commit that referenced this pull request Nov 10, 2026
My earlier merge (ba2484f) took #32's head before #32 was updated
(3bf7f8e), because the local ref was stale. So this branch lacked main's
later changes (the template sync #28, canon 2.1.5 #27, https-only edges
#25) and kept some #26-only text. This merge corrects that.

Each conflicted file is a 3-way merge on 3bf7f8e (the #32 commit the
earlier merge used), so only this PR's legs changes are carried onto
main. Files the legs work does not own take main's version:
tests/workflows/governance_policy_test.sh, and docs/proof-debt.adoc
except its legs bullet (this restores #32's dated W-1 record). The
receipt is regenerated.

The diff against main is now the legs work: the Rocq and Lean sources,
check-legs.sh, the legs CI job, the receipt's (legs) block and RECONCILED
leg states (PWG-2ii derived), and the matching doc lines.

Checked with Agda 2.6.4.3, Coq 8.18.0 and Lean 4.24.0: check.sh,
minimal-laws.sh, check-legs.sh, grade-receipt.sh --check (15 modules),
check-escape-hatches.sh, the invisible-character scan and
tests/workflows/governance_policy_test.sh.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZmAsYpFA9gxfQLF3F6
Signed-off-by: Claude <noreply@anthropic.com>

Copy link
Copy Markdown
Owner Author

Superseded: #30 landed --cubical-compatible on main, and #32 (the version the owner chose, with the flag-control fixture and grades derived from leg states) is merged on top. The legs work that was stacked here continues in #34, based on main.


Generated by Claude Code

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

This PR replaces #29, on the same branch. #29
was stacked on #26, and GitHub refuses to move a stacked PR's base. #26
is superseded by #30 and #32, which are both on `main`, so this PR
targets `main` directly.

It adds the two recheck legs that `PROOF-POLICY` §2 asks for, Rocq and
Lean, for every proved theory claim: N-1, N-2, N-3, N-7, N-8 and N-9.
They are hand re-proofs, because transport is not available:
Agda2Dedukti is an Agda backend pinned to a fork of Agda and cannot run
on the pinned 2.6.4.3, and no Dedukti or Lambdapi exporter to Lean 4 has
been released. Both legs check with no library and no axioms, and the
statements are compared in a §2.2 record.

`main` (#32) derives each grade from the legs' §2.2 states, and only
`RECONCILED` counts. With both legs `RECONCILED`, the 6 claims derive
`PWG-2ii`.

**For the owner to review (doctrine 4):** the statement comparison in
`verification/legs/README.adoc` was written by Claude Code and is
labelled provisional until you review it. No tool checks it. The
`PWG-2ii` grade rests on it.

## Changes

- `verification/legs/rocq/SecretTypes.v`: Coq 8.18.0, prelude only, with
no `Require`. 11 theorems. `Print Assumptions` reports "Closed under the
global context" for each.
- `verification/legs/lean/`: Lean 4.24.0, core only (the lakefile has no
`require`, so no Mathlib). 11 theorems. `#print axioms` reports "does
not depend on any axioms" for each. `exec` is defined structurally
through `run`, so no well-founded recursion brings in `propext`.
- `scripts/check-legs.sh`: pins both checker versions, refuses any
library and any `sorry`, `admit`, `Admitted`, `Axiom` or `Parameter`,
and fails unless all 22 axiom lines are clean.
- `.github/workflows/proofs.yml`: new `legs` job. Coq is pinned by its
Ubuntu package version, Lean by the sha256 of its release tarball. It
uses only the already-locked `actions/checkout` pin.
- `verification/legs/README.adoc`: the §2.2 correspondence record (route
and reason, versions and invocations, residual assumptions (none),
universe discipline, a point-by-point statement comparison, and a
claim-by-claim map from each Agda name to its Lean and Rocq names).
State: `RECONCILED`.
- `scripts/grade-receipt.sh` and
`verification/receipts/agda_praxis.deed`:
- the 6 claims carry route `re-proved` and state `RECONCILED` for both
legs, so their grade derives as `2ii`; a `RECONCILED` leg's token is
`proven`;
- the receipt gains a `(legs)` block: pins, invocations, axioms, and the
sha256 of every leg input;
- the script refuses a `RECONCILED` leg without a row in the
correspondence record, and the reverse.
- `PROOF-STATUS.adoc`, `README.adoc`, `docs/EXPLAINME.adoc`,
`docs/proof-debt.adoc`: the new grade and legs. Not `PWG-1`: no
per-commit receipt captures each checker's observed result yet. Not
foundation-diverse: Agda, Rocq and Lean are all dependent type theories.

## RSR Quality Checklist

### Required

- [x] Tests pass. Run locally with Agda 2.6.4.3, Coq 8.18.0 and Lean
4.24.0: `check.sh` (core proofs, 4 expected rejections, flag control),
`minimal-laws.sh`, `check-legs.sh`, `grade-receipt.sh --check` (15
modules), `check-escape-hatches.sh`, the invisible-character scan,
`tests/workflows/governance_policy_test.sh`, and
`tests/e2e/use_template_mint_test.sh` (self-skips: this is a minted
tree).
- [x] No banned language patterns. The new code is Lean, Coq and bash.
`lake-manifest.json` is git-ignored.
- [x] No banned functions: `check-legs.sh` refuses `sorry`, `admit`,
`Admitted`, `Axiom` and `Parameter`.
- [x] SPDX headers on every new file except `lean-toolchain`, which Lean
reads whole as the toolchain name.
- [x] No secrets.

### As Applicable

- [x] Documentation updated: PROOF-STATUS, README, EXPLAINME,
proof-debt.

## Testing

Negative controls:

- Removing the N-9 row from `verification/legs/README.adoc` makes
`grade-receipt.sh --check` fail with `only in grade-receipt.sh: N-9`.
- Touching a leg source makes the receipt check fail on that file's
sha256.

Not run locally: `scripts/check-adoc-renders.sh` (no asciidoctor in the
authoring session). CI runs it.

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

---------

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