From 45c5a02dd3291094822740c24f4e2e2df60897c9 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 19:15:04 +0000 Subject: [PATCH 01/17] Expose the RefC Bits8 word profile for source-bound checking --- ffi/zig/src/refc/bits8.zig | 3 ++- ffi/zig/src/refc/bits8_word.zig | 6 ++++++ src/Proven/FFI/RefCBits8.idr | 11 +++++++++++ verification/header/ScalarOracle.idr | 14 ++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 ffi/zig/src/refc/bits8_word.zig create mode 100644 src/Proven/FFI/RefCBits8.idr create mode 100644 verification/header/ScalarOracle.idr diff --git a/ffi/zig/src/refc/bits8.zig b/ffi/zig/src/refc/bits8.zig index 7e825053..2c7686ce 100644 --- a/ffi/zig/src/refc/bits8.zig +++ b/ffi/zig/src/refc/bits8.zig @@ -3,6 +3,7 @@ //! Marshaling for the pinned Idris RefC immediate Bits8 representation. //! Values are tagged words, not pointers to allocated objects. const std = @import("std"); +const word = @import("bits8_word.zig"); const c = @cImport({ @cInclude("_datatypes.h"); }); @@ -13,7 +14,7 @@ comptime { } pub fn encode(value: u8) ?*anyopaque { - return @ptrFromInt((@as(usize, value) << shift) | 1); + return @ptrFromInt(word.encodeWord(value)); } pub fn decode(value: ?*anyopaque) error{InvalidRefcResult}!u8 { diff --git a/ffi/zig/src/refc/bits8_word.zig b/ffi/zig/src/refc/bits8_word.zig new file mode 100644 index 00000000..3cac3c39 --- /dev/null +++ b/ffi/zig/src/refc/bits8_word.zig @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright (c) 2026 Jonathan D.A. Jewell +// Scalar marshaling only. bits8.zig still checks the SDK shift and target. +pub fn encodeWord(value: u8) u64 { + return (@as(u64, value) << 32) | 1; +} diff --git a/src/Proven/FFI/RefCBits8.idr b/src/Proven/FFI/RefCBits8.idr new file mode 100644 index 00000000..bd65106e --- /dev/null +++ b/src/Proven/FFI/RefCBits8.idr @@ -0,0 +1,11 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Copyright (c) 2026 Jonathan D.A. Jewell +||| ABI word specification for the pinned 64-bit RefC Bits8 profile. +||| The Zig carrier checks the actual SDK shift; this is not a pointer lease. +module Proven.FFI.RefCBits8 + +%default total + +public export +encodeWord : Bits8 -> Bits64 +encodeWord value = cast value * 4294967296 + 1 diff --git a/verification/header/ScalarOracle.idr b/verification/header/ScalarOracle.idr new file mode 100644 index 00000000..0b4cad04 --- /dev/null +++ b/verification/header/ScalarOracle.idr @@ -0,0 +1,14 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Copyright (c) 2026 Jonathan D.A. Jewell +module Main +import Proven.FFI.RefCBits8 +%default total + +rows : Nat -> Nat -> IO () +rows Z index = pure () +rows (S fuel) index = do + putStrLn (show index ++ " " ++ show (encodeWord (cast index))) + rows fuel (S index) + +main : IO () +main = rows 256 0 From a8f453987016087b208828978ba25111c479c488 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 19:35:06 +0000 Subject: [PATCH 02/17] Resolve four reusable CI callers at the canonical standards owner --- .github/workflows/governance.yml | 3 ++- .github/workflows/hypatia-scan.yml | 3 ++- .github/workflows/secret-scanner.yml | 3 ++- .github/workflows/spark-theatre-gate.yml | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/governance.yml b/.github/workflows/governance.yml index 978e3993..a14a5276 100644 --- a/.github/workflows/governance.yml +++ b/.github/workflows/governance.yml @@ -14,4 +14,5 @@ permissions: jobs: governance: - uses: hyperpolymath/standards/.github/workflows/governance-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd + uses: metadatastician/standards/.github/workflows/governance-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd + diff --git a/.github/workflows/hypatia-scan.yml b/.github/workflows/hypatia-scan.yml index 308c0bdf..8ec7bf04 100644 --- a/.github/workflows/hypatia-scan.yml +++ b/.github/workflows/hypatia-scan.yml @@ -17,4 +17,5 @@ permissions: jobs: hypatia: - uses: hyperpolymath/standards/.github/workflows/hypatia-scan-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd + uses: metadatastician/standards/.github/workflows/hypatia-scan-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd + diff --git a/.github/workflows/secret-scanner.yml b/.github/workflows/secret-scanner.yml index 164c11cb..29907c2e 100644 --- a/.github/workflows/secret-scanner.yml +++ b/.github/workflows/secret-scanner.yml @@ -18,5 +18,6 @@ jobs: contents: read pull-requests: write actions: read - uses: hyperpolymath/standards/.github/workflows/secret-scanner-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd + uses: metadatastician/standards/.github/workflows/secret-scanner-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd secrets: inherit + diff --git a/.github/workflows/spark-theatre-gate.yml b/.github/workflows/spark-theatre-gate.yml index 3c6c4ed7..2ce5c3f4 100644 --- a/.github/workflows/spark-theatre-gate.yml +++ b/.github/workflows/spark-theatre-gate.yml @@ -15,7 +15,8 @@ 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@571cc734cd69fb846032ec77a662aa8ee4fc32cd with: paths: "." enforce_zero_contract: false + From 21346ae1c85b7773a4bc16df51cb1ec5977f6b65 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 19:41:08 +0000 Subject: [PATCH 03/17] Document scalar contract authority and source-proof limits --- verification/header/SCALAR-SOURCE.adoc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 verification/header/SCALAR-SOURCE.adoc diff --git a/verification/header/SCALAR-SOURCE.adoc b/verification/header/SCALAR-SOURCE.adoc new file mode 100644 index 00000000..0391b8a9 --- /dev/null +++ b/verification/header/SCALAR-SOURCE.adoc @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: CC-BY-SA-4.0 +// Copyright (c) 2026 Jonathan D.A. Jewell += RefC byte-word source checking +:revdate: 2026-11-24 + +`src/Proven/FFI/RefCBits8.idr` defines the Idris2 contract for this fixed +64-bit RefC word profile. `ScalarOracle.idr` enumerates its 256 byte inputs. +`ffi/zig/src/refc/bits8_word.zig` is the pure Zig encoder used by the existing +FFI wrapper in `bits8.zig`; the wrapper still checks the target width and SDK +shift, and validates canonical results when decoding. Header business logic +continues to execute in Idris2. No C FFI or C API implementation is introduced. + +Atoma PR #30 consumes these exact sources through a pinned commit manifest. +Its hosted gate compiles the oracle afresh with totality, warnings-as-errors +and a no-holes check; interprets the helper's original source bytes in Coq; +checks every input; and compares native Zig execution in all four optimization +modes with the oracle. ECHIDNA compilation, coqchk, theorem-type and assumption +audits, independent byte serialization and rejecting mutations are mandatory. +The existing Header RefC soundness workflow separately exercises the actual +exported ABI, byte-pair corpus and always-clean kernel mutation. + +The source proof concerns the scalar word expression. It does not establish +pointer provenance, accessibility, lifetime, SDK/compiler refinement or the +whole library's correctness. The foreign-boundary receipt remains INCOMPLETE. +The oracle and source helper are evidence inputs, never cached proof verdicts. From ee9d4eceabcdcfe1371cc63c4f0957e07cc32a5f Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 21:42:05 +0000 Subject: [PATCH 04/17] ci: lock exact reusable workflow dependencies without changing callers --- .github/workflows/actions.lock | 66 ++++++++++++++++++++++++++ scripts/ci/lock-reusable-callers.sh | 58 ++++++++++++++++++++++ verification/header/WORKFLOW-LOCK.adoc | 35 ++++++++++++++ 3 files changed, 159 insertions(+) create mode 100644 .github/workflows/actions.lock create mode 100644 scripts/ci/lock-reusable-callers.sh create mode 100644 verification/header/WORKFLOW-LOCK.adoc diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock new file mode 100644 index 00000000..2450268f --- /dev/null +++ b/.github/workflows/actions.lock @@ -0,0 +1,66 @@ +# This file is machine-generated by `gh actions-lock`. +# Do not edit by hand; run `gh actions-lock` to update. +# Docs: https://gh.io/actions-lockfile +version: 'v0.0.3' +workflows: + '.github/workflows/governance.yml': + - 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9' + - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' + - 'denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed' + - 'editorconfig-checker/action-editorconfig-checker@840e866d93b8e032123c23bac69dece044d4d84c' + - 'erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124' + - 'metadatastician/standards@571cc734cd69fb846032ec77a662aa8ee4fc32cd' + '.github/workflows/hypatia-scan.yml': + - 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9' + - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' + - 'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a' + - 'erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124' + - 'github/codeql-action@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28' + - 'metadatastician/standards@571cc734cd69fb846032ec77a662aa8ee4fc32cd' + '.github/workflows/secret-scanner.yml': + - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' + - 'metadatastician/standards@571cc734cd69fb846032ec77a662aa8ee4fc32cd' + '.github/workflows/spark-theatre-gate.yml': + - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' + - 'metadatastician/standards@571cc734cd69fb846032ec77a662aa8ee4fc32cd' +dependencies: + 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9': + ref: 'v6.1.0' + commit: 'sha1-55cc8345863c7cc4c66a329aec7e433d2d1c52a9' + owner_id: 44036562 + repo_id: 215566462 + 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1': + ref: 'v7.0.1' + commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' + owner_id: 44036562 + repo_id: 197814629 + 'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a': + ref: 'v7.0.1' + commit: 'sha1-043fb46d1a93c77aae656e7c1c64a875d1fc6a0a' + owner_id: 44036562 + repo_id: 192625955 + 'denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed': + ref: 'v2.0.5' + commit: 'sha1-22d081ff2d3a40755e97629de92e3bcbfa7cf2ed' + owner_id: 42048915 + repo_id: 356423100 + 'editorconfig-checker/action-editorconfig-checker@840e866d93b8e032123c23bac69dece044d4d84c': + ref: 'v2.2.0' + commit: 'sha1-840e866d93b8e032123c23bac69dece044d4d84c' + owner_id: 26415196 + repo_id: 297874902 + 'erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124': + ref: 'v1.24.1' + commit: 'sha1-54075bcc5e249e4758d363f27d099f55d843f124' + owner_id: 47606891 + repo_id: 331103973 + 'github/codeql-action@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28': + ref: 'v4.37.8' + commit: 'sha1-db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28' + owner_id: 9919 + repo_id: 259445878 + 'metadatastician/standards@571cc734cd69fb846032ec77a662aa8ee4fc32cd': + ref: 'main' + commit: 'sha1-571cc734cd69fb846032ec77a662aa8ee4fc32cd' + owner_id: 297579217 + repo_id: 1116521501 diff --git a/scripts/ci/lock-reusable-callers.sh b/scripts/ci/lock-reusable-callers.sh new file mode 100644 index 00000000..fdf48a2f --- /dev/null +++ b/scripts/ci/lock-reusable-callers.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: MPL-2.0 +# Copyright (c) 2026 Jonathan D.A. Jewell +# Metadata-only adapter for gh-actions-lock v0.4.1's external-workflow gap. +set -euo pipefail +root=$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd) +repo=metadatastician/standards +ref=571cc734cd69fb846032ec77a662aa8ee4fc32cd +work=$(mktemp -d) +trap 'rm -rf "$work"' EXIT +mkdir -p "$work/.github/workflows" + +# Refuse to replace a later, wider lockfile with this deliberately scoped one. +if [[ -f "$root/.github/workflows/actions.lock" ]]; then + unexpected=$(sed -n "s/^ '\(.github\/workflows\/[^']*\)':.*/\1/p" "$root/.github/workflows/actions.lock" | + grep -vE '^\.github/workflows/(governance|hypatia-scan|secret-scanner|spark-theatre-gate)\.yml$' || true) + [[ -z "$unexpected" ]] || { echo 'Refusing to overwrite a wider workflow lock' >&2; exit 1; } +fi + +while read -r caller callee; do + grep -Fq "uses: $repo/.github/workflows/$callee@$ref" "$root/.github/workflows/$caller" + gh api "repos/$repo/contents/.github/workflows/$callee?ref=$ref" \ + -H 'Accept: application/vnd.github.raw+json' > "$work/$callee.source" + # These four fixed workflows contain only remote, SHA-pinned action steps. + # They are read as data; neither the downloaded jobs nor this projection run. + sed -nE 's/^[[:space:]]*(-[[:space:]]*)?uses:[[:space:]]*([^[:space:]#]+).*/\2/p' \ + "$work/$callee.source" | sort -u > "$work/uses" + [[ -s "$work/uses" ]] + if grep -vE '^[A-Za-z0-9_.-]+/[A-Za-z0-9_./-]+@[0-9a-f]{40}$' "$work/uses"; then + echo 'Unsupported dependency in pinned reusable workflow' >&2; exit 1 + fi + { + printf 'name: Metadata projection\non: workflow_dispatch\njobs:\n metadata:\n runs-on: ubuntu-latest\n steps:\n' + sed 's/^/ - uses: /' "$work/uses" + } > "$work/.github/workflows/$caller" +done <<'CALLERS' +governance.yml governance-reusable.yml +hypatia-scan.yml hypatia-scan-reusable.yml +secret-scanner.yml secret-scanner-reusable.yml +spark-theatre-gate.yml spark-theatre-gate.yml +CALLERS + +# Resolve upstream ownership, commit reachability and transitive action pins +# using the official tool. A failure cannot replace the checked-in lockfile. +( + cd "$work" + GH_ACTIONS_LOCK_REPO_ROOT="$work" gh actions-lock --no-interactive --no-narrow + GH_ACTIONS_LOCK_REPO_ROOT="$work" gh actions-lock --verify + # Resolve reusable-repository identity only after verifying actual actions. + # This metadata reference has no action.yml: it is a workflow repository. + # Native GitHub validates the real job-level workflow calls on publication. + for caller in governance hypatia-scan secret-scanner spark-theatre-gate; do + printf ' - uses: %s@%s\n' "$repo" "$ref" >> ".github/workflows/$caller.yml" + done + GH_ACTIONS_LOCK_REPO_ROOT="$work" gh actions-lock --no-interactive --no-narrow +) +cp "$work/.github/workflows/actions.lock" "$root/.github/workflows/actions.lock" +echo 'Updated lock metadata for four existing reusable callers; workflow bytes unchanged.' diff --git a/verification/header/WORKFLOW-LOCK.adoc b/verification/header/WORKFLOW-LOCK.adoc new file mode 100644 index 00000000..0b07ae8a --- /dev/null +++ b/verification/header/WORKFLOW-LOCK.adoc @@ -0,0 +1,35 @@ += Reusable workflow lock scope +:toc: + +The four governance/security callers retain their exact existing +`metadatastician/standards` revision +`571cc734cd69fb846032ec77a662aa8ee4fc32cd`. The owner-approved allowlist repair +admits only those four workflow paths at that revision. + +Their jobs previously failed before checkout with an invalid action-lock pin. +The caller now carries generated metadata for the exact reusable repository +and its existing action dependencies. No check is removed or made optional. + +`scripts/ci/lock-reusable-callers.sh` projects the action references from those +four immutable workflow files into a temporary metadata workspace. It adds +the reusable repository identity and asks `gh actions-lock` to resolve and +verify ownership, reachable commits and transitive action dependencies. +Actual action dependencies pass the tool's online verification before adding +the reusable repository identity. The synthetic identity reference itself +cannot pass action-metadata verification: standards is a workflow repository, +not an action with an `action.yml`. Its identity and reachability are resolved +by the official generator; actual workflow-call validation remains with GitHub. +The projections never execute and are never installed as workflows. Authored +caller bytes remain unchanged. This adapter is needed because v0.4.1 does +not traverse external reusable workflow calls. Native hosted CI is the +acceptance test for this caller-side coverage. + +The lock is deliberately scoped to these four callers. It is not a claim +that every Proven workflow has been locked. A whole-repository refresh also +encountered an unrelated unreachable `dtolnay/rust-toolchain` pin in +`publish-crates.yml`; that repair is separate. The adapter refuses to replace +a future wider lockfile with its four-workflow projection. + +This infrastructure evidence is separate from Header RefC soundness and +Atoma's scalar source interpretation evidence. None establishes whole-library +or complete Idris2-to-application refinement. From 0684fd17f8e4f656bb50551831baca308d0d025a Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 21:44:48 +0000 Subject: [PATCH 05/17] ci: remove caller-lock experiment after isolating upstream leaf-pin failure --- .github/workflows/actions.lock | 66 -------------------------- scripts/ci/lock-reusable-callers.sh | 58 ---------------------- verification/header/WORKFLOW-LOCK.adoc | 35 -------------- 3 files changed, 159 deletions(-) delete mode 100644 .github/workflows/actions.lock delete mode 100644 scripts/ci/lock-reusable-callers.sh delete mode 100644 verification/header/WORKFLOW-LOCK.adoc diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock deleted file mode 100644 index 2450268f..00000000 --- a/.github/workflows/actions.lock +++ /dev/null @@ -1,66 +0,0 @@ -# This file is machine-generated by `gh actions-lock`. -# Do not edit by hand; run `gh actions-lock` to update. -# Docs: https://gh.io/actions-lockfile -version: 'v0.0.3' -workflows: - '.github/workflows/governance.yml': - - 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9' - - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' - - 'denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed' - - 'editorconfig-checker/action-editorconfig-checker@840e866d93b8e032123c23bac69dece044d4d84c' - - 'erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124' - - 'metadatastician/standards@571cc734cd69fb846032ec77a662aa8ee4fc32cd' - '.github/workflows/hypatia-scan.yml': - - 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9' - - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' - - 'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a' - - 'erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124' - - 'github/codeql-action@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28' - - 'metadatastician/standards@571cc734cd69fb846032ec77a662aa8ee4fc32cd' - '.github/workflows/secret-scanner.yml': - - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' - - 'metadatastician/standards@571cc734cd69fb846032ec77a662aa8ee4fc32cd' - '.github/workflows/spark-theatre-gate.yml': - - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' - - 'metadatastician/standards@571cc734cd69fb846032ec77a662aa8ee4fc32cd' -dependencies: - 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9': - ref: 'v6.1.0' - commit: 'sha1-55cc8345863c7cc4c66a329aec7e433d2d1c52a9' - owner_id: 44036562 - repo_id: 215566462 - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1': - ref: 'v7.0.1' - commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' - owner_id: 44036562 - repo_id: 197814629 - 'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a': - ref: 'v7.0.1' - commit: 'sha1-043fb46d1a93c77aae656e7c1c64a875d1fc6a0a' - owner_id: 44036562 - repo_id: 192625955 - 'denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed': - ref: 'v2.0.5' - commit: 'sha1-22d081ff2d3a40755e97629de92e3bcbfa7cf2ed' - owner_id: 42048915 - repo_id: 356423100 - 'editorconfig-checker/action-editorconfig-checker@840e866d93b8e032123c23bac69dece044d4d84c': - ref: 'v2.2.0' - commit: 'sha1-840e866d93b8e032123c23bac69dece044d4d84c' - owner_id: 26415196 - repo_id: 297874902 - 'erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124': - ref: 'v1.24.1' - commit: 'sha1-54075bcc5e249e4758d363f27d099f55d843f124' - owner_id: 47606891 - repo_id: 331103973 - 'github/codeql-action@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28': - ref: 'v4.37.8' - commit: 'sha1-db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28' - owner_id: 9919 - repo_id: 259445878 - 'metadatastician/standards@571cc734cd69fb846032ec77a662aa8ee4fc32cd': - ref: 'main' - commit: 'sha1-571cc734cd69fb846032ec77a662aa8ee4fc32cd' - owner_id: 297579217 - repo_id: 1116521501 diff --git a/scripts/ci/lock-reusable-callers.sh b/scripts/ci/lock-reusable-callers.sh deleted file mode 100644 index fdf48a2f..00000000 --- a/scripts/ci/lock-reusable-callers.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: MPL-2.0 -# Copyright (c) 2026 Jonathan D.A. Jewell -# Metadata-only adapter for gh-actions-lock v0.4.1's external-workflow gap. -set -euo pipefail -root=$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd) -repo=metadatastician/standards -ref=571cc734cd69fb846032ec77a662aa8ee4fc32cd -work=$(mktemp -d) -trap 'rm -rf "$work"' EXIT -mkdir -p "$work/.github/workflows" - -# Refuse to replace a later, wider lockfile with this deliberately scoped one. -if [[ -f "$root/.github/workflows/actions.lock" ]]; then - unexpected=$(sed -n "s/^ '\(.github\/workflows\/[^']*\)':.*/\1/p" "$root/.github/workflows/actions.lock" | - grep -vE '^\.github/workflows/(governance|hypatia-scan|secret-scanner|spark-theatre-gate)\.yml$' || true) - [[ -z "$unexpected" ]] || { echo 'Refusing to overwrite a wider workflow lock' >&2; exit 1; } -fi - -while read -r caller callee; do - grep -Fq "uses: $repo/.github/workflows/$callee@$ref" "$root/.github/workflows/$caller" - gh api "repos/$repo/contents/.github/workflows/$callee?ref=$ref" \ - -H 'Accept: application/vnd.github.raw+json' > "$work/$callee.source" - # These four fixed workflows contain only remote, SHA-pinned action steps. - # They are read as data; neither the downloaded jobs nor this projection run. - sed -nE 's/^[[:space:]]*(-[[:space:]]*)?uses:[[:space:]]*([^[:space:]#]+).*/\2/p' \ - "$work/$callee.source" | sort -u > "$work/uses" - [[ -s "$work/uses" ]] - if grep -vE '^[A-Za-z0-9_.-]+/[A-Za-z0-9_./-]+@[0-9a-f]{40}$' "$work/uses"; then - echo 'Unsupported dependency in pinned reusable workflow' >&2; exit 1 - fi - { - printf 'name: Metadata projection\non: workflow_dispatch\njobs:\n metadata:\n runs-on: ubuntu-latest\n steps:\n' - sed 's/^/ - uses: /' "$work/uses" - } > "$work/.github/workflows/$caller" -done <<'CALLERS' -governance.yml governance-reusable.yml -hypatia-scan.yml hypatia-scan-reusable.yml -secret-scanner.yml secret-scanner-reusable.yml -spark-theatre-gate.yml spark-theatre-gate.yml -CALLERS - -# Resolve upstream ownership, commit reachability and transitive action pins -# using the official tool. A failure cannot replace the checked-in lockfile. -( - cd "$work" - GH_ACTIONS_LOCK_REPO_ROOT="$work" gh actions-lock --no-interactive --no-narrow - GH_ACTIONS_LOCK_REPO_ROOT="$work" gh actions-lock --verify - # Resolve reusable-repository identity only after verifying actual actions. - # This metadata reference has no action.yml: it is a workflow repository. - # Native GitHub validates the real job-level workflow calls on publication. - for caller in governance hypatia-scan secret-scanner spark-theatre-gate; do - printf ' - uses: %s@%s\n' "$repo" "$ref" >> ".github/workflows/$caller.yml" - done - GH_ACTIONS_LOCK_REPO_ROOT="$work" gh actions-lock --no-interactive --no-narrow -) -cp "$work/.github/workflows/actions.lock" "$root/.github/workflows/actions.lock" -echo 'Updated lock metadata for four existing reusable callers; workflow bytes unchanged.' diff --git a/verification/header/WORKFLOW-LOCK.adoc b/verification/header/WORKFLOW-LOCK.adoc deleted file mode 100644 index 0b07ae8a..00000000 --- a/verification/header/WORKFLOW-LOCK.adoc +++ /dev/null @@ -1,35 +0,0 @@ -= Reusable workflow lock scope -:toc: - -The four governance/security callers retain their exact existing -`metadatastician/standards` revision -`571cc734cd69fb846032ec77a662aa8ee4fc32cd`. The owner-approved allowlist repair -admits only those four workflow paths at that revision. - -Their jobs previously failed before checkout with an invalid action-lock pin. -The caller now carries generated metadata for the exact reusable repository -and its existing action dependencies. No check is removed or made optional. - -`scripts/ci/lock-reusable-callers.sh` projects the action references from those -four immutable workflow files into a temporary metadata workspace. It adds -the reusable repository identity and asks `gh actions-lock` to resolve and -verify ownership, reachable commits and transitive action dependencies. -Actual action dependencies pass the tool's online verification before adding -the reusable repository identity. The synthetic identity reference itself -cannot pass action-metadata verification: standards is a workflow repository, -not an action with an `action.yml`. Its identity and reachability are resolved -by the official generator; actual workflow-call validation remains with GitHub. -The projections never execute and are never installed as workflows. Authored -caller bytes remain unchanged. This adapter is needed because v0.4.1 does -not traverse external reusable workflow calls. Native hosted CI is the -acceptance test for this caller-side coverage. - -The lock is deliberately scoped to these four callers. It is not a claim -that every Proven workflow has been locked. A whole-repository refresh also -encountered an unrelated unreachable `dtolnay/rust-toolchain` pin in -`publish-crates.yml`; that repair is separate. The adapter refuses to replace -a future wider lockfile with its four-workflow projection. - -This infrastructure evidence is separate from Header RefC soundness and -Atoma's scalar source interpretation evidence. None establishes whole-library -or complete Idris2-to-application refinement. From aab589a2192e2e0081359b8c792970aef438475b Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 22:03:24 +0000 Subject: [PATCH 06/17] ci: pin unchanged reusable workflows to the minimal leaf-lock backport --- .github/workflows/governance.yml | 2 +- .github/workflows/hypatia-scan.yml | 2 +- .github/workflows/secret-scanner.yml | 2 +- .github/workflows/spark-theatre-gate.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/governance.yml b/.github/workflows/governance.yml index a14a5276..4cb4591b 100644 --- a/.github/workflows/governance.yml +++ b/.github/workflows/governance.yml @@ -14,5 +14,5 @@ permissions: jobs: governance: - uses: metadatastician/standards/.github/workflows/governance-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd + uses: metadatastician/standards/.github/workflows/governance-reusable.yml@6da35965d761761c09e3779e5639012de767bb48 diff --git a/.github/workflows/hypatia-scan.yml b/.github/workflows/hypatia-scan.yml index 8ec7bf04..536e0429 100644 --- a/.github/workflows/hypatia-scan.yml +++ b/.github/workflows/hypatia-scan.yml @@ -17,5 +17,5 @@ permissions: jobs: hypatia: - uses: metadatastician/standards/.github/workflows/hypatia-scan-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd + uses: metadatastician/standards/.github/workflows/hypatia-scan-reusable.yml@6da35965d761761c09e3779e5639012de767bb48 diff --git a/.github/workflows/secret-scanner.yml b/.github/workflows/secret-scanner.yml index 29907c2e..6d5d1f71 100644 --- a/.github/workflows/secret-scanner.yml +++ b/.github/workflows/secret-scanner.yml @@ -18,6 +18,6 @@ jobs: contents: read pull-requests: write actions: read - uses: metadatastician/standards/.github/workflows/secret-scanner-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd + uses: metadatastician/standards/.github/workflows/secret-scanner-reusable.yml@6da35965d761761c09e3779e5639012de767bb48 secrets: inherit diff --git a/.github/workflows/spark-theatre-gate.yml b/.github/workflows/spark-theatre-gate.yml index 2ce5c3f4..f42a24d3 100644 --- a/.github/workflows/spark-theatre-gate.yml +++ b/.github/workflows/spark-theatre-gate.yml @@ -15,7 +15,7 @@ permissions: contents: read jobs: spark-theatre-gate: - uses: metadatastician/standards/.github/workflows/spark-theatre-gate.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd + uses: metadatastician/standards/.github/workflows/spark-theatre-gate.yml@6da35965d761761c09e3779e5639012de767bb48 with: paths: "." enforce_zero_contract: false From d980fdbf4d024f743c7abc75e9b822e53c0c08e1 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 22:05:44 +0000 Subject: [PATCH 07/17] docs: record minimal legacy workflow lock profile and proof limits --- verification/header/CI-PROFILE.adoc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 verification/header/CI-PROFILE.adoc diff --git a/verification/header/CI-PROFILE.adoc b/verification/header/CI-PROFILE.adoc new file mode 100644 index 00000000..0813211d --- /dev/null +++ b/verification/header/CI-PROFILE.adoc @@ -0,0 +1,27 @@ += Header and reusable workflow validation profiles + +The header boundary and scalar contract retain their Idris2 ABI and pure Zig +FFI/API implementation. Atoma's independent scalar replay pins +`21346ae1c85b7773a4bc16df51cb1ec5977f6b65`; later CI-only commits do not change +those source or contract bytes. Compiler refinement and the complete foreign +boundary remain unproved. + +Four scanner/governance workflows use the legacy Standards workflow code at +`571cc734cd69fb846032ec77a662aa8ee4fc32cd`, with the minimal lock metadata +backport `6da35965d761761c09e3779e5639012de767bb48`. The backport changes +only four leaf `ref` fields to matching tags: checkout, cache, upload-artifact +and setup-beam. Action commit digests, workflow bodies, permissions and check +behavior are unchanged. The actual dependency refs passed online verification +with `gh actions-lock` v0.4.1. Native hosted execution remains the acceptance +test for the reusable workflow profile. + +This backports the repair described in +https://github.com/metadatastician/standards/pull/1271[Standards #1271] +without importing unrelated later governance changes. It is an isolated +compatibility revision, not a new normative policy or a change to Standards +main. A caller-side lockfile cannot repair the defining repository's lockfile; +the unsuccessful caller-lock experiment was removed. + +The repository allowlist admits only these four workflow paths at the exact +backport commit. No check has been disabled or made optional. Header proof +results and generic governance/security results must be reported separately. From 3b69c82ec6f3f5cbab5f9845cb54221a0691bb90 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 22:23:34 +0000 Subject: [PATCH 08/17] docs: record observed legacy governance blockers and provenance --- verification/header/CI-PROFILE.adoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/verification/header/CI-PROFILE.adoc b/verification/header/CI-PROFILE.adoc index 0813211d..acf6acbc 100644 --- a/verification/header/CI-PROFILE.adoc +++ b/verification/header/CI-PROFILE.adoc @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: CC-BY-SA-4.0 +// Copyright (c) 2026 Jonathan D.A. Jewell = Header and reusable workflow validation profiles The header boundary and scalar contract retain their Idris2 ABI and pure Zig @@ -25,3 +27,16 @@ the unsuccessful caller-lock experiment was removed. The repository allowlist admits only these four workflow paths at the exact backport commit. No check has been disabled or made optional. Header proof results and generic governance/security results must be reported separately. + +== Observed hosted outcome + +At `d980fdbf4d024f743c7abc75e9b822e53c0c08e1`, Header RefC soundness, +Secret Scanner, SPARK Theatre Gate and the separate Hypatia scan passed. +The backport repaired startup, but does not make this legacy profile +governance-compliant: its canonical allowlist data lacks the moved Standards +owner, its ancestry rule rejects a reusable revision outside the default +branch, and its old baseline filter exceeds the operating system's argument +limit. The default-branch baseline filter already has a file-input repair +(Standards #1668). A durable migration must select an accepted default-branch +profile and its matching policy data. Do not disable those checks or add +baseline exemptions to hide these failures. From c8b6a771f56e1f4e4b6203e1ed569187dd7d13e4 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 23:12:31 +0000 Subject: [PATCH 09/17] fix(ci): use canonical governance and pass no scanner secrets --- .github/workflows/governance.yml | 3 +- .github/workflows/hypatia-scan.yml | 6 +- .github/workflows/secret-scanner.yml | 5 +- .github/workflows/spark-theatre-gate.yml | 5 +- verification/header/CI-PROFILE.adoc | 73 ++++++++++++------------ 5 files changed, 43 insertions(+), 49 deletions(-) diff --git a/.github/workflows/governance.yml b/.github/workflows/governance.yml index 4cb4591b..b73e69ef 100644 --- a/.github/workflows/governance.yml +++ b/.github/workflows/governance.yml @@ -14,5 +14,4 @@ permissions: jobs: governance: - uses: metadatastician/standards/.github/workflows/governance-reusable.yml@6da35965d761761c09e3779e5639012de767bb48 - + uses: metadatastician/standards/.github/workflows/governance-reusable.yml@84c2d1c1b040c9d7b8924532fa77e71e63d72c66 diff --git a/.github/workflows/hypatia-scan.yml b/.github/workflows/hypatia-scan.yml index 536e0429..f718533c 100644 --- a/.github/workflows/hypatia-scan.yml +++ b/.github/workflows/hypatia-scan.yml @@ -17,5 +17,7 @@ permissions: jobs: hypatia: - uses: metadatastician/standards/.github/workflows/hypatia-scan-reusable.yml@6da35965d761761c09e3779e5639012de767bb48 - + uses: metadatastician/standards/.github/workflows/hypatia-scan-reusable.yml@84c2d1c1b040c9d7b8924532fa77e71e63d72c66 + with: + # Preserve the legacy whole-tree scope; do not silently exclude archives. + scope-excludes: "" diff --git a/.github/workflows/secret-scanner.yml b/.github/workflows/secret-scanner.yml index 6d5d1f71..21abba22 100644 --- a/.github/workflows/secret-scanner.yml +++ b/.github/workflows/secret-scanner.yml @@ -16,8 +16,5 @@ jobs: scan: permissions: contents: read - pull-requests: write actions: read - uses: metadatastician/standards/.github/workflows/secret-scanner-reusable.yml@6da35965d761761c09e3779e5639012de767bb48 - secrets: inherit - + uses: metadatastician/standards/.github/workflows/secret-scanner-reusable.yml@84c2d1c1b040c9d7b8924532fa77e71e63d72c66 diff --git a/.github/workflows/spark-theatre-gate.yml b/.github/workflows/spark-theatre-gate.yml index f42a24d3..332d651b 100644 --- a/.github/workflows/spark-theatre-gate.yml +++ b/.github/workflows/spark-theatre-gate.yml @@ -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 @@ -15,8 +15,7 @@ permissions: contents: read jobs: spark-theatre-gate: - uses: metadatastician/standards/.github/workflows/spark-theatre-gate.yml@6da35965d761761c09e3779e5639012de767bb48 + uses: metadatastician/standards/.github/workflows/spark-theatre-gate.yml@84c2d1c1b040c9d7b8924532fa77e71e63d72c66 with: paths: "." enforce_zero_contract: false - diff --git a/verification/header/CI-PROFILE.adoc b/verification/header/CI-PROFILE.adoc index acf6acbc..c1291a8e 100644 --- a/verification/header/CI-PROFILE.adoc +++ b/verification/header/CI-PROFILE.adoc @@ -2,41 +2,38 @@ // Copyright (c) 2026 Jonathan D.A. Jewell = Header and reusable workflow validation profiles -The header boundary and scalar contract retain their Idris2 ABI and pure Zig -FFI/API implementation. Atoma's independent scalar replay pins -`21346ae1c85b7773a4bc16df51cb1ec5977f6b65`; later CI-only commits do not change -those source or contract bytes. Compiler refinement and the complete foreign -boundary remain unproved. - -Four scanner/governance workflows use the legacy Standards workflow code at -`571cc734cd69fb846032ec77a662aa8ee4fc32cd`, with the minimal lock metadata -backport `6da35965d761761c09e3779e5639012de767bb48`. The backport changes -only four leaf `ref` fields to matching tags: checkout, cache, upload-artifact -and setup-beam. Action commit digests, workflow bodies, permissions and check -behavior are unchanged. The actual dependency refs passed online verification -with `gh actions-lock` v0.4.1. Native hosted execution remains the acceptance -test for the reusable workflow profile. - -This backports the repair described in -https://github.com/metadatastician/standards/pull/1271[Standards #1271] -without importing unrelated later governance changes. It is an isolated -compatibility revision, not a new normative policy or a change to Standards -main. A caller-side lockfile cannot repair the defining repository's lockfile; -the unsuccessful caller-lock experiment was removed. - -The repository allowlist admits only these four workflow paths at the exact -backport commit. No check has been disabled or made optional. Header proof -results and generic governance/security results must be reported separately. - -== Observed hosted outcome - -At `d980fdbf4d024f743c7abc75e9b822e53c0c08e1`, Header RefC soundness, -Secret Scanner, SPARK Theatre Gate and the separate Hypatia scan passed. -The backport repaired startup, but does not make this legacy profile -governance-compliant: its canonical allowlist data lacks the moved Standards -owner, its ancestry rule rejects a reusable revision outside the default -branch, and its old baseline filter exceeds the operating system's argument -limit. The default-branch baseline filter already has a file-input repair -(Standards #1668). A durable migration must select an accepted default-branch -profile and its matching policy data. Do not disable those checks or add -baseline exemptions to hide these failures. +The ABI definitions remain Idris2 and the FFI/API implementation remains pure +Zig. Atoma's scalar replay pins `21346ae1c85b7773a4bc16df51cb1ec5977f6b65`; +this workflow migration changes none of those source or contract bytes. +Compiler refinement and the complete foreign boundary remain unproved. + +== Canonical governance migration + +Four callers pin Standards default-branch revision +`84c2d1c1b040c9d7b8924532fa77e71e63d72c66`. Its canonical policy recognizes +the moved `metadatastician/standards` owner, its baseline validator uses file +inputs rather than overflowing the argument vector, and its workflow helpers +are bound to the reusable's own revision. + +This replaces the isolated `6da35965d761761c09e3779e5639012de767bb48` +lock-metadata backport. That backport repaired startup, but the default-branch +ancestry policy correctly rejected it. The removed caller-side lock +experiment is not restored. + +The four exact reusable paths and their two nested DEED/K9 conformance paths +must be admitted in the repository Actions allowlist. The nested paths pin +`bfa851f5291edd82d01dfb33cb8d81b3002d2f89`; no owner-wide wildcard is needed. +DEED/K9 retain the canonical advisory default; existing gates are not disabled. +Hypatia explicitly scans the whole tree, preserving the previous scope. +Its validated baseline and threshold behavior remain the canonical defaults. + +The secret scanner declares no inherited secrets. Its caller forwards none +and no longer requests pull-request write permission. This addresses +SonarCloud rule `githubactions:S7635` without an exemption. + +== Evidence and limits + +Header RefC soundness, header theory replay and Atoma scalar replay are separate +from generic governance checks. Passing one is not evidence that the others +passed. The final PR head must pass hosted CI and review before merge; the +migration's hosted result is pending when this document is introduced. From 4d97c57d99e9e2752fa66c4a193d883989a44244 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 23:14:10 +0000 Subject: [PATCH 10/17] docs(ci): record approved canonical profile admission --- verification/header/CI-PROFILE.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/verification/header/CI-PROFILE.adoc b/verification/header/CI-PROFILE.adoc index c1291a8e..5d03b9a0 100644 --- a/verification/header/CI-PROFILE.adoc +++ b/verification/header/CI-PROFILE.adoc @@ -20,8 +20,9 @@ lock-metadata backport. That backport repaired startup, but the default-branch ancestry policy correctly rejected it. The removed caller-side lock experiment is not restored. -The four exact reusable paths and their two nested DEED/K9 conformance paths -must be admitted in the repository Actions allowlist. The nested paths pin +The owner-approved four exact reusable paths and their two nested DEED/K9 +conformance paths were admitted and read back in the Actions allowlist. +The nested paths pin `bfa851f5291edd82d01dfb33cb8d81b3002d2f89`; no owner-wide wildcard is needed. DEED/K9 retain the canonical advisory default; existing gates are not disabled. Hypatia explicitly scans the whole tree, preserving the previous scope. From da6af2a14a8af35656d0575911cfa39dc1e133d7 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 23:24:07 +0000 Subject: [PATCH 11/17] fix(governance): type external UUID vectors and remove termination assertion --- .github/workflows/label-triage.yml | 1 + .github/workflows/labels.yml | 1 + apps/proven-ws/src/WS.idr | 1 + apps/proven-ws/src/WS/Handshake.idr | 1 + bindings/bash/proven.sh | 1 + bindings/cobol/copybooks/SAFEUUID.cpy | 3 ++- bindings/dhall/proven/core/SafeUUID.dhall | 6 ++++++ bindings/elixir/test/proven_test.exs | 1 + bindings/forth/README.adoc | 2 ++ bindings/gleam/test/proven_test.gleam | 1 + bindings/guile/README.adoc | 8 ++++++++ bindings/javascript/benchmarks/benchmark.mjs | 1 + bindings/julia/Project.toml | 2 ++ bindings/just/proven.just | 1 + bindings/mustache/README.adoc | 1 + bindings/mustache/helpers/proven-helpers.js | 1 + bindings/mustache/helpers/proven-helpers.rb | 1 + bindings/nickel/proven/safe-uuid.ncl | 1 + bindings/nim/tests/test_proven.nim | 7 +++++++ bindings/ruby/lib/proven/safe_uuid.rb | 1 + bindings/rust/benches/benchmarks.rs | 1 + bindings/yaml-schema/proven-schema.yaml | 1 + bindings/zig/src/safe_uuid.zig | 2 ++ bindings/zsh/functions/proven-validate | 1 + src/Proven/SafeUnionFind.idr | 13 ++++++++----- tests/properties/SafeUUIDProps.idr | 19 +++++++++++++++++++ tests/unit/SafeRegexUnit.idr | 1 + tests/unit/SafeUUIDUnit.idr | 14 ++++++++++++++ 28 files changed, 88 insertions(+), 6 deletions(-) diff --git a/.github/workflows/label-triage.yml b/.github/workflows/label-triage.yml index 9886e920..2677c326 100644 --- a/.github/workflows/label-triage.yml +++ b/.github/workflows/label-triage.yml @@ -46,6 +46,7 @@ permissions: jobs: triage: runs-on: ubuntu-latest + timeout-minutes: 10 steps: - name: Classify and label env: diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index c80b676c..c536afb9 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -32,6 +32,7 @@ permissions: jobs: sync: runs-on: ubuntu-latest + timeout-minutes: 10 steps: - name: Apply canonical labels env: diff --git a/apps/proven-ws/src/WS.idr b/apps/proven-ws/src/WS.idr index e093d705..3ea60504 100644 --- a/apps/proven-ws/src/WS.idr +++ b/apps/proven-ws/src/WS.idr @@ -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" diff --git a/apps/proven-ws/src/WS/Handshake.idr b/apps/proven-ws/src/WS/Handshake.idr index 8c441132..28e6fe9d 100644 --- a/apps/proven-ws/src/WS/Handshake.idr +++ b/apps/proven-ws/src/WS/Handshake.idr @@ -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. diff --git a/bindings/bash/proven.sh b/bindings/bash/proven.sh index c9c7b0c3..1defda0d 100644 --- a/bindings/bash/proven.sh +++ b/bindings/bash/proven.sh @@ -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" diff --git a/bindings/cobol/copybooks/SAFEUUID.cpy b/bindings/cobol/copybooks/SAFEUUID.cpy index 1e14e6bd..21d01017 100644 --- a/bindings/cobol/copybooks/SAFEUUID.cpy +++ b/bindings/cobol/copybooks/SAFEUUID.cpy @@ -47,9 +47,10 @@ * Nil UUID constant 01 UUID-NIL PIC X(36) + * hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier VALUE "00000000-0000-0000-0000-000000000000". * Max UUID constant 01 UUID-MAX PIC X(36) + * hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier VALUE "ffffffff-ffff-ffff-ffff-ffffffffffff". - diff --git a/bindings/dhall/proven/core/SafeUUID.dhall b/bindings/dhall/proven/core/SafeUUID.dhall index 528aceba..afafbc69 100644 --- a/bindings/dhall/proven/core/SafeUUID.dhall +++ b/bindings/dhall/proven/core/SafeUUID.dhall @@ -68,23 +68,29 @@ let mkUUIDv5 -- Nil UUID (all zeros) let nilUUID : UUID + -- hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier = { uuid = "00000000-0000-0000-0000-000000000000", version = UUIDVersion.Nil } -- Check if UUID is nil let isNil : UUID -> Bool = \(u : UUID) -> + -- hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier u.uuid == "00000000-0000-0000-0000-000000000000" -- Standard namespace UUIDs (RFC 4122) let Namespaces = { -- DNS namespace + -- hypatia: allow-next-line uuid/external -- RFC UUID namespace constant; preserve interoperability dns = { uuid = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", version = UUIDVersion.V1 }, -- URL namespace + -- hypatia: allow-next-line uuid/external -- RFC UUID namespace constant; preserve interoperability url = { uuid = "6ba7b811-9dad-11d1-80b4-00c04fd430c8", version = UUIDVersion.V1 }, -- OID namespace + -- hypatia: allow-next-line uuid/external -- RFC UUID namespace constant; preserve interoperability oid = { uuid = "6ba7b812-9dad-11d1-80b4-00c04fd430c8", version = UUIDVersion.V1 }, -- X.500 DN namespace + -- hypatia: allow-next-line uuid/external -- RFC UUID namespace constant; preserve interoperability x500 = { uuid = "6ba7b814-9dad-11d1-80b4-00c04fd430c8", version = UUIDVersion.V1 } } diff --git a/bindings/elixir/test/proven_test.exs b/bindings/elixir/test/proven_test.exs index b5d969bc..5ec6d76e 100644 --- a/bindings/elixir/test/proven_test.exs +++ b/bindings/elixir/test/proven_test.exs @@ -157,6 +157,7 @@ defmodule ProvenTest do end test "parse validates UUIDs" do + # hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier assert SafeUuid.valid?("550e8400-e29b-41d4-a716-446655440000") == true assert SafeUuid.valid?("not-a-uuid") == false end diff --git a/bindings/forth/README.adoc b/bindings/forth/README.adoc index ba18f0c9..6a218f93 100644 --- a/bindings/forth/README.adoc +++ b/bindings/forth/README.adoc @@ -200,12 +200,14 @@ UUID parsing, formatting, and validation (RFC 4122): include safe-uuid.fs \ Parse UUID +\ hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier s" 550e8400-e29b-41d4-a716-446655440000" uuid-buffer uuid-parse if uuid-buffer uuid-format type cr \ Canonical format uuid-buffer uuid-format-urn type cr \ urn:uuid:... then \ Quick validation +\ hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier s" 550e8400-e29b-41d4-a716-446655440000" uuid? if ." Looks like a UUID" cr then diff --git a/bindings/gleam/test/proven_test.gleam b/bindings/gleam/test/proven_test.gleam index 158b6ac7..a3fa011b 100644 --- a/bindings/gleam/test/proven_test.gleam +++ b/bindings/gleam/test/proven_test.gleam @@ -207,6 +207,7 @@ pub fn hex_is_valid_invalid_test() { // -- UUID tests --------------------------------------------------------------- pub fn uuid_is_valid_test() { + // hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier uuid.is_valid("550e8400-e29b-41d4-a716-446655440000") |> should.equal(True) } diff --git a/bindings/guile/README.adoc b/bindings/guile/README.adoc index 4d0d890e..1526345d 100644 --- a/bindings/guile/README.adoc +++ b/bindings/guile/README.adoc @@ -174,24 +174,32 @@ All operations return an alist with `'value` and `'ok` keys. (use-modules (proven safe-uuid)) ;; Validate UUID +;; hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier (uuid-valid? "550e8400-e29b-41d4-a716-446655440000") ; => #t +;; hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier (uuid-valid-v4? "550e8400-e29b-41d4-a716-446655440000") ; => #t ;; Get version +;; hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier (uuid-version "550e8400-e29b-41d4-a716-446655440000") ; => 4 ;; Normalize +;; hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier (uuid-normalize "550E8400-E29B-41D4-A716-446655440000") +;; hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier ; => "550e8400-e29b-41d4-a716-446655440000" ;; Parse into components +;; hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier (uuid-parse "550e8400-e29b-41d4-a716-446655440000") ;; Convert to/from hex +;; hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier (uuid-to-hex "550e8400-e29b-41d4-a716-446655440000") ; => "550e8400e29b41d4a716446655440000" (uuid-from-hex "550e8400e29b41d4a716446655440000") +;; hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier ; => ((uuid . "550e8400-e29b-41d4-a716-446655440000") (ok . #t)) ---- diff --git a/bindings/javascript/benchmarks/benchmark.mjs b/bindings/javascript/benchmarks/benchmark.mjs index 6af22de6..ec75a909 100644 --- a/bindings/javascript/benchmarks/benchmark.mjs +++ b/bindings/javascript/benchmarks/benchmark.mjs @@ -113,6 +113,7 @@ console.log(); // SafeUUID benchmarks console.log('SafeUUID'); console.log('--------'); +// hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier benchmark('parseUuid', () => parseUuid("550e8400-e29b-41d4-a716-446655440000")); benchmark('generateUuidV4', () => generateUuidV4(), 10000); console.log(); diff --git a/bindings/julia/Project.toml b/bindings/julia/Project.toml index d1a02690..b737ad04 100644 --- a/bindings/julia/Project.toml +++ b/bindings/julia/Project.toml @@ -2,11 +2,13 @@ # Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) name = "Proven" +# hypatia: allow-next-line uuid/external -- Existing Julia package identity; preserve dependency resolution uuid = "a1b2c3d4-e5f6-7890-abcd-ef1234567890" version = "0.9.0" authors = ["Jonathan D.A. Jewell "] [extras] +# hypatia: allow-next-line uuid/external -- Existing Julia package identity; preserve dependency resolution Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] diff --git a/bindings/just/proven.just b/bindings/just/proven.just index 0ad6a73d..b390c8ce 100644 --- a/bindings/just/proven.just +++ b/bindings/just/proven.just @@ -338,6 +338,7 @@ uuid-v4: @{{ proven_cli }} uuid v4 # Parse and validate a UUID +# hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier # Usage: just parse-uuid "550e8400-e29b-41d4-a716-446655440000" [doc("Parse and validate a UUID string")] parse-uuid uuid: diff --git a/bindings/mustache/README.adoc b/bindings/mustache/README.adoc index 54e847b5..c7cb3775 100644 --- a/bindings/mustache/README.adoc +++ b/bindings/mustache/README.adoc @@ -164,6 +164,7 @@ console.log(Mustache.render(template, context)); | `proven_parse_version` | semver string | `{{#proven_parse_version}}1.2.3-alpha{{/proven_parse_version}}` | | `proven_version_compare` | `a b` (space-separated) | `{{#proven_version_compare}}1.2.3 2.0.0{{/proven_version_compare}}` | | `proven_uuid_v4` | (none) | `{{#proven_uuid_v4}}{{/proven_uuid_v4}}` | +// hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier | `proven_parse_uuid` | UUID string | `{{#proven_parse_uuid}}550e8400-e29b-41d4-a716-446655440000{{/proven_parse_uuid}}` | == Architecture diff --git a/bindings/mustache/helpers/proven-helpers.js b/bindings/mustache/helpers/proven-helpers.js index e32496a4..cea1d281 100644 --- a/bindings/mustache/helpers/proven-helpers.js +++ b/bindings/mustache/helpers/proven-helpers.js @@ -185,6 +185,7 @@ export function provenHelpers() { }; }, + // hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier // Usage: {{#proven_parse_uuid}}550e8400-e29b-41d4-a716-446655440000{{/proven_parse_uuid}} proven_parse_uuid: makeSingleArgLambda("uuid", "parse"), }; diff --git a/bindings/mustache/helpers/proven-helpers.rb b/bindings/mustache/helpers/proven-helpers.rb index 8e447b95..717f0cff 100644 --- a/bindings/mustache/helpers/proven-helpers.rb +++ b/bindings/mustache/helpers/proven-helpers.rb @@ -174,6 +174,7 @@ def self.context # Usage: {{#proven_uuid_v4}}{{/proven_uuid_v4}} 'proven_uuid_v4' => ->(_text) { call_cli('uuid', 'v4') }, + # hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier # Usage: {{#proven_parse_uuid}}550e8400-e29b-41d4-a716-446655440000{{/proven_parse_uuid}} 'proven_parse_uuid' => make_single_arg_lambda('uuid', 'parse'), } diff --git a/bindings/nickel/proven/safe-uuid.ncl b/bindings/nickel/proven/safe-uuid.ncl index 2ad4de89..a28c9db9 100644 --- a/bindings/nickel/proven/safe-uuid.ncl +++ b/bindings/nickel/proven/safe-uuid.ncl @@ -13,6 +13,7 @@ uuid_pattern = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", # Nil UUID + # hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier NIL = "00000000-0000-0000-0000-000000000000", # Check if string is a valid UUID (any version) diff --git a/bindings/nim/tests/test_proven.nim b/bindings/nim/tests/test_proven.nim index f51cfaa4..cbfc34a1 100644 --- a/bindings/nim/tests/test_proven.nim +++ b/bindings/nim/tests/test_proven.nim @@ -110,6 +110,7 @@ suite "SafeCrypto": suite "SafeUuid": test "parseUuid parses valid UUID": + # hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier let uuid = parseUuid("550e8400-e29b-41d4-a716-446655440000") check uuid.isSome check uuid.get.version == uvV4 @@ -121,19 +122,25 @@ suite "SafeUuid": check parseUuid("550e8400-e29b-41d4-a716").isNone test "nil UUID is detected": + # hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier let uuid = parseUuid("00000000-0000-0000-0000-000000000000") check uuid.isSome check uuid.get.isNil test "UUID formats correctly": + # hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier let uuid = parseUuid("550e8400-e29b-41d4-a716-446655440000") + # hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier check $uuid.get == "550e8400-e29b-41d4-a716-446655440000" test "UUID URN format": + # hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier let uuid = parseUuid("550e8400-e29b-41d4-a716-446655440000") + # hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier check uuid.get.toUrn == "urn:uuid:550e8400-e29b-41d4-a716-446655440000" test "isValidUuid validates format": + # hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier check isValidUuid("550e8400-e29b-41d4-a716-446655440000") == true check isValidUuid("invalid") == false diff --git a/bindings/ruby/lib/proven/safe_uuid.rb b/bindings/ruby/lib/proven/safe_uuid.rb index 4a86b6eb..5b229a45 100644 --- a/bindings/ruby/lib/proven/safe_uuid.rb +++ b/bindings/ruby/lib/proven/safe_uuid.rb @@ -79,6 +79,7 @@ def valid?(uuid_string) def nil_uuid?(uuid_string) parsed = parse(uuid_string) return nil if parsed.nil? + # hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier parsed == "00000000-0000-0000-0000-000000000000" end diff --git a/bindings/rust/benches/benchmarks.rs b/bindings/rust/benches/benchmarks.rs index c3afffbf..8b8c6b13 100644 --- a/bindings/rust/benches/benchmarks.rs +++ b/bindings/rust/benches/benchmarks.rs @@ -158,6 +158,7 @@ fn bench_safe_uuid(c: &mut Criterion) { let mut group = c.benchmark_group("SafeUUID"); group.bench_function("parse_uuid", |b| { + // hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier b.iter(|| parse_uuid(black_box("550e8400-e29b-41d4-a716-446655440000"))) }); diff --git a/bindings/yaml-schema/proven-schema.yaml b/bindings/yaml-schema/proven-schema.yaml index 7bc09efe..803a96ac 100644 --- a/bindings/yaml-schema/proven-schema.yaml +++ b/bindings/yaml-schema/proven-schema.yaml @@ -371,6 +371,7 @@ $defs: format: uuid pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$' examples: + # hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier - "550e8400-e29b-41d4-a716-446655440000" UUIDv4: diff --git a/bindings/zig/src/safe_uuid.zig b/bindings/zig/src/safe_uuid.zig index 387e7d54..43ef8679 100644 --- a/bindings/zig/src/safe_uuid.zig +++ b/bindings/zig/src/safe_uuid.zig @@ -83,10 +83,12 @@ test "v4 generation" { } test "parse and format" { + // hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier const uuid = try parse("550e8400-e29b-41d4-a716-446655440000"); try std.testing.expect(!uuid.isNil()); const str = try uuid.toString(); defer str.deinit(); + // hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier try std.testing.expectEqualStrings("550e8400-e29b-41d4-a716-446655440000", str.slice()); } diff --git a/bindings/zsh/functions/proven-validate b/bindings/zsh/functions/proven-validate index 5c49c492..1971784b 100644 --- a/bindings/zsh/functions/proven-validate +++ b/bindings/zsh/functions/proven-validate @@ -137,6 +137,7 @@ proven-validate-phone() { } # Parse and validate a UUID. +# hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier # Usage: proven-validate-uuid "550e8400-e29b-41d4-a716-446655440000" proven-validate-uuid() { if [[ $# -ne 1 ]]; then diff --git a/src/Proven/SafeUnionFind.idr b/src/Proven/SafeUnionFind.idr index ce57c971..fb60f7ac 100644 --- a/src/Proven/SafeUnionFind.idr +++ b/src/Proven/SafeUnionFind.idr @@ -206,11 +206,14 @@ allSets uf = in mapMaybe (\r => members r uf) roots where nub : Eq a => List a -> List a - nub [] = [] - -- TRUSTED: termination; `filter` never grows a list, so the recursive - -- argument is at most `xs`, which is a subterm of the pattern `x :: xs`. - -- The checker cannot see through `filter`. - nub (x :: xs) = x :: nub (assert_smaller xs (filter (/= x) xs)) + nub = go [] + where + -- Recurse on the original tail, preserving first-occurrence order. + -- The totality checker sees structural descent without an assertion. + go : List a -> List a -> List a + go seen [] = [] + go seen (x :: xs) = + if elem x seen then go seen xs else x :: go (x :: seen) xs -------------------------------------------------------------------------------- -- Batch Operations diff --git a/tests/properties/SafeUUIDProps.idr b/tests/properties/SafeUUIDProps.idr index 0f9b7e54..799877fc 100644 --- a/tests/properties/SafeUUIDProps.idr +++ b/tests/properties/SafeUUIDProps.idr @@ -18,6 +18,7 @@ import System private v4Sample : String +-- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier v4Sample = "550e8400-e29b-41d4-a716-446655440000" -------------------------------------------------------------------------------- @@ -83,10 +84,15 @@ check label False = do private samples : List String samples = [ v4Sample + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier , "550E8400-E29B-41D4-A716-446655440000" + -- hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier , "00000000-0000-0000-0000-000000000000" + -- hypatia: allow-next-line uuid/external -- RFC UUID namespace constant; preserve interoperability , "6ba7b810-9dad-11d1-80b4-00c04fd430c8" + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier , "6fa459ea-ee8a-3ca4-894e-db77e160355e" + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier , "886313e1-3b8a-5372-9b90-0c9aee199e5d" ] private @@ -124,18 +130,25 @@ runUUIDProperties = do check "prop_validUUIDv4Parses: version V4, variant RFC 4122" (map (\u => u.version == V4 && u.variant == RFC4122) (Proven.SafeUUID.parse v4Sample) == Just True) check "prop_uppercaseUUIDParses: uppercase hex accepted" + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier (isValid "550E8400-E29B-41D4-A716-446655440000") check "prop_nilUUIDParses: nil UUID accepted" + -- hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier (isValid "00000000-0000-0000-0000-000000000000") check "nil UUID string is recognised as nil; v4 sample is not" + -- hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier (map isNil (Proven.SafeUUID.parse "00000000-0000-0000-0000-000000000000") == Just True && map isNil (Proven.SafeUUID.parse v4Sample) == Just False && isNil nilUUID) check "prop_generatedUUIDValid: library-produced nilUUID formats to a valid UUID" + -- hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier (isValid (format nilUUID) && format nilUUID == "00000000-0000-0000-0000-000000000000") check "prop_versionExtractable: versions 1, 3, 4, 5 read from the version nibble" + -- hypatia: allow-next-line uuid/external -- RFC UUID namespace constant; preserve interoperability (versionOf "6ba7b810-9dad-11d1-80b4-00c04fd430c8" == Just V1 && + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier versionOf "6fa459ea-ee8a-3ca4-894e-db77e160355e" == Just V3 && versionOf v4Sample == Just V4 && + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier versionOf "886313e1-3b8a-5372-9b90-0c9aee199e5d" == Just V5) check "prop_formatConsistent: format/parse round-trip on samples" (all roundTrips samples) @@ -143,16 +156,22 @@ runUUIDProperties = do (map format (Proven.SafeUUID.parse "550e8400e29b41d4a716446655440000") == Just v4Sample) check "prop_uuidEqReflexive: == reflexive and case-insensitive on samples" (all (\s => map (\u => u == u) (Proven.SafeUUID.parse s) == Just True) samples && + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier Proven.SafeUUID.parse v4Sample == Proven.SafeUUID.parse "550E8400-E29B-41D4-A716-446655440000") check "prop_bytesRoundtrip: 16 bytes that re-encode to an equal UUID" (all bytesRoundTrip samples) check "rejects non-hex characters and wrong lengths" (not (isValid "550e8400-e29b-41d4-a716-44665544000g") && + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier not (isValid "550e8400-e29b-41d4-a716-4466554400000") && not (isValid "")) check "prop_versionExtractable: hex version nibble 'a' is version 10" + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier (versionOf "550e8400-e29b-a1d4-a716-446655440000" == Just (Unknown 10)) check "prop_versionExtractable: version nibble is case-insensitive hex ('F' and 'f' are 15)" + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier (versionOf "550e8400-e29b-F1d4-a716-446655440000" == Just (Unknown 15) && + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier versionOf "550e8400-e29b-f1d4-a716-446655440000" == Just (Unknown 15) && + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier versionOf "550e8400-e29b-91d4-a716-446655440000" == Just (Unknown 9)) putStrLn "" diff --git a/tests/unit/SafeRegexUnit.idr b/tests/unit/SafeRegexUnit.idr index faf46069..a263aca7 100644 --- a/tests/unit/SafeRegexUnit.idr +++ b/tests/unit/SafeRegexUnit.idr @@ -87,6 +87,7 @@ runRegexUnitTests = do Err _ => putStrLn " ✗ Failed to compile IPv4 regex" case uuidRegex of + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier Ok re => assertTrue "uuidRegex matches UUID" (test re "550e8400-e29b-41d4-a716-446655440000") Err _ => putStrLn " ✗ Failed to compile UUID regex" diff --git a/tests/unit/SafeUUIDUnit.idr b/tests/unit/SafeUUIDUnit.idr index ceae8cb1..d20b8dc2 100644 --- a/tests/unit/SafeUUIDUnit.idr +++ b/tests/unit/SafeUUIDUnit.idr @@ -33,8 +33,11 @@ runUUIDUnitTests = do -- Parse tests putStrLn "\n[Parsing]" + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier assertOk "parseUUID standard format" (parseUUID "550e8400-e29b-41d4-a716-446655440000") + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier assertOk "parseUUID uppercase" (parseUUID "550E8400-E29B-41D4-A716-446655440000") + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier assertOk "parseUUID lowercase" (parseUUID "550e8400-e29b-41d4-a716-446655440000") assertErr "parseUUID invalid length" (parseUUID "550e8400-e29b") assertErr "parseUUID invalid chars" (parseUUID "550e8400-e29b-41d4-a716-44665544000g") @@ -43,33 +46,42 @@ runUUIDUnitTests = do -- Nil UUID tests putStrLn "\n[Nil UUID]" + -- hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier assertOk "parseUUID nil UUID" (parseUUID "00000000-0000-0000-0000-000000000000") + -- hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier case parseUUID "00000000-0000-0000-0000-000000000000" of Ok uuid => assertTrue "isNil nil UUID" (isNil uuid) Err _ => putStrLn " ✗ Failed to parse nil UUID" -- Version detection tests putStrLn "\n[Version Detection]" + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier case parseUUID "550e8400-e29b-41d4-a716-446655440000" of Ok uuid => assertEq "getVersion v4 UUID" (Just 4) (getVersion uuid) Err _ => putStrLn " ✗ Failed to parse v4 UUID" + -- hypatia: allow-next-line uuid/external -- RFC UUID namespace constant; preserve interoperability case parseUUID "6ba7b810-9dad-11d1-80b4-00c04fd430c8" of Ok uuid => assertEq "getVersion v1 UUID" (Just 1) (getVersion uuid) Err _ => putStrLn " ✗ Failed to parse v1 UUID" -- Format tests putStrLn "\n[Formatting]" + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier case parseUUID "550E8400-E29B-41D4-A716-446655440000" of Ok uuid => do + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier assertEq "formatUUID lowercase" "550e8400-e29b-41d4-a716-446655440000" (formatUUID Lowercase uuid) + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier assertEq "formatUUID uppercase" "550E8400-E29B-41D4-A716-446655440000" (formatUUID Uppercase uuid) assertEq "formatUUID compact" "550e8400e29b41d4a716446655440000" (formatUUID Compact uuid) + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier assertEq "formatUUID URN" "urn:uuid:550e8400-e29b-41d4-a716-446655440000" (formatUUID URN uuid) Err _ => putStrLn " ✗ Failed to parse format test UUID" -- Validation tests putStrLn "\n[Validation]" + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier assertTrue "isValidUUID valid" (isValidUUID "550e8400-e29b-41d4-a716-446655440000") assertTrue "isValidUUID invalid" (not $ isValidUUID "not-a-uuid") assertTrue "isValidUUID empty" (not $ isValidUUID "") @@ -87,12 +99,14 @@ runUUIDUnitTests = do -- Comparison tests putStrLn "\n[Comparison]" + -- hypatia: allow-next-line uuid/external -- UUID nil/max or ordered-value test vector, not an estate identifier case (parseUUID "00000000-0000-0000-0000-000000000001", parseUUID "00000000-0000-0000-0000-000000000002") of (Ok u1, Ok u2) => do assertTrue "UUID comparison u1 < u2" (compareUUID u1 u2 == LT) assertTrue "UUID comparison u2 > u1" (compareUUID u2 u1 == GT) _ => putStrLn " ✗ Failed to parse comparison UUIDs" + -- hypatia: allow-next-line uuid/external -- UUID parser interoperability or rejection test vector, not an estate identifier case (parseUUID "550e8400-e29b-41d4-a716-446655440000", parseUUID "550e8400-e29b-41d4-a716-446655440000") of (Ok u1, Ok u2) => assertTrue "UUID equality" (compareUUID u1 u2 == EQ) _ => putStrLn " ✗ Failed to parse equality UUIDs" From 3cb1757462a1e1710c4c978ec3b9fffe30c20861 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 23:25:52 +0000 Subject: [PATCH 12/17] fix(ci): retain resolved Hypatia revision and test total union-find grouping --- .github/workflows/governance.yml | 2 ++ .github/workflows/hypatia-scan.yml | 1 + tests/totality/BoundaryRegression.idr | 4 ++++ verification/header/CI-PROFILE.adoc | 7 +++++++ 4 files changed, 14 insertions(+) diff --git a/.github/workflows/governance.yml b/.github/workflows/governance.yml index b73e69ef..fec439c8 100644 --- a/.github/workflows/governance.yml +++ b/.github/workflows/governance.yml @@ -15,3 +15,5 @@ permissions: jobs: governance: uses: metadatastician/standards/.github/workflows/governance-reusable.yml@84c2d1c1b040c9d7b8924532fa77e71e63d72c66 + with: + hypatia-ref: 09c305db10bfde1668c8d5f686677f3a20e84889 diff --git a/.github/workflows/hypatia-scan.yml b/.github/workflows/hypatia-scan.yml index f718533c..67c7c269 100644 --- a/.github/workflows/hypatia-scan.yml +++ b/.github/workflows/hypatia-scan.yml @@ -19,5 +19,6 @@ jobs: hypatia: 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: "" diff --git a/tests/totality/BoundaryRegression.idr b/tests/totality/BoundaryRegression.idr index 92d2c74c..d4e12730 100644 --- a/tests/totality/BoundaryRegression.idr +++ b/tests/totality/BoundaryRegression.idr @@ -4,6 +4,7 @@ module BoundaryRegression import Proven.Core import Proven.SafeTree +import Proven.SafeUnionFind import Proven.SafeArgs.Types import Proven.SafeArgs.Parser import Proven.SafeRegex.Types @@ -86,5 +87,8 @@ main = do (isErr (parseYAML "[true") && isErr (parseYAML "\"unclosed") && isErr (parseYAML "&a true")) check "YAML depth limit remains effective" (isErr (parseYAML (nestedYAML 55))) + check "union-find duplicate roots preserve first-occurrence set order" + (allSets (MkUF [Parent 1, Root 1, Parent 1, Root 0] 2) == [[0,1,2],[3]] && + allSets (Proven.SafeUnionFind.create 3) == [[0],[1],[2]]) runMathProperties putStrLn "Finite regression execution passed; parser completeness/equivalence is not claimed." diff --git a/verification/header/CI-PROFILE.adoc b/verification/header/CI-PROFILE.adoc index 5d03b9a0..d49c7e2b 100644 --- a/verification/header/CI-PROFILE.adoc +++ b/verification/header/CI-PROFILE.adoc @@ -28,6 +28,13 @@ DEED/K9 retain the canonical advisory default; existing gates are not disabled. Hypatia explicitly scans the whole tree, preserving the previous scope. Its validated baseline and threshold behavior remain the canonical defaults. +Both scanner consumers explicitly pin Hypatia +`09c305db10bfde1668c8d5f686677f3a20e84889`, the exact revision previously +resolved by the legacy caller on 24 November. This prevents the workflow +migration from reverting to its older default scanner. That revision records +retired A2ML layout as advisory pending kyX conversion, in line with the +current canon. No baseline entry, threshold or source exclusion is added. + The secret scanner declares no inherited secrets. Its caller forwards none and no longer requests pull-request write permission. This addresses SonarCloud rule `githubactions:S7635` without an exemption. From 49d63a3f9485d3900c8d4c0996452071a618ad8f Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 23:32:36 +0000 Subject: [PATCH 13/17] fix(ci): scope release credentials and enforce proof command failures --- .github/copilot/coding-agent.yml | 4 ++-- .github/workflows/echidna-verify.yml | 4 ++-- .github/workflows/instant-sync.yml | 5 +++++ .github/workflows/publish-crates.yml | 10 +++++++++- .github/workflows/publish-ghcr.yml | 6 ++---- .github/workflows/publish-npm.yml | 23 ++++++++++++++++++++--- .github/workflows/push-email-notify.yml | 5 +++++ .github/workflows/release.yml | 8 +++++--- .github/workflows/trustfile.yml | 2 -- bindings/malbolge/README.adoc | 2 +- bindings/seed7/README.adoc | 2 +- bindings/squirrel/README.adoc | 2 +- 12 files changed, 53 insertions(+), 20 deletions(-) diff --git a/.github/copilot/coding-agent.yml b/.github/copilot/coding-agent.yml index a719a773..5625c2ce 100644 --- a/.github/copilot/coding-agent.yml +++ b/.github/copilot/coding-agent.yml @@ -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 diff --git a/.github/workflows/echidna-verify.yml b/.github/workflows/echidna-verify.yml index 0ba5b1c0..f10738c3 100644 --- a/.github/workflows/echidna-verify.yml +++ b/.github/workflows/echidna-verify.yml @@ -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: | diff --git a/.github/workflows/instant-sync.yml b/.github/workflows/instant-sync.yml index 099d94d2..bdb0ea69 100644 --- a/.github/workflows/instant-sync.yml +++ b/.github/workflows/instant-sync.yml @@ -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 diff --git a/.github/workflows/publish-crates.yml b/.github/workflows/publish-crates.yml index c8b37aab..9ecd5b86 100644 --- a/.github/workflows/publish-crates.yml +++ b/.github/workflows/publish-crates.yml @@ -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: @@ -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 diff --git a/.github/workflows/publish-ghcr.yml b/.github/workflows/publish-ghcr.yml index 88989da0..28ef283c 100644 --- a/.github/workflows/publish-ghcr.yml +++ b/.github/workflows/publish-ghcr.yml @@ -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 diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 780297f3..caab1fbe 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -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: @@ -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 @@ -65,6 +73,11 @@ 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 @@ -72,10 +85,14 @@ jobs: 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 - name: Build TypeScript - run: npm run build + run: bun run build - name: Verify package run: npm pack --dry-run - name: Publish to npm diff --git a/.github/workflows/push-email-notify.yml b/.github/workflows/push-email-notify.yml index 0689291e..90205893 100644 --- a/.github/workflows/push-email-notify.yml +++ b/.github/workflows/push-email-notify.yml @@ -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: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14a7c460..fe40f4cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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] diff --git a/.github/workflows/trustfile.yml b/.github/workflows/trustfile.yml index a2b2e14c..17c20aa5 100644 --- a/.github/workflows/trustfile.yml +++ b/.github/workflows/trustfile.yml @@ -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)" diff --git a/bindings/malbolge/README.adoc b/bindings/malbolge/README.adoc index 66ecb64e..f6b22d0d 100644 --- a/bindings/malbolge/README.adoc +++ b/bindings/malbolge/README.adoc @@ -359,6 +359,6 @@ MPL-2.0 == See Also - link:https://lscheffer.com/malbolge_spec.html[Malbolge Specification] -- link:http://www.catb.org/jargon/html/story-of-mel.html[The Story of Mel] +- link:https://www.catb.org/jargon/html/story-of-mel.html[The Story of Mel] - link:https://github.com/hyperpolymath/proven[Proven Documentation] - Your therapist (after reading Malbolge code) diff --git a/bindings/seed7/README.adoc b/bindings/seed7/README.adoc index 6f110d5b..8ab4918c 100644 --- a/bindings/seed7/README.adoc +++ b/bindings/seed7/README.adoc @@ -17,7 +17,7 @@ external C interface. == Prerequisites -- link:http://seed7.sourceforge.net/[Seed7] compiler +- link:https://seed7.sourceforge.net/[Seed7] compiler - `libproven.so` (or `libproven.a`) built from the proven repository - The `proven.h` C header (for the Seed7 compiler's C backend) diff --git a/bindings/squirrel/README.adoc b/bindings/squirrel/README.adoc index 4a451cc4..5601629c 100644 --- a/bindings/squirrel/README.adoc +++ b/bindings/squirrel/README.adoc @@ -5,7 +5,7 @@ -FFI binding for the link:http://squirrel-lang.org/[Squirrel] scripting language, +FFI binding for the link:https://squirrel-lang.org/[Squirrel] scripting language, providing access to the formally verified *libproven* safety library. All computation is performed in the verified Idris 2 core via the Zig FFI layer. From f2e441a7fa503b4e86d78b85d781e5b0c9a6a980 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 23:35:16 +0000 Subject: [PATCH 14/17] fix(governance): document exact pattern false positives and retire stale pointers --- .claude/CLAUDE.md | 15 +++++++++------ 0-AI-MANIFEST.a2ml | 21 +++++++++++---------- CODE_OF_CONDUCT.adoc | 3 ++- bindings/bash/proven.sh | 1 + src/Proven/SafeOTP.idr | 2 ++ 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 906f9a2b..c4392aa1 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -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 @@ -153,8 +156,8 @@ If uncertain whether binding code should be written: ## 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/` diff --git a/0-AI-MANIFEST.a2ml b/0-AI-MANIFEST.a2ml index f62510d9..b1beab8f 100644 --- a/0-AI-MANIFEST.a2ml +++ b/0-AI-MANIFEST.a2ml @@ -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 @@ -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.") ;; =================================================================== @@ -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: @@ -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/")) @@ -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")) @@ -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") @@ -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"))) diff --git a/CODE_OF_CONDUCT.adoc b/CODE_OF_CONDUCT.adoc index 21fb60f9..71b06668 100644 --- a/CODE_OF_CONDUCT.adoc +++ b/CODE_OF_CONDUCT.adoc @@ -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? diff --git a/bindings/bash/proven.sh b/bindings/bash/proven.sh index 1defda0d..dcb2c208 100644 --- a/bindings/bash/proven.sh +++ b/bindings/bash/proven.sh @@ -417,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" } diff --git a/src/Proven/SafeOTP.idr b/src/Proven/SafeOTP.idr index 50b6ee14..6c9afba6 100644 --- a/src/Proven/SafeOTP.idr +++ b/src/Proven/SafeOTP.idr @@ -223,6 +223,7 @@ public export totpProvisioningUri : String -> String -> TOTPConfig -> String totpProvisioningUri issuer account config = "otpauth://totp/" ++ urlEncode issuer ++ ":" ++ urlEncode account ++ + -- hypatia: allow security_errors/secret_detected -- Non-secret output placeholder; Base32 provisioning is not implemented here. "?secret=" ++ "{BASE32_SECRET}" ++ -- placeholder: real base32 needs FFI "&issuer=" ++ urlEncode issuer ++ "&algorithm=" ++ show config.algorithm ++ @@ -250,6 +251,7 @@ public export hotpProvisioningUri : String -> String -> HOTPConfig -> Nat -> String hotpProvisioningUri issuer account config counter = "otpauth://hotp/" ++ issuer ++ ":" ++ account ++ + -- hypatia: allow security_errors/secret_detected -- Non-secret output placeholder; Base32 provisioning is not implemented here. "?secret=" ++ "{BASE32_SECRET}" ++ "&issuer=" ++ issuer ++ "&algorithm=" ++ show config.algorithm ++ From 9312c73f24b8e29115f7001122a0b984cd90412d Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 23:36:59 +0000 Subject: [PATCH 15/17] fix(ci): pass only declared forge credentials to canonical mirror --- .github/workflows/mirror.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 7095b7c7..26cb5399 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -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 }} From de71c94913c0492409901889ee406a0a6f096405 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 23:40:09 +0000 Subject: [PATCH 16/17] ci: prepare reviewed Bun lock using a remote dry-run artifact --- .github/workflows/publish-npm.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index caab1fbe..06d13f1c 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -26,6 +26,11 @@ on: - all - javascript - typescript + refresh_lock: + description: 'Generate the dependency lock for review during a dry run' + required: false + default: false + type: boolean permissions: actions: read contents: read @@ -89,8 +94,18 @@ jobs: uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version: '1.3.0' + - name: Generate lock for review (temporary bootstrap) + if: github.event_name == 'workflow_dispatch' && inputs.dry_run && inputs.refresh_lock + run: bun install --lockfile-only --ignore-scripts + - name: Preserve generated lock + if: github.event_name == 'workflow_dispatch' && inputs.dry_run && inputs.refresh_lock + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 + with: + name: typescript-bun-lock + path: bindings/typescript/bun.lock + if-no-files-found: error - name: Install dependencies - run: bun install + run: bun install --frozen-lockfile --ignore-scripts - name: Build TypeScript run: bun run build - name: Verify package From 052c39e31df968ee8864a4b85fa897fff55b18e4 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 24 Nov 2026 23:45:41 +0000 Subject: [PATCH 17/17] Pin TypeScript dependency resolution with the remotely generated lock --- .github/workflows/publish-npm.yml | 15 --------------- bindings/typescript/bun.lock | 14 ++++++++++++++ verification/header/CI-PROFILE.adoc | 9 +++++++++ 3 files changed, 23 insertions(+), 15 deletions(-) create mode 100644 bindings/typescript/bun.lock diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 06d13f1c..66e918e1 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -26,11 +26,6 @@ on: - all - javascript - typescript - refresh_lock: - description: 'Generate the dependency lock for review during a dry run' - required: false - default: false - type: boolean permissions: actions: read contents: read @@ -94,16 +89,6 @@ jobs: uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version: '1.3.0' - - name: Generate lock for review (temporary bootstrap) - if: github.event_name == 'workflow_dispatch' && inputs.dry_run && inputs.refresh_lock - run: bun install --lockfile-only --ignore-scripts - - name: Preserve generated lock - if: github.event_name == 'workflow_dispatch' && inputs.dry_run && inputs.refresh_lock - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 - with: - name: typescript-bun-lock - path: bindings/typescript/bun.lock - if-no-files-found: error - name: Install dependencies run: bun install --frozen-lockfile --ignore-scripts - name: Build TypeScript diff --git a/bindings/typescript/bun.lock b/bindings/typescript/bun.lock new file mode 100644 index 00000000..291e4d75 --- /dev/null +++ b/bindings/typescript/bun.lock @@ -0,0 +1,14 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "@proven/typescript", + "devDependencies": { + "typescript": "^5.3.0", + }, + }, + }, + "packages": { + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + } +} diff --git a/verification/header/CI-PROFILE.adoc b/verification/header/CI-PROFILE.adoc index d49c7e2b..1629e053 100644 --- a/verification/header/CI-PROFILE.adoc +++ b/verification/header/CI-PROFILE.adoc @@ -45,3 +45,12 @@ Header RefC soundness, header theory replay and Atoma scalar replay are separate from generic governance checks. Passing one is not evidence that the others passed. The final PR head must pass hosted CI and review before merge; the migration's hosted result is pending when this document is introduced. + +The TypeScript dependency lock was generated remotely with pinned Bun 1.3.0 +and installed with `--frozen-lockfile --ignore-scripts` in dry-run +https://github.com/hyperpolymath/proven/actions/runs/45511904922[45511904922]. +No package was published. Its subsequent TypeScript build failed on existing +nonexistent exports and absent declarations for the JavaScript wrappers. +The lock-generation bootstrap was removed after retaining the generated lock; +normal publishing still requires a successful build. This is an outstanding +package-readiness defect, not evidence against or for the native header proofs.