Repository navigation
t27b lane 5: module vars that hold a string or start undefined #7448
Copy link
Copy link
Closed
Labels
Description
Part of #6063 (t27b coverage, lane 5).
Two specs are refused by t27b on a module-level var that the reference runs:
specs/boards/xc7a100t_minimal.t27: blocked onVarDecl(module, pointer/str/slice). A module var whose type holds astr(astr, a struct with astrfield, an array of such structs). gen-zig prints a container-levelvarwith a compile-time initializer, so every test starts from that value. t27b keeps module memory in a writable data image, which cannot hold a string's address before the program is loaded.specs/vsa/similarity_search.t27: blocked onVarDecl(module, undefined). A module var declared= undefined. Zig's Debug build, whicht27c test-reportuses, fills it with 0xAA bytes. This was measured with zig 0.15 on the t27b lab.
Plan:
- t27b fills an
undefinedmodule var with 0xAA bytes. - A string-holding module var gets a prologue at the start of every test, invariant and bench that writes its initial value. This matches the reference, where each test runs in a fresh process.
- A module var of a pointer or slice type is still refused, as is a string-holding var declared
undefined. - Conformance specs are written first and each must pass
t27c test-reportwith nonzero runtime asserts:specs/tri/t27b/conformance/str_module_var.t27;specs/tri/t27b/conformance/undefined_module_var.t27.
Done when:
xc7a100t_minimal.t27passes in t27b the way it passes in the reference.similarity_search.t27moves on to its next blocker, which belongs to another lane.- The corpus ratchet on the t27b lab shows 0 UNEXPECTED FAILURE.
- The change fits the foreign-line budget of Only-t27 gate: a foreign-line budget the label cannot lift; local hook reads exceptions from origin/master #7371.
Boundary
specs/boards/xc7a100t_minimal.t27specs/tri/t27b/conformance/str_module_var.t27specs/tri/t27b/conformance/undefined_module_var.t27specs/vsa/similarity_search.t27
User Scenarios
- Given a module-level
varthat holds astr(or a struct/array containing astr), when the spec is compiled with t27b and run undert27c test-report, then the variable is initialized to its declared value at the start of every test, invariant, and bench, matching the reference behavior where each test runs in a fresh process. - Given a module-level
vardeclared= undefined, when the spec is compiled with t27b and run undert27c test-report(Zig Debug build), then the variable's memory is filled with 0xAA bytes, matching the reference behavior.
Requirements
- FR-001: t27b MUST emit a per-test prologue that writes the compile-time initializer into every module-level
varwhose type transitively holds astr, for all tests, invariants, and benches. - FR-002: t27b MUST fill module-level
vardeclared= undefinedwith 0xAA bytes in the writable data image. - FR-003: t27b MUST continue to refuse module-level
varof pointer or slice type, and string-holdingvardeclared= undefined. - FR-004: Conformance specs
specs/tri/t27b/conformance/str_module_var.t27andspecs/tri/t27b/conformance/undefined_module_var.t27MUST be added and MUST passt27c test-reportwith nonzero runtime asserts.
Success Criteria
t27c test-report specs/boards/xc7a100t_minimal.t27exits withexit 0and the spec passes in t27b the same way it passes in the reference.t27c test-report specs/vsa/similarity_search.t27exits withexit 0and the spec advances past theVarDecl(module, undefined)blocker (next blocker belongs to another lane).t27c test-report specs/tri/t27b/conformance/str_module_var.t27exits withexit 0and reports at least 1 runtime assert.t27c test-report specs/tri/t27b/conformance/undefined_module_var.t27exits withexit 0and reports at least 1 runtime assert.- The t27b lab corpus ratchet shows 0 UNEXPECTED FAILURE across all specs.
Reactions are currently unavailable
Activity
t27b fixture: write every undefined module var before reading it (Refs …
NOW: the undefined fill has no portable reference verdict (Refs #7448)
Merge t27b-lane5-module-vars into origin/master (Refs #7448)
gHashTag commentedon Oct 7, 2026
Reopened 2026-10-07: the bulk close of issues without a
## Boundarysection was reverted by the owner. Nothing to do here; this comment replaces the earlier close notice.Merge t27b-lane5-module-vars into origin/master (from master's side, …
Merge t27b-lane5-module-vars into master 927b1ef (from master's side)
Merge t27b-lane5-module-vars into master b8cb93f (from master's side)
Merge t27b-lane5-module-vars into master 01de65c (from master's side)
Merge t27b-lane5-module-vars into master 579bc55 (from master's side)
t27b: module vars that hold a string or start undefined (Closes #7448) (
Merge claude/t27b-lencall-7524 into master 1f2448e (from master's side)
Merge t27b-lane5-test-shadow into master 1f2448e (from master's side)
Merge master 1f2448e into the #7765 lane, keeping both sides (Closes #…
Merge master 4d7d2d3 into the #7765 lane, keeping both sides (Closes #…