fix(api): the public module compiles again, and a guard keeps it that way - #101
Merged
Conversation
… 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>
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.
The number-audit sweep (docs/AUDIT_2026-08-20.md — 85 claims, ~22 mismatch clusters,
adversarially verified) found that
@import("golden-float")cannot compile: nothingin 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