Skip to content

fix(codegen): parseable non-throwing Julia output; honest FFI relabel; Zig 0.13 build#48

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/axiom-jl-registry-infra-kr7t4a
Jul 1, 2026
Merged

fix(codegen): parseable non-throwing Julia output; honest FFI relabel; Zig 0.13 build#48
hyperpolymath merged 1 commit into
mainfrom
claude/axiom-jl-registry-infra-kr7t4a

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Closes three critical codegen defects that made generated Julia unparseable or throwing, brings the docs in line with what the tool actually does, and repairs the Zig 0.13 build. Part of the Axiom.jl flagship / registry-infrastructure hardening effort.

Changes

  • src/codegen/parser.rs (G30): extract_parenthesised_args tracked only () depth, so np.array([1,2,3]) emitted unparseable collect([1). Now tracks (), [], {}, and string-literal depth (escape-aware).
  • src/codegen/parser.rs (G31): any qualifier.func() with a local-variable qualifier (df.dropna(), result.to_csv()) was treated as a library call, so codegen emitted error("Unmapped call …") inside run_pipeline — the "drop-in" module threw on the first DataFrame call. Qualified calls now resolve only through the import-alias table; unresolved local qualifiers are skipped, not errored.
  • README.md / TOPOLOGY.md / 0-AI-MANIFEST.a2ml (G32): honest relabel — the operational pipeline is the Rust codegen; the Idris2 ABI + Zig FFI layer is scaffolding (not built by cargo, never dlopened). Unmeasured speedup claims hedged.
  • src/interface/ffi/build.zig (+ new include/julianiser.h, bench/bench.zig) (G33): fixed for Zig 0.13 (addInstallHeaderFile; version in addSharedLibrary; linkLibC); fixed an integration-test null comparison.
  • .gitignore: ignore Zig build cache/output.

RSR Quality Checklist

Required

  • Tests pass — cargo test 76 passed (was 59)
  • Linter clean — cargo clippy --all-targets --all-features -- -D warnings clean (note: cargo fmt --check not separately re-run in my verify; CI fmt gate will confirm)
  • No banned language patterns (Rust/Zig/C only)
  • No new unsafe blocks
  • No banned functions (believe_me/Admitted/sorry — Idris2 ABI files unchanged)
  • SPDX headers on both new files (julianiser.h, bench.zig) — verified
  • No secrets/credentials/.env

As Applicable

  • Documentation updated for user-facing changes (README/TOPOLOGY/0-AI-MANIFEST relabel)
  • TOPOLOGY.md updated
  • ABI/FFI validated — zig build test 7/7 + test-integration 20/20 from a clean cache; the ABI/FFI layer remains scaffolding (now labelled as such, not wired)
  • .machine_readable/STATE.a2ml — not updated (STATE reconciliation is a tracked residual)
  • CHANGELOG — pending

Testing

Independently re-verified (not self-graded by the worker):

  • cargo test → 76 pass (lib 33 + bin 33 + integration 9 + doctest 1), incl. the new test_local_method_calls_do_not_produce_unmapped_call_errors regression against examples/data-pipeline.
  • cargo build --release → ok. cargo clippy -D warnings → clean.
  • cd src/interface/ffi && rm -rf .zig-cache zig-out && zig build test → exit 0 (7/7; integration 20/20).

Residuals (tracked, not in this PR)

  • Actually wiring the Idris2-ABI/Zig-FFI into the Rust codegen path (large; G32 was the honest relabel only).
  • R multi-line %>% pipe parsing (G35); empty verification/ + src/{core,…} scaffolding (G36); Containerfile/guix placeholders (G37); STATE/CHANGELOG reconciliation.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UPFC9YQ7g9gc3VnRox42Q1


Generated by Claude Code

…; Zig 0.13 build

Closes three critical codegen defects plus the Zig build breakage.

- parser.rs: extract_parenthesised_args tracked only () depth, so
  np.array([1,2,3]) emitted unparseable `collect([1)`. Now tracks (), [], {}
  and string-literal depth (escape-aware). (G30)
- parser.rs: any qualifier.func() with a local-variable qualifier (df.dropna(),
  result.to_csv()) was treated as a library call and codegen emitted
  error("Unmapped call ...") inside run_pipeline -- so a "drop-in" module threw
  on the first DataFrame call. Qualified calls now resolve only through the
  import-alias table; unresolved local qualifiers are skipped, not errored. (G31)
- README/TOPOLOGY/0-AI-MANIFEST: relabelled honestly -- the operational pipeline
  is the Rust codegen; the Idris2 ABI + Zig FFI layer is scaffolding, not built
  by cargo nor dlopened by the CLI. Unmeasured speedup claims hedged. (G32)
- build.zig: fixed for Zig 0.13 (addInstallHeaderFile; version in
  addSharedLibrary; linkLibC); added missing include/julianiser.h and
  bench/bench.zig; fixed an integration test null comparison. (G33)
- Ignore Zig build cache/output.

Verified: cargo test 76 pass (was 59); cargo build --release ok; cargo clippy
clean; `zig build test` 7/7 + integration 20/20 from a clean cache.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UPFC9YQ7g9gc3VnRox42Q1
@hyperpolymath hyperpolymath marked this pull request as ready for review July 1, 2026 02:57
@hyperpolymath hyperpolymath merged commit 3c57147 into main Jul 1, 2026
6 checks passed
@hyperpolymath hyperpolymath deleted the claude/axiom-jl-registry-infra-kr7t4a branch July 1, 2026 02:57
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.

2 participants