Skip to content

Commit b5a5cd9

Browse files
chore(maintenance): reconcile licence headers + honest state (corrective/adaptive pass) (#33)
Corrective: - Re-stamp 24 .zig/.idr source SPDX headers MPL-2.0 -> AGPL-3.0-or-later to match LICENSE, META.a2ml, and steam_client.zig. Machine-readable .a2ml/.contractile files and the emitted-A2ML output string keep MPL-2.0 (deliberate carve-out). - Fill INTENT.contractile (was raw {{PLACEHOLDER}} template): purpose, anti-purpose, architectural-invariants, ask-before-touching, ecosystem. Adaptive (stale-state reconciliation): - Exported FFI symbol count 24/22 -> 27 (Steam +3, Nexus +2) in CLAUDE.md and ROADMAP.adoc. - Completion 100% -> honest 93% to match ROADMAP and the open v1.0.0 gates. - Strike stale critical-next-action: the Nexus FFI exports already exist (server_actions.zig:573 / :713); replace with the real open item (Ephapax parser gaps, 23/25 chain tests). - Refresh ROADMAP revdate and log the April Steam/Nexus/CryoFall additions. Test counts (111/112; integration 36/39) left unchanged pending a verified `zig build test` run -- zig is not installed in this environment. Claude-Session: https://claude.ai/code/session_01LvsZgNxFbeqfRmrVFNhJ8G Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0eb38eb commit b5a5cd9

28 files changed

Lines changed: 58 additions & 54 deletions

.claude/CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ VeriSimDB (8-modality octads) -- container/verisimdb/
7474
- **Backup** (port 8091, `GSA_BACKUP_VERISIMDB_URL`): game save metadata, snapshots, restore points
7575
- **Container images** use Chainguard Wolfi base, Podman, `Containerfile` (never Docker/Dockerfile)
7676

77-
## Current State (2026-04-03)
77+
## Current State (2026-06-20)
7878

79-
- **Completion**: 100% (all 15 phases complete)
79+
- **Completion**: 93% (15 phases built; v1.0.0 gates still open — see Remaining)
8080
- **Zig version**: 0.15.2 (see `.tool-versions`)
81-
- **Exported FFI symbols**: 24 (comptime linker hints in main.zig)
81+
- **Exported FFI symbols**: 27 (comptime linker hints in main.zig)
8282
- **Tests**: 111 Zig tests across 3 suites (unit: 67, integration: 39, smoke: 5). All passing.
8383
- Security tests for command injection in server_actions
8484
- Config parser edge cases for all 8 formats
@@ -91,7 +91,7 @@ VeriSimDB (8-modality octads) -- container/verisimdb/
9191
- **Release CI**: release.yml builds Zig, packages tarball, uploads artifacts
9292
- **Groove**: Full manifest with probe/config/drift/alert capabilities
9393
- **Icon**: SVG + 256px PNG in assets/
94-
- **Remaining**: Bitbucket mirror (SSH key -- manual step)
94+
- **Remaining (v1.0.0 gates)**: Ephapax parser gaps (`;`, zero-arg calls, lambda blocks → 2 failing Gossamer chain tests, 23/25); CryoFall game-file staging (blocker B4, manual SteamCMD); Bitbucket mirror (SSH key -- manual step); OpenSSF badge; full docs pass
9595

9696
## Lint / Quality
9797

.machine_readable/6a2/STATE.a2ml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
[metadata]
77
project = "game-server-admin"
88
version = "0.1.0"
9-
last-updated = "2026-04-03b"
9+
last-updated = "2026-06-20"
1010
status = "active"
1111

1212
[project-context]
1313
name = "game-server-admin"
1414
purpose = "Universal game server probe, configuration management, and administration via Gossamer webview + VeriSimDB backing store. Extracts config into A2ML format with full provenance tracking."
15-
completion-percentage = 100
15+
completion-percentage = 93
1616

1717
[position]
1818
phase = "implementation"
@@ -49,7 +49,7 @@ blockers = [
4949
actions = [
5050
"STAGE CRYOFALL: STEAM_USER=hyperpolymath just cryofall-stage-verpex (one-time ~3GB download — needs Steam password + Guard code)",
5151
"After staging: just cryofall-watchdog-install (deploys self-heal watchdog as systemd service)",
52-
"Nexus Setup GUI: nexus_stage_files / nexus_provision / nexus_verify IPC handlers need Zig FFI wiring (gossamer_gsa_run_script export + gossamer_gsa_write_server_config export)",
52+
"Resolve Ephapax parser gaps (;, zero-arg calls, lambda blocks) — 2 failing Gossamer chain tests (23/25)",
5353
"Set up Bitbucket mirror (SSH key issue — manual step)",
5454
"Tag v0.1.0 release when ready",
5555
]
@@ -63,4 +63,5 @@ sessions = [
6363
{ date = "2026-04-04", summary = "CryoFall server + Steam integration session: deployed CryoFall container stack (Containerfile, entrypoint.sh, Settings.xml, gsa-cryofall.container Quadlet, backup.sh, manifest.toml). Schema-driven provisioner (scripts/provision-server.sh — 9-step: preflight→build→volumes→firewall→quadlet→start→verify→VeriSimDB→report). Steam integration: steam_client.zig (resolveVanityUrl, getPlayerSummary, checkOwnership — 3 C ABI exports, 5 tests), wired into main.zig+cli.zig as 'gsa steam resolve/player'. Fire-and-forget wizard (scripts/wizard.sh — 7 steps, interactive+unattended). Self-healing watchdog (scripts/self-heal.sh — container/port/disk/XML checks, auto-restart, Groove alerts). SteamCMD stage script (scripts/steam-stage.sh — auth token persistence, interactive Steam Guard, rsync to volume/remote). Cloudflare: cryofall.jewell.nexus → 209.42.26.106 grey-cloud DNS live. Verpex: UDP 6000+6001 firewall opened, container image built. Operator Steam IDs resolved: pengie5=76561198149527024, hyperpolymath=76561198141836018. Blocking: game files need authenticated SteamCMD stage (B4)." },
6464
{ date = "2026-04-03b", summary = "Security hardening: replaced 427 AGPL-3.0-or-later headers with MPL-2.0, replaced LICENSE with PMPL text. Fixed critical vuln (executeSSH shell injection — refactored to argv slice + -- separator). Fixed temp-file TOCTOU in gossamer-integration-test.sh (mktemp). Removed dangling-ref getWriter function. Replaced hardcoded test credentials. Added escapeXml to fli-gauge.js, escapeHtml+data-tip escaping to fli-tooltip.js, DOM node clone in fli-editable.js cancelEdit. Eliminated all 8 @ptrCast calls across FFI layer (string literals + [N:0]u8 sentinel buffers). Filled K9 template-hunt.k9.ncl TODO placeholders with GSA deployment content. All 111 Zig tests pass. panic-attack: 0 weak points (was 21)." },
6565
{ date = "2026-04-04b", summary = "Nexus Setup GUI panel: full 7-step graphical wizard added as nav item 2 in Gossamer GUI (between Server Browser and Config Editor). src/gui/panels/nexus-setup/panel.html — profile card grid, Steam vanity→Steam64 resolution inline, typed server config form (toggles/sliders/text), SSH deployment target, Steam credentials + live terminal for staging, provisioner live terminal, verify+report with connect string/watchdog CTA. src/gui/panels/nexus-setup/nexus-setup.eph — IPC contract docs. src/core/Bridge.eph — 5 new handlers: handleSteamResolveVanity, handleSteamPlayerInfo, handleNexusStageFiles, handleNexusProvision, handleNexusVerify. src/gui/host.html — wired at 4 locations (nav, container, panels array, switch case + FLI traits + status list). Operator slots pre-filled: pengie5 + hyperpolymath. Committed f26deda, pushed to GitHub." },
66+
{ date = "2026-06-20", summary = "Maintenance pass (axis-1 must>intend>like, axis-2 corrective>adaptive>perfective). CORRECTIVE: re-stamped 24 .zig/.idr source SPDX headers MPL-2.0 -> AGPL-3.0-or-later to match LICENSE + META.a2ml + steam_client.zig (machine-readable .a2ml/.contractile stay MPL by carve-out); filled INTENT.contractile (was raw template — purpose/anti-purpose/architectural-invariants/ask-before-touching/ecosystem). ADAPTIVE: exported-symbol count 24/22 -> 27 (Steam +3, Nexus run_script/write_server_config +2) in CLAUDE.md + ROADMAP; completion 100% -> honest 93% to match ROADMAP; struck stale critical-next-action (Nexus FFI exports already exist at server_actions.zig:573/:713), replaced with the real open item (Ephapax parser gaps); refreshed ROADMAP revdate + April additions. Test counts (111/112, integration 36/39) left for a verified 'zig build test' run — zig not installed in this container." },
6667
]

.machine_readable/INTENT.contractile

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
; understand a MUST, read INTENT first.
2323
; - TRUST: The "ask-before-touching" section in INTENT maps directly
2424
; to TRUST.trust-deny for the most sensitive areas.
25-
; - ADJUST: INTENT's anti-purpose should include "this software is
26-
; NOT only for users with perfect vision/hearing/mobility."
25+
; - ADJUST: INTENT's anti-purpose includes "this software is NOT only
26+
; for users with perfect vision/hearing/mobility."
2727
; - DUST: When INTENT changes (repo pivots), related DUST entries
2828
; should be created for the abandoned direction.
2929
;
@@ -35,38 +35,38 @@
3535

3636
; === Purpose (what this repo IS) ===
3737
(purpose
38-
"{{ONE_PARAGRAPH_PURPOSE}}"
38+
"game-server-admin (GSA) is a universal game-server probe, configuration-management, and administration tool. It fingerprints running game servers across 8 wire protocols, extracts their on-disk configuration out of 8 formats (XML/INI/JSON/ENV/YAML/TOML/Lua/KV) into provenance-tracked A2ML, stores probe data and config octads in a dedicated VeriSimDB instance, and drives lifecycle actions (start/stop/restart/logs, schema-driven provisioning, Steam file staging) through a Zig FFI core. That core is exposed both to a Gossamer webview GUI (Ephapax .eph panels) and a standalone gsa CLI. An Idris2 ABI layer formally specifies the C-ABI seam — memory layout and the 13 result codes — that the GUI and CLI depend on."
3939
)
4040

4141
; === Anti-Purpose (what this repo is NOT — prevents scope creep) ===
4242
(anti-purpose
43-
"{{ONE_PARAGRAPH_ANTI_PURPOSE}}"
44-
; Examples:
45-
; "This is NOT a general-purpose database — it solves one specific problem."
46-
; "This is NOT a framework — it is a library with a focused API."
47-
; "This does NOT handle authentication — that is delegated to [other repo]."
43+
"GSA is NOT a game client, game launcher, or matchmaking/lobby service — it administers servers, it does not play or broker games. It is NOT a general-purpose configuration database (persistence is delegated to VeriSimDB), NOT a general TTS/notification platform (voice alerting is delegated to Groove via .well-known), and NOT a GUI toolkit (the webview shell is Gossamer). It does not ship its own storage engine, auth system, or container runtime — those are external dependencies. It is NOT only for sighted, able-bodied operators on modern hardware: every surface (GUI, CLI, docs) must satisfy ADJUST / WCAG-2.2-AA."
4844
)
4945

5046
; === Key Architectural Decisions That Must Not Be Reversed ===
5147
(architectural-invariants
52-
; *REMINDER: List the foundational decisions*
53-
; ("Idris2 for ABI definitions — dependent types prove interface correctness")
54-
; ("Zig for FFI — zero-cost C ABI compatibility")
55-
; ("Elixir for supervision — OTP fault tolerance")
48+
("Idris2 for the ABI — dependent types specify and prove the C-ABI layout and result-code contract; no believe_me / assert_total")
49+
("Zig for the FFI bridge — zero-cost C ABI; every export is prefixed gossamer_gsa_ and uses pub export fn ... callconv(.c)")
50+
("The 13 result codes are contractual — the Zig FFI MUST match src/interface/abi/Types.idr")
51+
("Config is emitted as A2ML with full provenance; secrets are redacted as [REDACTED] in A2ML output and octad JSON")
52+
("Backing store is VeriSimDB on dedicated instances — main on 8090 (config/probe/octads), backup on 8091 (save metadata); never co-located with the VeriSimDB source repo")
53+
("GUI is a Gossamer webview driven by Ephapax .eph; the CLI is the standalone gsa binary — both call the same FFI exports")
54+
("Containers use Chainguard Wolfi base, Podman, Containerfile, and selur-compose — never Docker / docker-compose")
5655
)
5756

5857
; === Sensitive Areas (if in doubt, ask) ===
5958
(ask-before-touching
60-
; *REMINDER: List areas where LLMs should check before modifying*
61-
; "src/abi/ — formal proofs, changes require re-verification"
62-
; "ffi/zig/ — C ABI boundary, changes affect all language bindings"
63-
; ".machine_readable/ — checkpoint files, format is specified"
59+
"src/interface/abi/ — Idris2 formal proofs (e.g. alignUpCeil / alignUpCeilIsMultiple); changes require re-verification"
60+
"the gossamer_gsa_ C-ABI surface and the 13 result codes — changes ripple to the GUI, the CLI, and every binding"
61+
"src/interface/ffi/src/server_actions.zig — command construction; argv-slice + -- discipline prevents shell injection"
62+
"LICENSE and per-file SPDX headers — AGPL-3.0-or-later for code; legal implications"
63+
".machine_readable/ — checkpoint, contractile, and policy files; canonical and format-specified"
6464
)
6565

6666
; === Ecosystem Position ===
6767
(ecosystem
68-
(belongs-to "{{MONOREPO_OR_STANDALONE}}")
69-
(depends-on ("{{DEP1}}" "{{DEP2}}"))
70-
(depended-on-by ("{{CONSUMER1}}" "{{CONSUMER2}}"))
68+
(belongs-to "standalone repo within the hyperpolymath ecosystem")
69+
(depends-on ("Gossamer (webview GUI runtime)" "VeriSimDB (backing store)" "Idris2 0.7.0 (ABI)" "Zig 0.15.2 (FFI)" "Groove (voice alerting)" "Podman + Chainguard Wolfi (containers)"))
70+
(depended-on-by ("game-server operators (humans, via GUI and CLI)" "Groove alert consumers"))
7171
)
7272
)

ROADMAP.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MPL-2.0
22
= Game Server Admin (GSA) Roadmap
33
:author: Jonathan D.A. Jewell
4-
:revdate: 2026-03-29
4+
:revdate: 2026-06-20
55

66
== Current State
77

@@ -10,8 +10,8 @@ GSA is a universal game server probe, config management, and administration tool
1010

1111
Key capabilities delivered:
1212

13-
* 22 exported FFI symbols (Zig 0.15.2, libgsa.so)
14-
* 8 FFI modules: lifecycle, probe, config_extract, a2ml_emit, verisimdb_client, server_actions, game_profiles, groove_client
13+
* 27 exported FFI symbols (Zig 0.15.2, libgsa.so)
14+
* 10 FFI modules: lifecycle, probe, config_extract, a2ml_emit, verisimdb_client, server_actions, game_profiles, groove_client, steam_client, cli
1515
* Protocol fingerprinting (8 protocols, 20+ known ports)
1616
* Config parsing (8 formats: XML, INI, JSON, ENV, YAML, TOML, Lua, KV)
1717
* 17 game profiles (A2ML files in profiles/)
@@ -24,6 +24,9 @@ Key capabilities delivered:
2424
* Chainguard Wolfi containers with quadlets
2525
* Idris2 ABI with 13 result codes
2626
* Desktop entry and icon assets (SVG + PNG)
27+
* Steam Web API client (vanity->Steam64 resolution, player summary, ownership check)
28+
* Nexus Setup GUI -- 7-step provisioning wizard (profile -> Steam resolve -> config -> SSH target -> file staging -> provision -> verify)
29+
* CryoFall container stack (Containerfile, Quadlet, schema-driven provisioner, self-heal watchdog)
2730

2831
Test suites:
2932
* Zig unit tests: passing

src/interface/abi/Foreign.idr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- SPDX-License-Identifier: MPL-2.0
1+
-- SPDX-License-Identifier: AGPL-3.0-or-later
22
-- Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
--
44
||| GSA.ABI.Foreign — FFI declarations for Game Server Admin

src/interface/abi/Layout.idr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- SPDX-License-Identifier: MPL-2.0
1+
-- SPDX-License-Identifier: AGPL-3.0-or-later
22
-- Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
--
44
||| GSA.ABI.Layout — Memory layout proofs for Game Server Admin ABI

src/interface/abi/Types.idr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- SPDX-License-Identifier: MPL-2.0
1+
-- SPDX-License-Identifier: AGPL-3.0-or-later
22
-- Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
--
44
||| GSA.ABI.Types — Core type definitions for Game Server Admin ABI

src/interface/ffi/bench/bench_main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: MPL-2.0
1+
// SPDX-License-Identifier: AGPL-3.0-or-later
22
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
//
44
// Game Server Admin — Micro-benchmarks

src/interface/ffi/build.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: MPL-2.0
1+
// SPDX-License-Identifier: AGPL-3.0-or-later
22
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
//
44
// Game Server Admin — FFI build configuration

src/interface/ffi/src/a2ml_emit.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: MPL-2.0
1+
// SPDX-License-Identifier: AGPL-3.0-or-later
22
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
//
44
// Game Server Admin — A2ML serialisation and deserialisation
@@ -62,7 +62,7 @@ pub fn emitA2ML(
6262
errdefer buf.deinit();
6363
const writer = buf.writer();
6464

65-
// SPDX header
65+
// SPDX header (emitted A2ML output is machine-readable .a2ml data — MPL-2.0 carve-out)
6666
try writer.writeAll("# SPDX-License-Identifier: MPL-2.0\n");
6767
try writer.writeAll("# Generated by Game Server Admin FFI layer\n\n");
6868

0 commit comments

Comments
 (0)