fix: instantiate the RSR template for scaffoldia - #21
Merged
Conversation
scaffoldia was scaffolded from rsr-template-repo but never fully instantiated. Unlike its sibling contractiles, scaffoldia had already been partially cured in earlier PRs (#16/#17): README.adoc, root SECURITY.md, and the descriptiles migration (no 6a2/ directory) were already clean. This closes the remaining gaps. Placeholder substitution: - ~420 {{TOKEN}} identity placeholders resolved across ~65 files (AUTHOR, AUTHOR_EMAIL, OWNER, REPO, FORGE, PROJECT(_NAME), CURRENT_YEAR/DATE, VERSION, LICENSE, CONDUCT_*, SECURITY_EMAIL, PACKAGE_NAME, etc.), derived from the repo's own SPDX headers, LICENSE file, and GitHub's own description (verified via `gh repo view`). - Deliberately left alone: container/*, machine-readable-design/{canonical- directory-structure,harvested-registry}/, docs-template/, .machine_readable/configs/{selur-compose,stapeln}.toml (recurring per-service templates, not one-time identity), and validator/mechanism files whose job is to literally match "{{PLACEHOLDER}}" as a drift detector. - Fixed the literal (non-{{}}) "rsr-template-repo" self-identity string in ~15 files, most notably .machine_readable/contractiles/* (a stale, never-updated copy of an earlier root Justfile — root's own doctor/tour/ help-me recipes already said "scaffoldia"; the contractiles/ copy still said "rsr-template-repo"), docs/onboarding/{llm-warmup-dev,llm-warmup- user,QUICKSTART-USER}.adoc (never cured, described a nonexistent installable end-user app with fabricated `just run`/`just heal`/`just setup` commands), build/setup.sh, and a Dogfood Gate footer link that pointed at the wrong repo. Left alone genuine references to the real upstream rsr-template-repo (pipeline mentions, "clone this to start a new project" examples, provenance notes, the groove.just drift detector). - Fixed a real (non-template) bug in docs/attribution/CITATIONS.adoc: all five citation formats linked to "github.com/hyperpolymath/Scaffoldia" (capitalised, from {{PROJECT_NAME}}) instead of the actual lowercase repo slug. - Fixed docs/developer/ABI-FFI-README.adoc's Idris2 example, which showed "import SCAFFOLDIA.ABI.Foreign" (from {{PROJECT}}) — the real module path is "Abi.Foreign" per abi.ipkg; there is no project-name namespace prefix. - Removed a fabricated PGP fingerprint/key from .github/SECURITY.md and .well-known/security.txt (confirmed via `curl https://github.com/ hyperpolymath.gpg` and `gh api users/hyperpolymath/gpg_keys` that no key has ever been uploaded) rather than inventing one. Zig — the hard requirement (src/interface/ffi/src/main.zig had the same three real Zig 0.16 compile bugs as contractiles, beyond placeholder text): - `Handle` was `opaque { allocator: ..., initialized: ... }` — opaque types cannot have fields; changed to a plain `struct` (still opaque to C callers, which only ever see a pointer). - `callconv(.C)` is not a valid CallingConvention member under Zig 0.16; changed to `.c`. - `std.heap.c_allocator` requires libc; build.zig never linked it. - build.zig was a no-op stub; rewritten into a real build: a static library target (`.link_libc = true`), a test step for main.zig, and a second module for test/integration_test.zig that imports main.zig by its registered module name ("scaffoldia"). - test/integration_test.zig was a fully-commented-out placeholder; replaced with 10 real tests exercising every exported scaffoldia_* function (lifecycle, process/process_array incl. null-buffer, strings, version, build_info, error handling). Verified: `zig fmt --check .` exit 0; `zig build` exit 0; `zig build test --summary all` exit 0, 13/13 tests pass (3 unit + 10 integration); `idris2 --build abi.ipkg` exit 0; `just --list` exit 0; all workflow YAML still parses. Justfile fake-gate recipes replaced with real invocations (build, build-release, test, test-verbose, test-smoke, e2e, aspect, bench, fmt, fmt-check, lint, deps, install) or deleted where genuinely unimplementable (`run`/`run-verbose` — this is a library with no executable; `readiness` — duplicated crg-grade/crg-badge with no distinct real check). Fixed `clean`, which previously did `rm -rf ... build/ ...` and would have deleted the repo's own tracked build/ orchestration directory (build/just/*.just, build/contractile.just, build/guix.scm) — now targets only build/ttc/, .zig-cache/, and zig-out/. tests/e2e.sh (previously fully commented-out) now runs real preflight + idris2 build + zig build/test, using its existing check/green/red helpers. benches/template_bench.sh dropped its "Template Validation" and "Template Instantiation" sections (called the two now-deleted scripts) and kept/ renumbered the real Zig-build/Zig-test/workflow-validation benchmarks; fixed a pre-existing `rm -rf zig-cache` path bug (real dir is `.zig-cache`). Deleted template-only machinery: scripts/validate-template.sh, tests/e2e/template_instantiation_test.sh, .machine_readable/ai/PLACEHOLDERS.adoc. No workflow referenced them. Rewrote docs/status/TEST-NEEDS.adoc, which previously narrated the deleted validate-template.sh's "8-phase validation" as the repo's own feature and claimed a placeholder Zig test was "PASSING" — now describes the real test suite and the 13/13 pass count honestly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
hyperpolymath
marked this pull request as ready for review
July 27, 2026 18:42
|
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.



Summary
scaffoldia (sibling of
contractiles) was scaffolded fromrsr-template-repobut never fully instantiated. Companion cure to hyperpolymath/contractiles#21, adapted to scaffoldia's actual (different) disease shape — scaffoldia had already been partially cured in earlier PRs (#16/#17), so this closes the remaining gaps rather than repeating contractiles' fix verbatim.{{TOKEN}}identity placeholders resolved across ~65 files, derived from the repo's own SPDX headers, LICENSE file, and GitHub's own description (gh repo view hyperpolymath/scaffoldia --json description). Deliberately leftcontainer/*,machine-readable-design/{canonical-directory-structure,harvested-registry}/,docs-template/, and drift-detector files whose job is to literally match{{PLACEHOLDER}}as a pattern.rsr-template-repoself-identity string fixed in ~15 files — most notably.machine_readable/contractiles/*(a stale, never-updated copy of an earlier rootJustfile) and three onboarding docs that described a nonexistent installable app with fabricatedjust run/just heal/just setupcommands. Genuine references to the real upstream (pipeline mentions, clone-to-start-new-project examples, provenance notes) were left alone.docs/attribution/CITATIONS.adoclinked togithub.com/hyperpolymath/Scaffoldia(capitalised, wrong) in all five citation formats;docs/developer/ABI-FFI-README.adoc's Idris2 example imported a nonexistentSCAFFOLDIA.ABI.Foreignmodule (real path isAbi.Foreign)..github/SECURITY.mdand.well-known/security.txt— confirmed viacurl https://github.com/hyperpolymath.gpgandgh api users/hyperpolymath/gpg_keysthat no key has ever been uploaded, rather than inventing one.Zig — the hard requirement
src/interface/ffi/src/main.zighad the same three real Zig 0.16 compile bugs as contractiles, beyond placeholder text:Handlewasopaque { allocator: ..., initialized: ... }— opaque types cannot have fields; changed to a plainstruct.callconv(.C)is not a validCallingConventionmember under Zig 0.16 — changed to.c.std.heap.c_allocatorrequires libc;build.zignever linked it.build.zigwas a no-op stub — rewritten into a real build (static library,.link_libc = true, test steps for both the main module and the integration-test module).test/integration_test.zigwas a fully-commented-out placeholder — replaced with 10 real tests exercising every exportedscaffoldia_*function.Verified:
zig fmt --check .→ exit 0zig build→ exit 0zig build test --summary all→ exit 0, 13/13 tests pass (3 unit + 10 integration)idris2 --build abi.ipkg→ exit 0just --list→ exit 0Justfile
Fake-gate recipes (
build,build-release,test,test-verbose,test-smoke,e2e,aspect,bench,fmt,fmt-check,lint,deps,install) replaced with real invocations.run/run-verbosedeleted (library, no executable).readinessdeleted (duplicatedcrg-grade/crg-badgewith no distinct real check).cleanfixed — it previously didrm -rf ... build/ ..., which would have deleted the repo's own trackedbuild/orchestration directory; now targets onlybuild/ttc/,.zig-cache/,zig-out/.tests/e2e.sh(previously fully commented out) now runs real preflight + Idris2 build + Zig build/test.benches/template_bench.shdropped its two benchmark sections that called the now-deleted scripts and kept the real ones.Deleted template-only machinery
scripts/validate-template.sh,tests/e2e/template_instantiation_test.sh,.machine_readable/ai/PLACEHOLDERS.adoc. No workflow referenced them.docs/status/TEST-NEEDS.adocrewritten — it previously narrated the deletedvalidate-template.sh's "8-phase validation" as the repo's own feature; now describes the real test suite honestly.Test plan
zig fmt --check .exits 0zig buildexits 0 (fromsrc/interface/ffi)zig build test --summary allexits 0, 13/13 tests passidris2 --build abi.ipkgexits 0just --listexits 0.github/workflows/*.ymlstill parse as valid YAMLgit diff --cached --statconfirms.editorconfig,.gitattributes,.gitignore,flake.nix,.tool-versionsuntouchedtests/aspect_tests.shpasses except the pre-existing, out-of-scope false positive on proof-doc prose mentioning "Admitted"/"sorry"🤖 Generated with Claude Code