fix: instantiate bitfuckit from the RSR template - #22
Merged
Conversation
bitfuckit was scaffolded from rsr-template-repo but never instantiated:
literal {{PLACEHOLDER}} tokens survived throughout, including in the .zig
FFI sources, so the Zig genuinely did not parse (export fn {{project}}_init()
etc.). This cures it for real.
Identity substituted across ~80 files (README, governance/security/conduct
docs, .github/ community health files, .machine_readable/ state+contractile
files, container/ packaging, .devcontainer/, docs/onboarding+status+
attribution, examples, Justfile top variables) using the repo's actual
registration in reposystem/config/tools.ncl: role=utility,
summary="Ada/SPARK repository auditor (health, compliance, security
posture)", status=extracted. Left untouched: docs-template/, ADR/audit
*-TEMPLATE.adoc copy-per-instance files, self-validating/examples and
template-{hunt,kennel,yard}.k9.ncl (generic reusable scaffolding by design),
and machine-readable-design/ (describes the RSR standard generically).
Zig FFI (src/interface/ffi/):
- {{PROJECT}}/{{project}} -> bitfuckit in main.zig, build.zig, integration_test.zig
- fixed three real pre-existing bugs the placeholder text had been masking:
Handle was `opaque` with fields (illegal in Zig), std.heap.c_allocator
needs libc linking build.zig never wired up (switched to page_allocator,
self-consistent since alloc/free are always paired through this library's
own functions), and callconv(.C) is stale syntax under Zig 0.16 (-> .c)
- verified with the real toolchain (zig 0.16.0): `zig fmt --check
src/interface/ffi` exit 0, `zig build` exit 0, `zig test src/main.zig`
exit 0 (3/3 tests), `zig test test/integration_test.zig` exit 0 (1/1)
Justfile: top `project`/`REPO` vars fixed; every `echo "TODO"` stub recipe
either replaced with a real, verified command (build/test -> zig
build/test, fmt/fmt-check -> zig fmt, lint -> idris2 --typecheck abi.ipkg,
e2e/aspect -> the real test scripts, deps -> real zig/idris2 presence
checks) or deleted outright where nothing exists to back it (run,
run-verbose, install: build.zig defines no executable/library target yet;
bench, readiness: no benchmark or readiness-test harness exists). Mirrored
the same fixes into .machine_readable/contractiles/Justfile, which a Dustfile
invariant expects to match the root Justfile but had drifted further out of
sync than the root copy.
.machine_readable/6a2/{STATE,ECOSYSTEM}.a2ml and the contractiles/
(Must|Trust|Intent|Adjust|Bust|Dust)file.a2ml family previously asserted
"this repository is rsr-template-repo, the canonical template" — rewritten
to describe bitfuckit's real, honest state (ABI/FFI seam compiles and passes
its own tests; no Ada/SPARK audit logic exists yet) rather than silently
carrying that false identity forward. Where inherited body content (intents,
failure-mode probes) still describes the template's own concerns rather than
bitfuckit's, it is flagged in-file rather than fabricated into fictional
bitfuckit-specific content.
Removed template machinery that tests the *substitution mechanism itself*,
now moot post-instantiation: scripts/validate-template.sh,
tests/e2e/template_instantiation_test.sh, benches/template_bench.sh, and
.machine_readable/ai/PLACEHOLDERS.adoc. Verified none are invoked from
.github/workflows/, Justfile, or build/just/*.just before deleting; all 27
workflow YAML files still parse after the changes.
.github/settings.yml's `name: "{{REPO}}"` is fixed to "bitfuckit" — left
unsubstituted it would have made probot/settings try to rename the repo to
the literal string "{{REPO}}" on the next push to main.
Removed PGP-key placeholders from SECURITY.md and .well-known/security.txt
instead of fabricating a fake fingerprint/URL: no PGP key is actually
published for this project.
Co-Authored-By: Claude Opus 5 <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.



Summary
bitfuckit was scaffolded from
rsr-template-repoand never instantiated: literal{{PLACEHOLDER}}tokens survived throughout, including in the.zigFFI sources — which meant the Zig genuinely did not parse (export fn {{project}}_init()etc.). This PR cures it for real, not just papers over it with packaging.Identity used throughout comes from the repo's actual registration in
reposystem/config/tools.ncl:role = utility,summary = "Ada/SPARK repository auditor (health, compliance, security posture)",status = extracted. No features beyond that description were invented.What changed
.github/community health files,.machine_readable/state and contractile files,container/packaging,.devcontainer/,docs/onboarding+status+attribution,examples/,Justfiletop variables.docs-template/, ADR/audit*-TEMPLATE.adoccopy-per-instance files,self-validating/examples/andtemplate-{hunt,kennel,yard}.k9.ncl(generic reusable scaffolding),machine-readable-design/(describes the RSR standard generically, not this repo).src/interface/ffi/):{{PROJECT}}/{{project}}→bitfuckitinmain.zig,build.zig,integration_test.zig. Also fixed three real pre-existing bugs the placeholder text had been masking:Handlewas declaredopaquebut had fields (illegal in Zig) → changed to a plainstructstd.heap.c_allocatorneeds explicit libc linking thatbuild.zignever wired up → switched topage_allocator(safe: this library only ever frees through its ownbitfuckit_free/bitfuckit_free_string)callconv(.C)is stale syntax under Zig 0.16 →callconv(.c)zig fmt --check src/interface/ffi→ exit 0,zig build→ exit 0,zig test src/main.zig→ exit 0 (3/3 tests),zig test test/integration_test.zig→ exit 0 (1/1)project/REPOvars fixed; everyecho "TODO"stub recipe either replaced with a real, verified command or deleted outright where nothing exists to back it (run,run-verbose,install— no build target exists yet;bench,readiness— no harness exists). Mirrored into.machine_readable/contractiles/Justfile, which a Dustfile invariant expects to match the root Justfile but had drifted even further out of sync..machine_readable/6a2/{STATE,ECOSYSTEM}.a2mland thecontractiles/*file.a2mlfamily previously asserted "this repository IS rsr-template-repo, the canonical template" — rewritten to describe bitfuckit's actual, honest state (ABI/FFI seam compiles and passes its own tests; no Ada/SPARK audit logic exists yet). Where inherited body content still describes the template's own concerns, it's flagged in-file rather than fabricated into fictional bitfuckit-specific content.scripts/validate-template.sh,tests/e2e/template_instantiation_test.sh,benches/template_bench.sh,.machine_readable/ai/PLACEHOLDERS.adoc. Verified none are invoked from workflows/Justfile/build/just/*.justbefore deleting..github/settings.ymllandmine fixed: unsubstitutedname: "{{REPO}}"would have made probot/settings try to rename the repo to the literal string{{REPO}}on the next push to main.SECURITY.md/.well-known/security.txt— no PGP key is actually published for this project.Test plan
zig fmt --check src/interface/ffi→ exit 0zig build(insrc/interface/ffi) → exit 0zig test src/main.zig→ exit 0, 3/3 passingzig test test/integration_test.zig→ exit 0, 1/1 passingjust build,just test,just fmt-check,just depsall run the intended real commands and pass.github/workflows/*.ymlfiles still parse as valid YAML{{[A-Z_]+}}/{{project}}/{{PROJECT}}tokens remain outside the deliberately-excluded generic template filesSTATE.a2ml/ECOSYSTEM.a2mlrewrite and the removed Justfile recipesNote:
just aspect(now wired to the realtests/aspect_tests.sh) currently fails on two pre-existing, unrelated issues documented indocs/status/TEST-NEEDS.adoc: a gitignored.zig-cachebuild artifact getting swept into the SPDX-header scan, and doc-prose substring matches for "sorry"/"Admitted" inverification/proofs/. Not fixed here — out of scope for an instantiation pass, and real script bugs rather than identity placeholders.Co-Authored-By: Claude Opus 5 noreply@anthropic.com