diff --git a/.githooks/validate-a2ml.sh b/.github/hooks/validate-a2ml.sh similarity index 100% rename from .githooks/validate-a2ml.sh rename to .github/hooks/validate-a2ml.sh diff --git a/.githooks/validate-k9.sh b/.github/hooks/validate-k9.sh similarity index 100% rename from .githooks/validate-k9.sh rename to .github/hooks/validate-k9.sh diff --git a/.github/workflows/dogfood-gate.yml b/.github/workflows/dogfood-gate.yml index 771367c..1ea8dbc 100644 --- a/.github/workflows/dogfood-gate.yml +++ b/.github/workflows/dogfood-gate.yml @@ -42,7 +42,7 @@ jobs: - name: Validate A2ML manifests if: steps.detect.outputs.count > 0 - run: bash .githooks/validate-a2ml.sh + run: bash .github/hooks/validate-a2ml.sh - name: Write summary run: | A2ML_COUNT="${{ steps.detect.outputs.count }}" @@ -87,7 +87,7 @@ jobs: - name: Validate K9 contracts if: steps.detect.outputs.k9_count > 0 - run: bash .githooks/validate-k9.sh + run: bash .github/hooks/validate-k9.sh - name: Write summary run: | K9_COUNT="${{ steps.detect.outputs.k9_count }}" diff --git a/.gitignore b/.gitignore index cb3cb35..87e91e8 100644 --- a/.gitignore +++ b/.gitignore @@ -120,6 +120,6 @@ dist/ !/build/ !/build/** -# ...but never track Idris2 typecheck output. `idris2 --typecheck abi.ipkg` +# ...but never track Idris2 typecheck output. `idris2 --typecheck src/interface/abi.ipkg` # writes compiled .ttc/.ttm under build/ttc/; these are generated artifacts. /build/ttc/ diff --git a/.machine_readable/root-allow.txt b/.machine_readable/root-allow.txt index a241ab1..394e024 100644 --- a/.machine_readable/root-allow.txt +++ b/.machine_readable/root-allow.txt @@ -31,7 +31,6 @@ CHANGELOG.adoc # Current changelog after the AsciiDoc migration. # ─── Build entry points (must live at root for their tooling) ──────────────── Justfile # delegates phases to build/just/*.just coordination.k9 # repo-local session binding (template-mandated) -abi.ipkg # Idris2 package for the ABI seam; sourcedir=src/interface (estate canon: root-level *-abi.ipkg). Single case-consistent src/interface/Abi/ dir. Typecheck: `idris2 --typecheck abi.ipkg`. # ─── Conventional dotfiles (tool-required at root) ─────────────────────────── .editorconfig @@ -99,5 +98,5 @@ mise.toml # toolchain pin read by mise. Estate canon is .tool-v # these are this project's real top-level shape. Moving them would # break every path that references them, to satisfy a map that was # never written for it. Read from the estate-rules gate's own output. -.githooks/ # Top-level component directory of this project. +.github/hooks/ # Top-level component directory of this project. REQUIRES_INITIALISATION.md # Project documentation. diff --git a/Containerfile b/Containerfile index 9755728..6121cd5 100644 --- a/Containerfile +++ b/Containerfile @@ -27,7 +27,7 @@ # ABI proofs should install Idris2 via upstream pack # (https://github.com/stefan-hoeck/idris2-pack) or the Idris2 project's own # instructions on a host with a Scheme implementation already available, -# then typecheck with `idris2 --typecheck abi.ipkg` / `pack typecheck +# then typecheck with `idris2 --typecheck src/interface/abi.ipkg` / `pack typecheck # abi.ipkg`. # # The Zig FFI side (src/interface/ffi/) is likewise out of scope here: it diff --git a/Justfile b/Justfile index a117755..0b40817 100644 --- a/Justfile +++ b/Justfile @@ -109,7 +109,7 @@ clean-all: clean # Run all tests: Idris2 ABI typecheck + Zig unit/integration tests test *args: - idris2 --typecheck abi.ipkg + idris2 --typecheck src/interface/abi.ipkg cd src/interface/ffi && zig build test {{args}} # Run tests with verbose output @@ -186,7 +186,7 @@ fmt-check: # Lint: there is no separate Idris2/Zig linter, so this re-runs the # compilers in check-only mode, which is where both surface real warnings. lint: - idris2 --typecheck abi.ipkg + idris2 --typecheck src/interface/abi.ipkg cd src/interface/ffi && zig build # ═══════════════════════════════════════════════════════════════════════════════ diff --git a/scripts/validate-template.sh b/scripts/validate-template.sh index f54b899..e3e8d10 100755 --- a/scripts/validate-template.sh +++ b/scripts/validate-template.sh @@ -307,8 +307,8 @@ fi # path / import breakage that a bare per-file `idris2 --check` masks as a # tolerated "module name does not match file name" warning. if command -v idris2 &> /dev/null; then - if [ -f "$REPO_ROOT/abi.ipkg" ]; then - if (cd "$REPO_ROOT" && idris2 --typecheck abi.ipkg) > /dev/null 2>&1; then + if [ -f "$REPO_ROOT/src/interface/abi.ipkg" ]; then + if (cd "$REPO_ROOT" && idris2 --typecheck src/interface/abi.ipkg) > /dev/null 2>&1; then log_pass "Idris2 ABI typechecks (abi.ipkg)" else log_error "Idris2 ABI does NOT typecheck (abi.ipkg)" diff --git a/abi.ipkg b/src/interface/abi.ipkg similarity index 94% rename from abi.ipkg rename to src/interface/abi.ipkg index 4b62c0b..14ec249 100644 --- a/abi.ipkg +++ b/src/interface/abi.ipkg @@ -14,7 +14,7 @@ -- A bare `idris2 --check src/interface/Abi/Foo.idr` still warns ("module name -- does not match file name") because Idris derives the expected module from the -- full path; that is expected. Use the package for a real typecheck: --- idris2 --typecheck abi.ipkg (or --build) +-- idris2 --typecheck src/interface/abi.ipkg (or --build) -- -- The RSR validators accept either Abi/ (canonical, case-consistent) or a -- lowercase abi/ for downstream repos that ship lowercase — but never both. @@ -27,7 +27,7 @@ authors = "Jonathan D.A. Jewell" brief = "Formally-typed ABI/FFI seam (Idris2 type + layout proofs) for an RSR-templated repository" -sourcedir = "src/interface" +sourcedir = "." depends = base