Skip to content

fix(api): the public module compiles again, and a guard keeps it that way - #101

Merged
gHashTag merged 3 commits into
mainfrom
fix/public-api-audit
Aug 19, 2026
Merged

fix(api): the public module compiles again, and a guard keeps it that way#101
gHashTag merged 3 commits into
mainfrom
fix/public-api-audit

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

The number-audit sweep (docs/AUDIT_2026-08-20.md — 85 claims, ~22 mismatch clusters,
adversarially verified) found that @import("golden-float") cannot compile: nothing
in CI compiles src/root.zig, so 13 broken import paths shipped invisibly, plus a
second layer under them (4 wrong-directory hybrid.zig imports, and math/constants.zig
re-exporting from a "canonical source" that exists nowhere in the repo).

This PR fixes the compile break only, adds a root-api guard to zig build test
(root.zig now compiles as part of the suite), fixes README's module name, and lands
the audit report. The report's remaining findings (README ranges, RNE claims,
whitepaper contradictions, unrecorded benchmark figures) are documentation-level and
left for a follow-up. Suite: green including the new guard; the README Quick Start
verified to compile as an external consumer.

🤖 Generated with Claude Code

gHashTag and others added 2 commits August 20, 2026 00:27
… way

Nothing compiled src/root.zig -- no test step reaches it -- so thirteen
import paths broken by a directory move shipped invisibly: every consumer
of @import("golden-float") failed while the suite stayed green. Fixed the
thirteen, plus the second layer the new guard exposed: four files
importing hybrid.zig from the wrong directory and math/constants.zig
re-exporting from a 'canonical source' (sacred/constants.zig) that exists
nowhere in the repository. build.zig now compiles root.zig as part of
'zig build test' (root-api guard); README's Quick Start named the module
golden_float where build.zig registers golden-float -- fixed, and the
example is now verified to compile as an external consumer.

Full numeric audit that found this (85 claims, ~22 mismatch clusters,
adversarially verified): docs/AUDIT_2026-08-20.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…now proves it

Merging main brought the parallel train's own guard (refAllDeclsRecursive,
an API zig 0.16 no longer has -- ported to refAllDecls) and its reference
depth exposed the third layer: modules nothing had ever compiled carried
pre-0.16 std APIs. Ported mechanically: ArrayList init .{} -> .empty
(jit_arm64/x86_64/vsa_jit), std.time.Timer / nanoTimestamp / timestamp ->
a libc monotonic-clock helper or fixed PRNG seeds (packed_vsa, 10k_vsa,
jit_arm64, jit_unified, vsa_jit, hrr -- std.crypto.random is also gone),
std.posix.PROT decl-constants -> the 0.16 packed-struct flags, mprotect ->
std.c.mprotect, and one runtime @vector index -> array coercion (bigint).
Suite green including both guards; the README consumer example compiles.
Mutation check: a deliberately broken deep import fails the suite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… manifest declares

The 0.16 ports broke the build on zig 0.15.2, which is what CI runs and
what build.zig.zon declares as the minimum: PROT flags are decl-constants
there (a packed struct on 0.16), std.posix.mprotect still exists, and
std.time.nanoTimestamp had not left std yet. Both paths now compile behind
a comptime-known zig_version check, which Zig resolves without analysing
the untaken branch — so 0.15.2 never sees std.c and needs no libc link.

Verified green on 0.16 locally. 0.15.2 is CI-verified only: it does not
link on this macOS (that is why development moved to 0.16), so CI is the
sole instrument for it and this commit trusts it deliberately.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gHashTag
gHashTag merged commit f8c033f into main Aug 19, 2026
6 of 8 checks passed
@gHashTag
gHashTag deleted the fix/public-api-audit branch August 19, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant