Close production gap + develop the AffineScript any-game interface#64
Merged
Merged
Conversation
Production gap: - Fix Secret Scanner startup_failure on main (estate Bug B): grant the wrapper job the perms the pinned reusable's gitleaks job requests (pull-requests:write, actions:read) and repin standards d135b05->891b1ed — same pattern as the green Scorecard wrapper from PR #41 - Migrate deprecated metadata names per estate mandate (2026-06-30): .machine_readable/6a2/ -> descriptiles/, agent_instructions/ -> bot_directives/, all path references rewritten - Refresh STATE.a2ml / ROADMAP / CLAUDE.md to verified reality: v0.9.0, 40 exported FFI symbols, 13 modules, 140 passing tests (94/41/5), flake.nix gone (guix only), PRs #61-#63 reflected; record Instant Sync red as owner-gated blocker B5 (dead FARM_DISPATCH_TOKEN) AffineScript interface (the any-game surface): - NEW src/ui/tea/gsa_ffi.affine — full binding of all 38 libgsa C ABI exports as typed externs with / IO effect rows, opaque GsaPtr handle type, ResultCode enum mirroring Types.idr codes 0-17, and a cmd_* effect layer (bootstrap/probe/action/logs/health/profiles/provision/ drift/alert/steam) the host dispatches for the pure core - REWORK src/ui/tea/gsa_gui.affine — from disconnected skeleton to the real TEA core: 8 panels (adds NexusSetup), GameProfile registry model (18 shipped A2ML profiles + runtime adds + generic auto-detect fallback = any game), 15 Msg variants closing the host feedback loop, result-code status surface, subscriptions for log/health polling - Both files typecheck against the affinescript compiler (core face) - Guard rails: scripts/affine-ffi-contract-check.sh (no phantom bindings + 27-symbol core coverage), affine-ffi-contract job in abi-contract.yml, just affine-check / affine-contract recipes, affine-contract wired into just quality Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
🔍 Hypatia Security ScanFindings: 1 issues detected
View findings[
{
"reason": "Repository has 21 non-main remote branch(es). Policy: single main branch only.",
"type": "GS007",
"file": ".",
"action": "delete_remote_branches",
"rule_module": "git_state",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
5 tasks
hyperpolymath
added a commit
that referenced
this pull request
Jul 17, 2026
…68) <!-- SPDX-License-Identifier: CC-BY-SA-4.0 --> ## Summary The three AffineScript compiler constraints that shaped `src/ui/tea/*.affine` (#64) only existed as a line in a `STATE.a2ml` session-log entry. This PR lifts them into discoverable source docs and adds an in-context guardrail, so a future contributor doesn't rediscover them the hard way or try to "simplify" code that is the way it is on purpose. This is the follow-up cleanup I flagged after closing out the completion roadmap. **It is docs/comments only** — the `.affine` logic is unchanged. ## Changes - **`src/ui/tea/README.adoc`** (new) — what the TEA interface is (pure `init`/`update`/`view`/`subs` core + the `cmd_*` `/ IO` effect layer), how to typecheck it (module resolution is cwd-relative → `just affine-check` from `src/ui/tea`), the symbol-contract guard (`just affine-contract` / `affine-ffi-contract-check.sh`, also in CI), and the three language constraints with rationale. - **`gsa_gui.affine`** — an in-context "AffineScript constraints (read before editing)" header block: `handle` is reserved (use `server_handle`); record-spread does not typecheck on nominal structs, so every `update` arm restating all 13 `Model` fields is **deliberate**, not oversight — do not DRY it with a spread; module resolution is cwd-relative. - **`gsa_ffi.affine`** — a one-line pointer to the `server_handle` naming convention and the README. ## Why no code refactor The obvious "cleanup" would be `with*` updater helpers to collapse the ~15 longhand `update` arms. I deliberately **did not** do that: AffineScript has no compiler in this environment and CI only checks the FFI symbol contract, not a typecheck, so the files currently compile but a refactor could not be verified here — a bad trade against working code. The docs instead make the constraint explicit and point the next editor (who *can* run `just affine-check`) at where a real refactor would belong if the compiler ever gains record spread. ## RSR Quality Checklist ### Required - [x] No banned language patterns / functions - [x] SPDX headers present (CC-BY-SA-4.0 on the new doc; existing AGPL headers on the `.affine` files unchanged) - [x] No secrets/credentials included ### As Applicable - [x] Documentation updated (this PR is documentation) - [x] Verified: `just affine-check` / `affine-contract` recipes exist and `affine-contract` is wired into `just quality`; `Model` has exactly the 13 fields the docs cite ## Testing Docs/comments only — no build or test surface changes. Facts were verified against the repo: the two `just` recipes exist, `affine-contract` is part of `just quality`, and the `Model` field count (13) matches the text. The `.affine` sources' logic is byte-for-byte unchanged apart from added comment lines. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01TaWWedv6VQqeZaPvc94keN --- _Generated by [Claude Code](https://claude.ai/code/session_01TaWWedv6VQqeZaPvc94keN)_ Co-authored-by: Claude <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Production gap
standards@d135b05, whose gitleaks job requestspull-requests: write+actions: readabove the caller'scontents: readcap (estate Bug B — the reusable is startup-failing estate-wide, including instandardsitself). Fix: explicit job-level permissions in the wrapper matching the reusable's requests (the same pattern that keeps our Scorecard wrapper green since PR harden: address actionable Hypatia advisory findings #41) + repin to currentstandardsmain (891b1ed)..machine_readable/6a2/→descriptiles/,agent_instructions/→bot_directives/; every path reference rewritten (docs/INDEX, 3 maintainer guides, .claude/CLAUDE.md).FARM_DISPATCH_TOKEN, estate-wide).AffineScript interface — serve any game
src/ui/tea/gsa_ffi.affine— complete binding of all 38 libgsa C ABI exports as typed externs with/ IOeffect rows, opaqueGsaPtrhandle type,ResultCodeenum mirroringTypes.idrcodes 0–17, and acmd_*effect layer (bootstrap / probe / fingerprint / server_action / logs / health / list+add profiles / extract config / provision / drift / alert / steam) that the Cadre Router / Gossamer host dispatches on behalf of the pure core.src/ui/tea/gsa_gui.affinereworked from a disconnected skeleton into the real TEA core: 8 panels (adds NexusSetup), aGameProfileregistry model — 18 shipped A2ML profiles, runtimeadd_profile, and generic auto-detect fallback via probe fingerprinting = any game without interface changes — 15Msgvariants closing the host feedback loop, result-code status surface, and subscriptions for log/health polling.handleis a reserved word; record spread fails on nominal structs; module resolution is cwd-relative (check fromsrc/ui/tea/).scripts/affine-ffi-contract-check.sh(declared ⊆ exported, no phantom bindings + 27-symbol operational core coverage), newaffine-ffi-contractjob inabi-contract.yml,just affine-check/just affine-contractrecipes, contract check wired intojust quality.Issue #20 triage (owner: one click to close)
All 8 panic-attack findings verified resolved or false-positive against this tree (posting to the issue was outside this session's permissions):
escapeXml()(fli-gauge.js:154,211)replaceChildren(PR #41)escapeHtml()on data-tip content (fli-tooltip.js:44)escapeTermHtml()before span-wrapping (fli-terminal.js:82)-A-Aanywhere; scoped--allow-read --allow-run --allow-env(Justfile:677)STEAM_PASSat runtime, echo off — scanner matched doc commentsVerification
zig build test/test-integration/test-smoke: 140/140 passingaffinescript checkon both.affinefiles: passingscripts/affine-ffi-contract-check.sh: 38 declared / 38 exported, 27 core bound🤖 Generated with Claude Code