Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
//
// 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",

Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/devcontainer.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
SPDX-License-Identifier: MPL-2.0
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# SPDX-License-Identifier: MPL-2.0
# shellcheck shell=bash
# Activate development environment
# Install direnv: https://direnv.net/

Expand Down
15 changes: 15 additions & 0 deletions .githooks/validate-stapeln-manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: MPL-2.0

Check failure on line 1 in .githooks/validate-stapeln-manifest.py

View workflow job for this annotation

GitHub Actions / Hypatia neurosymbolic scan

[hypatia] Python file detected -- banned language
"""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}")
2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
-->
# Code of Conduct

<!--
<!--
============================================================================
TEMPLATE INSTRUCTIONS (delete this block before publishing)
============================================================================
Expand Down
1 change: 0 additions & 1 deletion .machine_readable/descriptiles/0-AI-MANIFEST.a2ml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ When multiple agents may write to A2ML files concurrently:
3. Write updated file with new [provenance] metadata
4. Release by removing lock file
5. On conflict: re-read and retry if git-sha-at-read does not match HEAD

1 change: 0 additions & 1 deletion .machine_readable/descriptiles/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ Source .scm files should be removed after successful transpilation.

- [A2ML Repository Template](https://github.com/hyperpolymath/standards/blob/main/A2ML-REPO-TEMPLATE.adoc)
- [6A2 Format Family](https://github.com/hyperpolymath/standards#a2ml-format-family-7-formats)

Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Each version represents a specific recalibration point.
- Multiple versions with different dates are permitted
- No other A2ML files in this directory
- Single source of truth for anchor documents

1 change: 0 additions & 1 deletion .machine_readable/descriptiles/anchors/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ https://github.com/hyperpolymath/standards/tree/main/anchor-a2ml

- [A2ML Repository Template](https://github.com/hyperpolymath/standards/blob/main/A2ML-REPO-TEMPLATE.adoc)
- [Anchor A2ML Spec](https://github.com/hyperpolymath/standards/tree/main/anchor-a2ml)

8 changes: 4 additions & 4 deletions .machine_readable/scripts/maintenance/maint-assault.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ fi
echo "Initiating full assault on $BINARY_NAME..."
mkdir -p "$(dirname "$REPORT_PATH")"

"$PA_BIN" assault "target/release/$BINARY_NAME"
--source .
--intensity medium
--duration 10
"$PA_BIN" assault "target/release/$BINARY_NAME" \
--source . \
--intensity medium \
--duration 10 \
--output "$REPORT_PATH"

echo ""
Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ repos:
- id: check-yaml
- id: check-json
- id: check-toml
# This template has an unquoted numeric placeholder; the local hook renders it.
exclude: '^container/stapeln/manifest\.toml$'
- id: check-merge-conflict
- id: detect-private-key
- id: check-added-large-files
Expand All @@ -39,6 +41,14 @@ repos:

- repo: local
hooks:
- id: validate-stapeln-manifest
name: Validate rendered Stapeln manifest
entry: python3 .githooks/validate-stapeln-manifest.py
language: system
pass_filenames: false
args: [container/stapeln/manifest.toml]
files: '^(container/stapeln/manifest\.toml|\.githooks/validate-stapeln-manifest\.py)$'

# The Dogfood Gate uses these validators. They discover their own inputs.
- id: validate-a2ml
name: Validate A2ML manifests
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
<!-- The region between the ARRIVAL-PACK markers is generated from this
repo's a2ml by `just claude-md` — do not hand-edit it. -->

<!-- ARRIVAL-PACK:BEGIN — estate-common @Manifesto:DRAFT-unratified · repo @a2ml:CLADE@013d0d082ec8 ECOSYSTEM@76e3322ff788 AGENTIC@d72859864bbe DEED@a51b6a2a6e3f ANCHOR@8ba91a3c1fd1 — generated by `just claude-md`, do not hand-edit -->
<!-- ARRIVAL-PACK:BEGIN — estate-common @Manifesto:DRAFT-unratified · repo @a2ml:CLADE@013d0d082ec8 ECOSYSTEM@76e3322ff788 AGENTIC@d72859864bbe DEED@9235e3cdc959 ANCHOR@8ba91a3c1fd1 — generated by `just claude-md`, do not hand-edit -->

# You are in the hyperpolymath estate — orient before acting

Expand Down Expand Up @@ -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`.

<!-- ARRIVAL-PACK:END · provenance: CLADE@013d0d082ec8 ECOSYSTEM@76e3322ff788 AGENTIC@d72859864bbe DEED@a51b6a2a6e3f ANCHOR@8ba91a3c1fd1 · Manifesto@DRAFT-unratified · regenerate: `just claude-md` (k9 drift-detects; do not hand-edit above) -->
<!-- ARRIVAL-PACK:END · provenance: CLADE@013d0d082ec8 ECOSYSTEM@76e3322ff788 AGENTIC@d72859864bbe DEED@9235e3cdc959 ANCHOR@8ba91a3c1fd1 · Manifesto@DRAFT-unratified · regenerate: `just claude-md` (k9 drift-detects; do not hand-edit above) -->
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion LICENSES/CC-BY-SA-4.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

9 changes: 0 additions & 9 deletions benches/template_bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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"
Expand Down
38 changes: 16 additions & 22 deletions container/stapeln/compose.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand All @@ -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"]
Expand Down
34 changes: 14 additions & 20 deletions container/stapeln/compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions scripts/check-proofs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:]]/}" ] && \
Expand Down
4 changes: 4 additions & 0 deletions tests/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,6 +33,7 @@ bold() { printf '\033[1m%s\033[0m\n' "$*"; }
# ─── Assertion helpers ───────────────────────────────────────────────

# check <label> <expected-substring> <actual>
# shellcheck disable=SC2317 # Called by the examples when enabled.
check() {
local name="$1" expected="$2" actual="$3"
if echo "$actual" | grep -q "$expected"; then
Expand All @@ -44,6 +46,7 @@ check() {
}

# check_status <label> <expected-http-status> <actual-http-status>
# shellcheck disable=SC2317 # Called by the examples when enabled.
check_status() {
local name="$1" expected="$2" actual="$3"
if [ "$actual" = "$expected" ]; then
Expand All @@ -56,6 +59,7 @@ check_status() {
}

# skip <label> <reason>
# shellcheck disable=SC2317 # Called by the examples when enabled.
skip_test() {
yellow " SKIP: $1 ($2)"
SKIP=$((SKIP + 1))
Expand Down
5 changes: 2 additions & 3 deletions tests/e2e/template_instantiation_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
# ANSI colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color

Expand Down Expand Up @@ -197,7 +196,7 @@
log_pass "No remaining placeholders found"
else
log_error "Found remaining placeholders in:"
echo "$REMAINING_PLACEHOLDERS" | sed 's/^/ /'
printf ' %s\n' "${REMAINING_PLACEHOLDERS//$'\n'/$'\n '}"
exit 1
fi

Expand All @@ -217,7 +216,7 @@
if [ -f "$TEST_REPO_PATH/$file" ]; then
# Check that it's not just a template (contains some actual content)
if grep -q "$TEST_PROJECT_NAME\|$TEST_AUTHOR\|$TEST_REPO_NAME" "$TEST_REPO_PATH/$file" 2>/dev/null || \
[ $(wc -l < "$TEST_REPO_PATH/$file") -gt 10 ]; then
[ "$(wc -l < "$TEST_REPO_PATH/$file")" -gt 10 ]; then

Check failure on line 219 in tests/e2e/template_instantiation_test.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_systemet&issues=AaIF3geGicHg38CPwVdy&open=AaIF3geGicHg38CPwVdy&pullRequest=110
log_pass "File instantiated: $file"
else
log_error "File appears to be a template: $file"
Expand Down
2 changes: 1 addition & 1 deletion tests/validate-k9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ check_pedigree() {
local expected="$1" message="$2" status=0
shift 2
printf 'K9!\n# SPDX-License-Identifier: MPL-2.0\n%s' "$*" > "$tmp/input/fixture.k9.ncl"
INPUT_STRICT=true INPUT_PATH="$tmp/input" INPUT_PATHS_IGNORE= GITHUB_OUTPUT=/dev/null \
INPUT_STRICT=true INPUT_PATH="$tmp/input" INPUT_PATHS_IGNORE='' GITHUB_OUTPUT=/dev/null \
bash "$root/.githooks/validate-k9.sh" > "$tmp/result" || status=$?
if [[ "$status" != "$expected" ]] || ! grep -Fq "$message" "$tmp/result"; then
cat "$tmp/result" >&2
Expand Down
2 changes: 1 addition & 1 deletion verification/coverage/0.2-AI-MANIFEST.a2ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ parent: "../0.1-AI-MANIFEST.a2ml"
---
### [AI_MANIFEST]
description: |
High-assurance verification unit for coverage.
High-assurance verification unit for coverage.
Critical for safety-of-life and aerospace-grade deployment standards.
Loading
Loading