Skip to content

Latest commit

 

History

History
108 lines (84 loc) · 5.41 KB

content-verification.md

File metadata and controls

108 lines (84 loc) · 5.41 KB

Guide content verification

Initial guide verification ran on 2026-09-19 with Zig 0.16.0. The focused probe tables below were refreshed after subsequent compiler repairs, while the example-suite run reflects the earlier 43-example snapshot. Because the checkout had uncommitted edits, these results describe that working tree rather than an immutable release tag.

Source review

Guide claims were checked against README.md, docs/RELEASE.md, docs/STATUS.md, a7/cli.py, a7/compile.py, the stdlib registry, call validation in a7/passes/type_checker.py, Zig lowering, example filenames, tour and generic sources, and golden output fixtures.

Release commands use subshells for site/ steps so the caller stays in the repository root. Bun is only required for website contributors. The guides separate compiler acceptance from Zig build/run execution and expected stdout fixtures from test pass claims.

Native example verification

Run from site/:

uv run python ../scripts/verify_examples_e2e.py --json-report docs/examples-verification.json

Result at that snapshot: exit 0, Examples verified: 43/43 (A7 compile, Zig AST check, native build, native run, and golden stdout comparison, including hello, tour, generics, and math examples). See the JSON report.

Focused stdlib and CLI probes

Reproduce from the repository root:

uv run python site/docs/verify-content.py

The script asserts compile stages and native stdout, including repaired escaped braces and signed math.abs typing. Full results are stored in content-probes.json; temporary build directories are cleaned up after each run.

Probe A7 result Native result or diagnostic
All eleven math calls with ordinary inputs exit 0 exit 0; stdout 2 4 1 2 0 1 0 0 1 2 3 plus newline
print, println, eprintln, including empty calls exit 0 exit 0; expected stdout and stderr output
math.sqrt(4) exit 6 Integer argument rejected; requires f32 or f64
Nonliteral io format string exit 6 Format string literal restriction
Placeholder with missing argument exit 6 Wrong argument count
math.sqrt_f64(4.0) exit 6 Unknown stdlib call
io.println("{{}}") exit 0 exit 0; stdout {} plus newline
fn(x: i32) i32 returning math.abs(x) exit 0 exit 0; stdout 4 plus newline for input -4
All six CLI modes on hello exit 0 JSON status ok, schema 2.0 at probe time (current CLI emits 3.0 per a7/compile.py), stage and artifact fields checked

Escaped-brace and signed math.abs failures from the earlier audit are fixed for these cases; minimum signed integer abs remains unqualified. Mode probes confirm pipeline writes no default file, compile emits .zig, and doc writes .md.

Limits

The math probe runs one ordinary input per function and does not cover all numeric types, domain edges, non-finite floats, overflow cases, or general signed-integer abs composition. This report does not establish browser, accessibility, deployment, or release-gate passes.

Independent reference audit

A second review audited all twelve language reference pages. Function types and callbacks, C-style loops, labeled breaks and continues, match alternatives and ranges, match expressions with captures, fall, arrays, slice lengths, string slicing, and generic constraints have concrete examples and evidence links.

Reproduce the reference probes from the repository root:

uv run python site/docs/verify-reference-content.py

Sources and outputs are recorded in reference-probes.json:

Probe Result
Raw function type, alias, callback argument A7 exit 0, Zig run exit 0, stdout 11 11
Non-final match case ending in fall A7 exit 0, Zig run exit 0, stdout lines one and two
Match expression with capture A7 exit 0, Zig run exit 0, stdout 5
Literal, alternative, and range match patterns A7 exit 0, Zig run exit 0, stdout range
Slice indexing/length, fixed-array addition, character-slice iteration A7 exit 0, Zig run exit 0, stdout lines 20 2, 4 6, A 1
Zero-initialized fixed array and nested array literal A7 exit 0, Zig run exit 0, stdout 0 3
Direct string.len access Historical (2026-09-19): A7 exit 6, field access on non-struct string (later enabled via L81 as read-only usize byte length)
Scalar-fill fixed-array initialization A7 exit 6, array/scalar type mismatch
Top-level local @type_set alias Historical (2026-09-19): A7 exit 7, unsupported TYPE_SET codegen node (later repaired; compile-time aliases now emit no Zig in test/test_type_set_aliases.py)
Predefined Numeric generic constraint A7 exit 0, Zig run exit 0, stdout 42
Inline @type_set(i32, i64) generic constraint A7 exit 0, Zig run exit 0, stdout 42

At that 2026-09-19 snapshot, scalar-fill arrays and direct string.len were rejected and removed from the reference pages; decision L81 later enabled read-only string.len while scalar-fill arrays remain rejected. At the time of this audit, local @type_set aliases failed codegen while predefined and inline constraints worked; a later compiler fix resolved @type_set aliases (test/test_type_set_aliases.py).

python3 scripts/check_docs_style.py passed after those edits, and local links in the guides were checked against Markdown targets and repository files.