From 2d52cb5d29da1e6b09a34fe88a174e9cbd880a8a Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 00:45:38 +0000 Subject: [PATCH] fix(ci): repair Stapeln TOML and clean up repository lint failures --- .devcontainer/devcontainer.json | 6 --- .devcontainer/devcontainer.json.license | 2 + .editorconfig | 22 +++++++++++ .envrc | 1 + .githooks/validate-stapeln-manifest.py | 15 ++++++++ .github/CODE_OF_CONDUCT.md | 2 +- .../descriptiles/0-AI-MANIFEST.a2ml | 1 - .machine_readable/descriptiles/README.adoc | 1 - .../descriptiles/anchors/0-AI-MANIFEST.a2ml | 1 - .../descriptiles/anchors/README.adoc | 1 - .../scripts/maintenance/maint-assault.sh | 8 ++-- .pre-commit-config.yaml | 10 +++++ CLAUDE.md | 4 +- LICENSE | 2 +- LICENSES/CC-BY-SA-4.0.txt | 1 - benches/template_bench.sh | 9 ----- container/stapeln/compose.example.toml | 38 ++++++++----------- container/stapeln/compose.toml | 34 +++++++---------- scripts/check-proofs.sh | 4 +- tests/e2e.sh | 4 ++ tests/e2e/template_instantiation_test.sh | 5 +-- tests/validate-k9.sh | 2 +- verification/coverage/0.2-AI-MANIFEST.a2ml | 2 +- .../proofs/agda/Wager/L2/UsageLaws.agda | 1 - verification/safety_case/0.2-AI-MANIFEST.a2ml | 2 +- .../traceability/0.2-AI-MANIFEST.a2ml | 2 +- 26 files changed, 100 insertions(+), 80 deletions(-) create mode 100644 .devcontainer/devcontainer.json.license create mode 100644 .githooks/validate-stapeln-manifest.py diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5268c1c..bba51df 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,9 +1,3 @@ -// SPDX-License-Identifier: MPL-2.0 -// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) -// -// Dev Container configuration for systemet -// Works with: VS Code Dev Containers, GitHub Codespaces, Gitpod -// Container runtime: Podman (recommended) or any OCI-compliant runtime { "name": "systemet", diff --git a/.devcontainer/devcontainer.json.license b/.devcontainer/devcontainer.json.license new file mode 100644 index 0000000..296665a --- /dev/null +++ b/.devcontainer/devcontainer.json.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) +SPDX-License-Identifier: MPL-2.0 diff --git a/.editorconfig b/.editorconfig index a466807..ff8de6c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -69,3 +69,25 @@ indent_size = 2 indent_style = space indent_size = 4 +# Prose, legal text and proofs use alignment within paragraphs and expressions. +[*.{md,adoc,agda,lean}] +indent_size = unset + +[LICENSES/CC-BY-SA-4.0.txt] +indent_size = unset + +[docs/legal/EXHIBIT-{A-ETHICAL-USE,B-QUANTUM-SAFE}.txt] +indent_size = unset + +# Embedded shell/JQ and aligned template data use a different indent width. +[{Justfile,.machine_readable/contractiles/Justfile,.github/scripts/classify-issue.jq}] +indent_size = unset + +[.github/workflows/{label-triage,labels,openssf-compliance,secret-scanner}.yml] +indent_size = unset + +[{scripts/scan-dangerous.sh,scripts/validate-template.sh,tests/e2e/template_instantiation_test.sh}] +indent_size = unset + +[{.machine_readable/contractiles/trust/Trustfile.a2ml,machine-readable-design/canonical-directory-structure/Trustfile.a2ml,.machine_readable/contractiles/intend/intend.k9.ncl,systemet_chora.deed,verification/proofs/lean4/lake-manifest.json}] +indent_size = unset diff --git a/.envrc b/.envrc index aef1a86..72c9bb4 100644 --- a/.envrc +++ b/.envrc @@ -1,4 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 +# shellcheck shell=bash # Activate development environment # Install direnv: https://direnv.net/ diff --git a/.githooks/validate-stapeln-manifest.py b/.githooks/validate-stapeln-manifest.py new file mode 100644 index 0000000..fbab4b7 --- /dev/null +++ b/.githooks/validate-stapeln-manifest.py @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: MPL-2.0 +"""Validate the Cerro Torre manifest using a sample numeric template port.""" + +import sys +import tomllib +from pathlib import Path + +path = Path(sys.argv[1]) +try: + manifest = tomllib.loads(path.read_text(encoding="utf-8").replace("{{PORT}}", "8080")) + ports = manifest["security"]["network"]["listen_tcp"] + if not isinstance(ports, list) or any(type(port) is not int for port in ports): + raise ValueError("security.network.listen_tcp must be an array of integers") +except (OSError, KeyError, ValueError) as exc: + sys.exit(f"{path}: {exc}") diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 83a1028..832dd2d 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -4,7 +4,7 @@ Copyright (c) Jonathan D.A. Jewell --> # Code of Conduct - - + # You are in the hyperpolymath estate — orient before acting @@ -67,4 +67,4 @@ Deny: **Nix, TypeScript, Python, Go, AGPL**. JS runtimes in preference order **B - **Golden path** (ANCHOR) — `just test && just quality` → Core tests pass; Quality gates pass; No unresolved critical security findings. - **State** — lifecycle active; maturity experimental. Phase, blockers and next action: `docs/status/JOURNAL.adoc`. - + diff --git a/LICENSE b/LICENSE index 14e2f77..a612ad9 100644 --- a/LICENSE +++ b/LICENSE @@ -35,7 +35,7 @@ Mozilla Public License Version 2.0 means any form of the work other than Source Code Form. 1.7. "Larger Work" - means a work that combines Covered Software with other material, in + means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. 1.8. "License" diff --git a/LICENSES/CC-BY-SA-4.0.txt b/LICENSES/CC-BY-SA-4.0.txt index 2d58298..7d4f96c 100644 --- a/LICENSES/CC-BY-SA-4.0.txt +++ b/LICENSES/CC-BY-SA-4.0.txt @@ -425,4 +425,3 @@ the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. - diff --git a/benches/template_bench.sh b/benches/template_bench.sh index 5fb58a8..35f5693 100755 --- a/benches/template_bench.sh +++ b/benches/template_bench.sh @@ -13,7 +13,6 @@ OUTPUT_FORMAT="${2:-human}" # human | json | csv # ANSI colors BLUE='\033[0;34m' GREEN='\033[0;32m' -YELLOW='\033[1;33m' NC='\033[0m' # No Color log_info() { @@ -24,14 +23,6 @@ log_pass() { echo -e "${GREEN}✓${NC} $*" } -# Ensure we have required commands -command -v /usr/bin/time >/dev/null 2>&1 || { - echo "Warning: /usr/bin/time not available, using built-in time" - TIME_CMD="time" -} - -TIME_CMD="/usr/bin/time -f %e" 2>/dev/null || TIME_CMD="time" - echo "" echo "═══════════════════════════════════════════════════════════════════════════════" echo "Template Benchmarks" diff --git a/container/stapeln/compose.example.toml b/container/stapeln/compose.example.toml index d8d717c..81ad7ea 100644 --- a/container/stapeln/compose.example.toml +++ b/container/stapeln/compose.example.toml @@ -28,13 +28,11 @@ ports = ["8080:8080"] # Environment variables passed into the container at startup. # These override defaults in the Containerfile ENV directives. -environment = { - RUST_LOG = "info", # Rust log level (trace, debug, info, warn, error) - APP_HOST = "[::]", # Listen on all interfaces (IPv4 + IPv6) - APP_PORT = "8080", # Internal container port - APP_LOG_FORMAT = "json", # Structured logging for selur/vordr - APP_DATA_DIR = "/data", # Persistent data directory (matches VOLUME) -} +environment.RUST_LOG = "info" # Rust log level (trace, debug, info, warn, error) +environment.APP_HOST = "[::]" # Listen on all interfaces (IPv4 + IPv6) +environment.APP_PORT = "8080" # Internal container port +environment.APP_LOG_FORMAT = "json" # Structured logging for selur/vordr +environment.APP_DATA_DIR = "/data" # Persistent data directory (matches VOLUME) # Bind-mount a named volume for persistent data. # Format: "volume-name:/container/path" @@ -60,12 +58,10 @@ ports = ["4000:4000"] # The worker connects to the Rust API over the internal selur network. # Service names resolve as hostnames within the compose network. -environment = { - API_URL = "http://rust-api:8080/api/v1", # Internal service discovery - MIX_ENV = "prod", # Elixir release mode - APP_LOG_FORMAT = "json", # Match structured logging format - POOL_SIZE = "10", # DB connection pool size -} +environment.API_URL = "http://rust-api:8080/api/v1" # Internal service discovery +environment.MIX_ENV = "prod" # Elixir release mode +environment.APP_LOG_FORMAT = "json" # Match structured logging format +environment.POOL_SIZE = "10" # DB connection pool size # depends_on ensures the Rust API starts before the worker. # Note: This only waits for the container to start, not for the health check. @@ -90,17 +86,15 @@ image = "ghcr.io/hyperpolymath/svalinn:latest.ctp" # External-facing ports: HTTPS (443) and HTTP->HTTPS redirect (80). ports = ["443:443", "80:80"] -environment = { - # Backend routing: svalinn proxies to internal services. - SVALINN_BACKEND = "http://rust-api:8080", - SVALINN_WORKER_BACKEND = "http://elixir-worker:4000", +# Backend routing: svalinn proxies to internal services. +environment.SVALINN_BACKEND = "http://rust-api:8080" +environment.SVALINN_WORKER_BACKEND = "http://elixir-worker:4000" - # Policy file: mounted from the svalinn-config volume. - SVALINN_POLICY_FILE = "/etc/svalinn/gatekeeper.yaml", +# Policy file: mounted from the svalinn-config volume. +environment.SVALINN_POLICY_FILE = "/etc/svalinn/gatekeeper.yaml" - # Auto-provision TLS certificates (Let's Encrypt). - SVALINN_TLS_AUTO = "true", -} +# Auto-provision TLS certificates (Let's Encrypt). +environment.SVALINN_TLS_AUTO = "true" # Mount .gatekeeper.yaml as read-only policy configuration. volumes = ["svalinn-config:/etc/svalinn:ro"] diff --git a/container/stapeln/compose.toml b/container/stapeln/compose.toml index 6c33ce4..bd5e97a 100644 --- a/container/stapeln/compose.toml +++ b/container/stapeln/compose.toml @@ -25,15 +25,13 @@ version = "1.0" # ============================================================================ # Primary application service -[services.{{SERVICE_NAME}}] +[services."{{SERVICE_NAME}}"] image = "{{REGISTRY}}/{{SERVICE_NAME}}:latest.ctp" ports = ["{{PORT}}:{{PORT}}"] -environment = { - APP_HOST = "[::]", - APP_PORT = "{{PORT}}", - APP_LOG_FORMAT = "json", - APP_DATA_DIR = "/data", -} +environment.APP_HOST = "[::]" +environment.APP_PORT = "{{PORT}}" +environment.APP_LOG_FORMAT = "json" +environment.APP_DATA_DIR = "/data" volumes = ["{{SERVICE_NAME}}-data:/data"] restart = "always" healthcheck = { test = "curl -sf http://localhost:{{PORT}}/health", interval = "30s", timeout = "5s", retries = 3 } @@ -44,13 +42,11 @@ healthcheck = { test = "curl -sf http://localhost:{{PORT}}/health", interval = " [services.rokur] image = "ghcr.io/hyperpolymath/rokur:latest.ctp" ports = ["8081:8081"] -environment = { - ROKUR_BACKEND = "http://{{SERVICE_NAME}}:{{PORT}}", - ROKUR_LISTEN = "[::]:8081", - ROKUR_REQUIRED_SECRETS = "", - ROKUR_AUDIT_LOG = "/var/log/rokur/audit.jsonl", - ROKUR_LOG_FORMAT = "json", -} +environment.ROKUR_BACKEND = "http://{{SERVICE_NAME}}:{{PORT}}" +environment.ROKUR_LISTEN = "[::]:8081" +environment.ROKUR_REQUIRED_SECRETS = "" +environment.ROKUR_AUDIT_LOG = "/var/log/rokur/audit.jsonl" +environment.ROKUR_LOG_FORMAT = "json" volumes = ["rokur-audit:/var/log/rokur"] depends_on = ["{{SERVICE_NAME}}"] restart = "always" @@ -61,11 +57,9 @@ healthcheck = { test = "curl -sf http://localhost:8081/health", interval = "30s" [services.svalinn] image = "ghcr.io/hyperpolymath/svalinn:latest.ctp" ports = ["443:443", "80:80"] -environment = { - SVALINN_BACKEND = "http://rokur:8081", - SVALINN_POLICY_FILE = "/etc/svalinn/gatekeeper.yaml", - SVALINN_TLS_AUTO = "true", -} +environment.SVALINN_BACKEND = "http://rokur:8081" +environment.SVALINN_POLICY_FILE = "/etc/svalinn/gatekeeper.yaml" +environment.SVALINN_TLS_AUTO = "true" volumes = ["svalinn-config:/etc/svalinn:ro"] depends_on = ["rokur"] restart = "always" @@ -75,7 +69,7 @@ healthcheck = { test = "curl -sf http://localhost:80/health", interval = "30s", # Volumes # ============================================================================ -[volumes.{{SERVICE_NAME}}-data] +[volumes."{{SERVICE_NAME}}-data"] driver = "local" [volumes.rokur-audit] diff --git a/scripts/check-proofs.sh b/scripts/check-proofs.sh index 31a8539..a70b050 100755 --- a/scripts/check-proofs.sh +++ b/scripts/check-proofs.sh @@ -173,13 +173,13 @@ missing="$(comm -23 <(printf '%s\n' "$listed") <(printf '%s\n' "$found") || true if [ -n "${unlisted//[[:space:]]/}" ]; then echo "FAIL: .$EXT proofs on disk but absent from $MANIFEST_FILE:" - printf ' %s\n' $unlisted + printf ' %s\n' "${unlisted//$'\n'/$'\n '}" echo " List each as 'gated' or 'quarantine'; new proofs are gated by default." fails=$((fails + 1)) fi if [ -n "${missing//[[:space:]]/}" ]; then echo "FAIL: MANIFEST lists modules that do not exist (stale entries):" - printf ' %s\n' $missing + printf ' %s\n' "${missing//$'\n'/$'\n '}" fails=$((fails + 1)) fi [ -z "${unlisted//[[:space:]]/}${missing//[[:space:]]/}" ] && \ diff --git a/tests/e2e.sh b/tests/e2e.sh index 11143fc..08762bd 100755 --- a/tests/e2e.sh +++ b/tests/e2e.sh @@ -17,6 +17,7 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck disable=SC2034 # Used by the example preflight below. PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" PASS=0 @@ -32,6 +33,7 @@ bold() { printf '\033[1m%s\033[0m\n' "$*"; } # ─── Assertion helpers ─────────────────────────────────────────────── # check