Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
45c5a02
Expose the RefC Bits8 word profile for source-bound checking
hyperpolymath Nov 24, 2026
a8f4539
Resolve four reusable CI callers at the canonical standards owner
hyperpolymath Nov 24, 2026
21346ae
Document scalar contract authority and source-proof limits
hyperpolymath Nov 24, 2026
ee9d4ec
ci: lock exact reusable workflow dependencies without changing callers
hyperpolymath Nov 24, 2026
0684fd1
ci: remove caller-lock experiment after isolating upstream leaf-pin f…
hyperpolymath Nov 24, 2026
aab589a
ci: pin unchanged reusable workflows to the minimal leaf-lock backport
hyperpolymath Nov 24, 2026
d980fdb
docs: record minimal legacy workflow lock profile and proof limits
hyperpolymath Nov 24, 2026
3b69c82
docs: record observed legacy governance blockers and provenance
hyperpolymath Nov 24, 2026
c8b6a77
fix(ci): use canonical governance and pass no scanner secrets
hyperpolymath Nov 24, 2026
4d97c57
docs(ci): record approved canonical profile admission
hyperpolymath Nov 24, 2026
da6af2a
fix(governance): type external UUID vectors and remove termination as…
hyperpolymath Nov 24, 2026
3cb1757
fix(ci): retain resolved Hypatia revision and test total union-find g…
hyperpolymath Nov 24, 2026
49d63a3
fix(ci): scope release credentials and enforce proof command failures
hyperpolymath Nov 24, 2026
f2e441a
fix(governance): document exact pattern false positives and retire st…
hyperpolymath Nov 24, 2026
9312c73
fix(ci): pass only declared forge credentials to canonical mirror
hyperpolymath Nov 24, 2026
de71c94
ci: prepare reviewed Bun lock using a remote dry-run artifact
hyperpolymath Nov 24, 2026
052c39e
Pin TypeScript dependency resolution with the remotely generated lock
hyperpolymath Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@
- MUST show 0 findings before external publication
- Run: `./pre-submit.sh` before submitting to opam, crates.io, npm, etc.

✅ **Keep .machine_readable/6a2/META.a2ml ADRs updated**
- Architecture decisions go in `.machine_readable/6a2/META.a2ml`
- Reference ADR-008 (FFI-only bindings) when writing binding code
✅ **Keep the current boundary decisions and evidence updated**
- Architecture decisions go in `docs/adr/`; status belongs in `ROADMAP.adoc`.
- Read `docs/adr/2026-11-16-header-refc-boundary.adoc` and
`docs/adr/2026-11-17-c-abi-status-ledger.adoc` before changing binding code.
- ABI definitions/contracts are Idris2; foreign-facing FFIs and APIs are Zig.
- Legacy A2ML records are retained for kyX conversion; do not create or update them.

## Author Attribution

Expand Down Expand Up @@ -76,7 +79,7 @@
Before submitting to **any** external repository:

1. ✅ Run hypatia scan: `./hypatia-v2 . --severity=critical --severity=high`
- Expected: 0 findings (excluding test code)

Check failure on line 82 in .claude/CLAUDE.md

View workflow job for this annotation

GitHub Actions / governance / Code quality + docs

wrong amount of left-padding spaces(want multiple of 2)
2. ✅ Verify license headers: All files have MPL-2.0 SPDX
3. ✅ Author attribution: Jonathan D.A. Jewell <jonathan.jewell@open.ac.uk>
4. ✅ Tests pass: `dune test` or language-specific test command
Expand Down Expand Up @@ -153,8 +156,8 @@

## References

- Architecture: `.machine_readable/6a2/META.a2ml` ADR-008, ADR-009
- Ecosystem context: `.machine_readable/6a2/ECOSYSTEM.a2ml`
- Current state: `.machine_readable/6a2/STATE.a2ml`
- Architecture and boundary evidence: `docs/adr/`
- Ecosystem context: `README.adoc`
- Current state and pending work: `ROADMAP.adoc`
- Idris 2 docs: https://idris2.readthedocs.io/
- hypatia scanner: `../hypatia/`
4 changes: 2 additions & 2 deletions .github/copilot/coding-agent.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mcp_servers:
boj-server:
command: npx
args: ["-y", "@hyperpolymath/boj-server@latest"]
command: bunx
args: [ "@hyperpolymath/boj-server@latest"]
env:
BOJ_URL: http://localhost:7700
4 changes: 2 additions & 2 deletions .github/workflows/echidna-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ jobs:
- name: Type-check proofs
id: typecheck
run: |
set -e
set -euo pipefail
echo "=== Agda proofs under lol/proofs ==="
find lol/proofs/theories -name '*.agda' -print
cd lol/proofs
for f in $(find theories -name '*.agda'); do
echo "--- checking $f ---"
agda --safe "$f" 2>&1 | tee -a ../../agda-verify.log || true
agda --safe --cubical-compatible --double-check "$f" 2>&1 | tee -a ../../agda-verify.log
done
- name: Postulate audit
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/governance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ permissions:

jobs:
governance:
uses: hyperpolymath/standards/.github/workflows/governance-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd
uses: metadatastician/standards/.github/workflows/governance-reusable.yml@84c2d1c1b040c9d7b8924532fa77e71e63d72c66
with:
hypatia-ref: 09c305db10bfde1668c8d5f686677f3a20e84889
6 changes: 5 additions & 1 deletion .github/workflows/hypatia-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ permissions:

jobs:
hypatia:
uses: hyperpolymath/standards/.github/workflows/hypatia-scan-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd
uses: metadatastician/standards/.github/workflows/hypatia-scan-reusable.yml@84c2d1c1b040c9d7b8924532fa77e71e63d72c66
with:
hypatia-ref: 09c305db10bfde1668c8d5f686677f3a20e84889
# Preserve the legacy whole-tree scope; do not silently exclude archives.
scope-excludes: ""
5 changes: 5 additions & 0 deletions .github/workflows/instant-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
env:
FARM_DISPATCH_TOKEN: ${{ secrets.FARM_DISPATCH_TOKEN }}
steps:
- name: Constrain credential-bearing job egress
uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0
with:
egress-policy: block
allowed-endpoints: github.com:443 api.github.com:443 codeload.github.com:443 release-assets.githubusercontent.com:443 objects.githubusercontent.com:443
- name: Trigger Propagation
# Without this the action runs with an empty token and fails with an
# opaque auth error on every fork and every repo where the secret is
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/label-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ permissions:
jobs:
triage:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Classify and label
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ permissions:
jobs:
sync:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Apply canonical labels
env:
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,12 @@ permissions:
contents: read
jobs:
mirror:
uses: hyperpolymath/standards/.github/workflows/mirror-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd
secrets: inherit
uses: metadatastician/standards/.github/workflows/mirror-reusable.yml@84c2d1c1b040c9d7b8924532fa77e71e63d72c66
secrets:
GITLAB_SSH_KEY: ${{ secrets.GITLAB_SSH_KEY }}
BITBUCKET_SSH_KEY: ${{ secrets.BITBUCKET_SSH_KEY }}
CODEBERG_SSH_KEY: ${{ secrets.CODEBERG_SSH_KEY }}
SOURCEHUT_SSH_KEY: ${{ secrets.SOURCEHUT_SSH_KEY }}
DISROOT_SSH_KEY: ${{ secrets.DISROOT_SSH_KEY }}
GITEA_SSH_KEY: ${{ secrets.GITEA_SSH_KEY }}
RADICLE_KEY: ${{ secrets.RADICLE_KEY }}
10 changes: 9 additions & 1 deletion .github/workflows/publish-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ name: Publish to crates.io
on:
release:
types: [published]
workflow_call: # Allow calling from release.yml
workflow_call:
secrets:
CRATES_IO_TOKEN:
required: false
workflow_dispatch:
inputs:
dry_run:
Expand All @@ -29,6 +32,11 @@ jobs:
run:
working-directory: bindings/rust
steps:
- name: Constrain credential-bearing job egress
uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0
with:
egress-policy: block
allowed-endpoints: github.com:443 api.github.com:443 codeload.github.com:443 release-assets.githubusercontent.com:443 objects.githubusercontent.com:443 static.rust-lang.org:443 index.crates.io:443 static.crates.io:443 crates.io:443
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Rust toolchain
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/publish-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ jobs:
node-version: '24'
registry-url: 'https://npm.pkg.github.com'
scope: '@hyperpolymath'
- name: Build JavaScript binding
- name: Validate JavaScript package (source-only; no build script)
working-directory: bindings/javascript
run: |
npm ci
npm run build
run: npm pack --dry-run
- name: Publish to GitHub Packages
working-directory: bindings/javascript
run: npm publish
Expand Down
23 changes: 20 additions & 3 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ env:
on:
release:
types: [published]
workflow_call: # Allow calling from release.yml
workflow_call:
secrets:
NPM_TOKEN:
required: false
workflow_dispatch:
inputs:
dry_run:
Expand Down Expand Up @@ -39,6 +42,11 @@ jobs:
run:
working-directory: bindings/javascript
steps:
- name: Constrain credential-bearing job egress
uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0
with:
egress-policy: block
allowed-endpoints: github.com:443 api.github.com:443 codeload.github.com:443 release-assets.githubusercontent.com:443 objects.githubusercontent.com:443 nodejs.org:443 registry.npmjs.org:443
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Node.js
Expand All @@ -65,17 +73,26 @@ jobs:
run:
working-directory: bindings/typescript
steps:
- name: Constrain credential-bearing job egress
uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0
with:
egress-policy: block
allowed-endpoints: github.com:443 api.github.com:443 codeload.github.com:443 release-assets.githubusercontent.com:443 objects.githubusercontent.com:443 nodejs.org:443 registry.npmjs.org:443
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: '1.3.0'
- name: Install dependencies
run: npm install
run: bun install --frozen-lockfile --ignore-scripts
- name: Build TypeScript
run: npm run build
run: bun run build
- name: Verify package
run: npm pack --dry-run
- name: Publish to npm
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/push-email-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Constrain credential-bearing job egress
uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0
with:
egress-policy: block
allowed-endpoints: github.com:443 api.github.com:443 codeload.github.com:443 release-assets.githubusercontent.com:443 objects.githubusercontent.com:443 ${{ secrets.SMTP_HOST }}:${{ secrets.SMTP_PORT }}
- name: Send push notification email
uses: hyperpolymath/smtp-notify-action@ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7 # v0.2.0
with:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,21 @@ jobs:
needs: [validate, create-release]
if: always() && needs.validate.result == 'success' && (github.event_name == 'push' || inputs.publish_crates)
uses: ./.github/workflows/publish-crates.yml
secrets: inherit
secrets:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
publish-npm:
name: Publish to npm
needs: [validate, create-release]
if: always() && needs.validate.result == 'success' && (github.event_name == 'push' || inputs.publish_npm)
uses: ./.github/workflows/publish-npm.yml
secrets: inherit
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-jsr:
name: Publish to JSR
needs: [validate, create-release]
if: always() && needs.validate.result == 'success' && (github.event_name == 'push' || inputs.publish_jsr)
uses: ./.github/workflows/publish-jsr.yml
secrets: inherit
# JSR authenticates with the job's OIDC token; no inherited secrets.
summary:
name: Release summary
needs: [validate, publish-crates, publish-npm, publish-jsr]
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/secret-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@ jobs:
scan:
permissions:
contents: read
pull-requests: write
actions: read
uses: hyperpolymath/standards/.github/workflows/secret-scanner-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd
secrets: inherit
uses: metadatastician/standards/.github/workflows/secret-scanner-reusable.yml@84c2d1c1b040c9d7b8924532fa77e71e63d72c66
4 changes: 2 additions & 2 deletions .github/workflows/spark-theatre-gate.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: MPL-2.0
# Estate SPARK Theatre Gate — thin caller of the reusable workflow in
# hyperpolymath/standards (#135 / #141). Pinned by commit SHA per the
# metadatastician/standards (#135 / #141). Pinned by commit SHA per the
# estate action-pinning policy. Regenerate the pin only when the reusable
# workflow is intentionally bumped.
name: SPARK Theatre Gate
Expand All @@ -15,7 +15,7 @@ permissions:
contents: read
jobs:
spark-theatre-gate:
uses: hyperpolymath/standards/.github/workflows/spark-theatre-gate.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd
uses: metadatastician/standards/.github/workflows/spark-theatre-gate.yml@84c2d1c1b040c9d7b8924532fa77e71e63d72c66
with:
paths: "."
enforce_zero_contract: false
2 changes: 0 additions & 2 deletions .github/workflows/trustfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ jobs:
run: |
# Count believe_me instances and verify they have justification comments
BELIEVE_ME_COUNT=$(grep -r "believe_me" src/ --include="*.idr" 2>/dev/null | wc -l)
UNJUSTIFIED=$(grep -r "believe_me" src/ --include="*.idr" -B1 2>/dev/null | \
grep -c "believe_me" 2>/dev/null || true)
echo "believe_me instances: $BELIEVE_ME_COUNT"
if [ "$BELIEVE_ME_COUNT" -gt 300 ]; then
echo "WARNING: believe_me count ($BELIEVE_ME_COUNT) exceeds threshold (300)"
Expand Down
21 changes: 11 additions & 10 deletions 0-AI-MANIFEST.a2ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
; 0-AI-MANIFEST.a2ml — Universal AI entry point for proven
; Media-Type: application/a2ml

; THIS FILE MUST BE READ FIRST BY ALL AI AGENTS
; Legacy entry point: follow the current human-readable pointers below.
; Retained pending kyX conversion; do not add or update legacy descriptiles.

(manifest
(identity
Expand All @@ -17,7 +18,7 @@

(purpose
"Formally verified safety library: 258 Idris2 modules with dependent types,
Zig FFI bridge (pure ABI layer), and 120+ language binding targets.
Idris2 ABI contracts and pure Zig FFI/API bridge, and 120+ language binding targets.
ALL computation happens in Idris2. Bindings are thin FFI wrappers ONLY.")

;; ===================================================================
Expand All @@ -27,7 +28,7 @@
(context-tiers
; Tier 0 (always load): This file + .claude/CLAUDE.md — orientation only
; Tier 1 (load if working on code): README.adoc, EXPLAINME.adoc, proven.ipkg
; Tier 2 (load on demand): .machine_readable/6a2/*.a2ml, docs/
; Tier 2 (load on demand): docs/adr/, ROADMAP.adoc
; Tier 3 (never load unless asked): tests/, benchmarks/, generated/
;
; DO NOT READ unless specifically asked:
Expand All @@ -46,9 +47,9 @@
(canonical-locations
(ai-manifest "0-AI-MANIFEST.a2ml" "THIS FILE")
(ai-instructions ".claude/CLAUDE.md" "Claude-specific patterns")
(state ".machine_readable/6a2/STATE.a2ml")
(meta ".machine_readable/6a2/META.a2ml")
(ecosystem ".machine_readable/6a2/ECOSYSTEM.a2ml")
(state "ROADMAP.adoc")
(meta ".claude/CLAUDE.md")
(ecosystem "README.adoc")
(bot-directives ".bot_directives/")
(contractiles "contractiles/"))

Expand All @@ -60,7 +61,7 @@
(principle "Idris2 is the SOLE computation layer — ALL safety logic lives in src/Proven/")
(layers
(idris2 "src/Proven/" "258 modules — the source of truth")
(zig-ffi "ffi/zig/" "PURE ABI layer — no safety logic here")
(zig-ffi "ffi/zig/" "Pure Zig FFI/API — marshaling and checked boundary handling")
(bindings "bindings/" "120+ thin FFI wrappers — CALL Idris, NEVER reimplement"))
(banned "believe_me is BANNED — --total flag enforced")
(banned "NEVER reimplement algorithms in bindings"))
Expand All @@ -87,7 +88,7 @@
;; ===================================================================

(critical-invariants
(rule "Idris2 is the sole computation layer — Zig is pure ABI, bindings are thin wrappers")
(rule "Idris2 defines ABI contracts and core safety logic; Zig implements FFI/API boundaries; bindings are thin wrappers")
(rule "believe_me is BANNED — --total flag enforced on all modules")
(rule "NEVER reimplement algorithms in bindings — CALL Idris via FFI only")
(rule "SCM files ONLY in .machine_readable/ — never in root")
Expand All @@ -102,11 +103,11 @@
(on-enter
(step "Read THIS file first")
(step "Read .claude/CLAUDE.md for detailed constraints")
(step "Read .machine_readable/6a2/STATE.a2ml for current status")
(step "Read ROADMAP.adoc for current status")
(step "Understand: Idris2 -> Zig FFI -> Bindings"))

(on-exit
(step "Update .machine_readable/6a2/STATE.a2ml if changes made")
(step "Update ROADMAP.adoc if changes made")
(step "Verify no reimplemented logic in bindings")
(step "Summarise outcomes")))

Expand Down
3 changes: 2 additions & 1 deletion CODE_OF_CONDUCT.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ each other doesn’t get us anywhere. Instead, focus on helping to resolve
issues and learning from mistakes.

Original text courtesy of the
http://web.archive.org/web/20141109123859/http://speakup.io/coc.html[Speak
// hypatia: allow content_patterns/http_in_docs -- Historical original URL is an archive identifier; transport to the archive uses HTTPS.
https://web.archive.org/web/20141109123859/http://speakup.io/coc.html[Speak
Up! project].

=== Questions?
Expand Down
1 change: 1 addition & 0 deletions apps/proven-ws/src/WS.idr
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ maxControlPayloadSize = 125
||| Sec-WebSocket-Key, then SHA-1 hashed and base64 encoded.
public export
wsGlobalGUID : String
-- hypatia: allow-next-line uuid/external -- RFC 6455 WebSocket handshake GUID; protocol-defined bytes
wsGlobalGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
1 change: 1 addition & 0 deletions apps/proven-ws/src/WS/Handshake.idr
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ findHeader name = map (.value) . find (\h => h.name == name)
||| The WebSocket GUID used in the accept key computation (RFC 6455 Section 4.2.2).
public export
wsGUID : String
-- hypatia: allow-next-line uuid/external -- RFC 6455 WebSocket handshake GUID; protocol-defined bytes
wsGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"

||| Validate a handshake request per RFC 6455 Section 4.2.1.
Expand Down
2 changes: 2 additions & 0 deletions bindings/bash/proven.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ uuid_v4() {
}

# Parse UUID
# hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier
# Usage: parse_uuid "550e8400-e29b-41d4-a716-446655440000"
parse_uuid() {
_proven_call uuid parse "$1"
Expand Down Expand Up @@ -416,6 +417,7 @@ parse_currency() {
# Evaluate arithmetic expression
# Usage: result=$(calc_eval "2 + 3 * 4")
calc_eval() {
# hypatia: allow content_patterns/eval_in_shell -- Literal calculator subcommand passed to the CLI; this does not execute the shell builtin.
_proven_call calculator eval "$1"
}

Expand Down
Loading
Loading