-
-
Notifications
You must be signed in to change notification settings - Fork 0
Land sweeps + first honest CI: compiler builds, proofs check, fail-closed gates #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
eea0035
sweep2: add config files (mise.toml)
hyperpolymath 458964a
sweep3: add license files and SPDX identifiers
hyperpolymath fa680a6
sweep4: add C-A-G-M files
hyperpolymath f46ec5e
fix: update CodeQL actions to SHA-pinned v3 (29b1f65c)
hyperpolymath 8f8e05e
fix(proofs): make the Agda lib parseable and the Idris2 ABI suite typ…
hyperpolymath 7de9fe7
chore(compliance): fill template placeholders; allowlist sanctioned r…
hyperpolymath 1e42ddd
ci: add fail-closed Proof Gates (OCaml build, example matrix, Agda + …
hyperpolymath 351e966
Merge branch 'main' into ci/v2-truth-gates
hyperpolymath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Funding Configuration | ||
| # See: https://docs.github.com/en/repositories/managing-your-repositorys-custom-fields/displaying-a-sponsor-button-in-your-repository | ||
|
|
||
| github: metadatastician |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| # | ||
| # Proof Gates — builds the real compiler and checks the real proofs. | ||
| # | ||
| # FAIL-CLOSED by design: a missing prover fails the job. This replaces | ||
| # reliance on Rust CI (which "passes" by detecting no Cargo.toml and | ||
| # skipping every job) and on `just proof-check-*` (which exits 0 when a | ||
| # prover is absent). Nothing in this file is allowed to skip. | ||
| # | ||
| # Toolchain provenance: | ||
| # - compiler + agda jobs run in debian:trixie, the same distribution | ||
| # (and identical ocaml/dune/agda/agda-stdlib versions) the suite was | ||
| # verified against locally on 2026-08-03. | ||
| # - the idris2 job runs in a digest-pinned pack image; the suite was | ||
| # verified against BOTH idris2 0.7.0 (local) and 0.8.0 (this image). | ||
| name: Proof Gates | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read | ||
| concurrency: | ||
| group: proof-gates-${{ github.ref }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| compiler: | ||
| name: OCaml compiler + example matrix | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| container: | ||
| image: debian:trixie | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| - name: Install toolchain (fail-closed) | ||
| run: | | ||
| apt-get update | ||
| apt-get install -y --no-install-recommends ocaml ocaml-dune | ||
| ocaml -version | ||
| dune --version | ||
| - name: Build compiler | ||
| working-directory: src/compiler | ||
| run: dune build | ||
| - name: Positive examples must type-check | ||
| run: | | ||
| KSC=src/compiler/_build/default/main.exe | ||
| fail=0 | ||
| for f in examples/v2/*.ks; do | ||
| if ! "$KSC" check "$f"; then | ||
| echo "::error file=$f::positive example failed to type-check" | ||
| fail=1 | ||
| fi | ||
| done | ||
| exit "$fail" | ||
| - name: Negative examples must be rejected | ||
| run: | | ||
| KSC=src/compiler/_build/default/main.exe | ||
| fail=0 | ||
| for f in examples/v2/negative/*.ks; do | ||
| if "$KSC" check "$f" > /dev/null 2>&1; then | ||
| echo "::error file=$f::negative example was accepted (must be rejected)" | ||
| fail=1 | ||
| fi | ||
| done | ||
| exit "$fail" | ||
|
|
||
| agda-proofs: | ||
| name: Agda proofs + trusted-base budget | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| container: | ||
| image: debian:trixie | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| - name: Checkout echo-types (pinned) | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| repository: hyperpolymath/echo-types | ||
| ref: 900546a832ddfefb4fa48881cdebdc9b1260d1f9 | ||
| path: .deps/echo-types | ||
| - name: Checkout absolute-zero (pinned) | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| repository: hyperpolymath/absolute-zero | ||
| ref: cef394b617869e1fa0d10f8fd9bdbba8db8d8738 | ||
| path: .deps/absolute-zero | ||
| - name: Install Agda (fail-closed) | ||
| run: | | ||
| apt-get update | ||
| apt-get install -y --no-install-recommends agda agda-bin agda-stdlib | ||
| agda --version | ||
| - name: Check proofs | ||
| run: | | ||
| LIB="$PWD/.agda-libraries" | ||
| printf '%s\n' \ | ||
| /usr/share/agda-stdlib/standard-library.agda-lib \ | ||
| "$PWD/.deps/echo-types/echo-types.agda-lib" \ | ||
| "$PWD/.deps/absolute-zero/absolute-zero.agda-lib" > "$LIB" | ||
| cd proofs/agda | ||
| # EchoBridge is postulate-free and must stay --safe. | ||
| agda --safe --library-file="$LIB" EchoBridge.agda | ||
| # The recipe proofs carry audited physical-world postulates | ||
| # (see TRUSTED-BASE.txt), so they check without --safe; the | ||
| # budget step below stops that trusted base growing silently. | ||
| for f in Dough.agda NoCurdle.agda PoachedEgg.agda; do | ||
| agda --library-file="$LIB" "$f" | ||
| done | ||
| - name: Trusted-base budget (no new postulates) | ||
| run: sh scripts/check-agda-trusted-base.sh | ||
|
|
||
| abi-proofs: | ||
| name: Idris2 ABI proof suite | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| container: | ||
| image: ghcr.io/stefan-hoeck/idris2-pack@sha256:f0dece3334c6a1d21d65334416e02d0e7b59da480644006b52c8b78c8cfc49f5 | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| - name: Typecheck ABI proof suite (fail-closed) | ||
| working-directory: verification/proofs/idris2 | ||
| run: | | ||
| idris2 --version | ||
| idris2 --typecheck kitchenspeak-abi-proofs.ipkg | ||
| - name: No dangerous escape hatches | ||
| run: | | ||
| # Matches code lines only; the file headers legitimately SAY | ||
| # "no believe_me, no assert_total" in comments, so lines whose | ||
| # content starts with the Idris comment marker are excluded. | ||
| hits=$(grep -rnE "believe_me|assert_total" verification/proofs/idris2 --include="*.idr" | grep -vE ":[[:space:]]*--" || true) | ||
| if [ -n "$hits" ]; then | ||
| echo "$hits" | ||
| echo "::error::dangerous escape hatch found in proof code" | ||
| exit 1 | ||
| fi | ||
| echo "OK: no believe_me / assert_total in proof code." | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Architecture | ||
|
|
||
| ## Overview | ||
|
|
||
| This repository follows a modular, maintainable architecture designed for clarity, scalability, and long-term sustainability. | ||
|
|
||
| ## Directory Structure | ||
|
|
||
| ``` | ||
| . | ||
| ├── src/ # Source code | ||
| ├── tests/ # Test suites | ||
| ├── docs/ # Documentation | ||
| ├── scripts/ # Utility scripts | ||
| ├── config/ # Configuration files | ||
| ├── LICENSE # License file | ||
| ├── LICENSES/ # Full license texts | ||
| └── README.adoc # Project documentation | ||
| ``` | ||
|
|
||
| ## Design Principles | ||
|
|
||
| - **Separation of Concerns**: Each module has a single responsibility | ||
| - **Testability**: Code is written to be easily testable | ||
| - **Documentation**: All public APIs are documented | ||
| - **Configuration**: Environment-specific settings are externalized | ||
|
|
||
| ## Dependencies | ||
|
|
||
| - External dependencies are minimized and clearly declared | ||
| - Version pinning is used for reproducibility | ||
|
|
||
| ## Security Considerations | ||
|
|
||
| - Sensitive data is never committed to the repository | ||
| - Secrets are managed through environment variables or secure vaults | ||
| - Regular dependency audits are performed | ||
|
|
||
| ## Maintainability | ||
|
|
||
| - Code follows consistent style guidelines | ||
| - Pull requests require review and CI checks | ||
| - Issues and discussions are tracked transparently | ||
|
|
||
| --- | ||
|
|
||
| *Last updated: 2026-07-18* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # Governance | ||
|
|
||
| ## Overview | ||
|
|
||
| This project is governed by the following principles and structures to ensure transparent, inclusive, and effective decision-making. | ||
|
|
||
| ## Roles and Responsibilities | ||
|
|
||
| ### Maintainers | ||
|
|
||
| Maintainers are responsible for: | ||
| - Reviewing and merging pull requests | ||
| - Managing releases and versioning | ||
| - Ensuring code quality and standards | ||
| - Triaging issues and bug reports | ||
| - Community engagement and support | ||
|
|
||
| ### Contributors | ||
|
|
||
| Contributors are expected to: | ||
| - Follow the code of conduct | ||
| - Submit well-documented pull requests | ||
| - Write tests for new functionality | ||
| - Maintain existing tests | ||
| - Update documentation as needed | ||
|
|
||
| ## Decision Making | ||
|
|
||
| ### Minor Changes | ||
| - Can be made by any maintainer | ||
| - Include bug fixes, documentation updates, dependency updates | ||
|
|
||
| ### Major Changes | ||
| - Require discussion in issues or pull requests | ||
| - Include new features, architectural changes, API changes | ||
| - Need approval from at least 2 maintainers | ||
|
|
||
| ### Breaking Changes | ||
| - Require RFC (Request for Comments) process | ||
| - Need approval from majority of maintainers | ||
| - Must include migration guide | ||
|
|
||
| ## Code of Conduct | ||
|
|
||
| All participants are expected to follow our Code of Conduct. Violations can be reported to the maintainers. | ||
|
|
||
| ## Communication | ||
|
|
||
| - **Issues**: For bug reports and feature requests | ||
| - **Discussions**: For questions and general discussion | ||
| - **Pull Requests**: For code contributions | ||
|
|
||
| ## Licensing | ||
|
|
||
| All contributions are made under the terms of the repository's LICENSE file. | ||
| By submitting a pull request, you agree to license your contributions accordingly. | ||
|
|
||
| --- | ||
|
|
||
| *Last updated: 2026-07-18* |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.