Tracks the remaining YAML block-scalar sub-gap from #66 after #708.
Baseline
Pinned Bun passes yaml-block-scalar-matrix.test.ts 1084/1084. Current Home passes 941 and fails 143. The failures cluster around folded transitions adjacent to more-indented lines and whitespace-only Keep-chomp inputs.
Root cause
Home still carries the old Zig state machine after the explicit-indent and EOF-chomp ports. Bun live Rust additionally:
- tracks previous/current more-indented content lines so folded breaks are preserved around them;
- retains leading whitespace-only line counts until chomping;
- consumes only
content_indentspaces per body line so additional spaces remain content; - precomputes
max(content_indent, parent_indent + 1)for body membership; - requires true line start for document markers and treats EOF as valid for
isAnyOrEofAt.
Port and verification
The live behavior is translated into packages/runtime/src/parsers/yaml.zig with direct regressions for folded more-indented lines, empty Keep chomping, and explicit-indent whitespace content.
Completed checks:
zig ast-checkpasses.git diff --checkpasses.- A real compile with the Home module graph and binary emission disabled passes semantic type-checking at 544 MB.
Pending check:
- Run the three native regressions and the full 1084-case matrix from a fresh runtime binary. LLVM and self-hosted code generation both crossed the fixed memory guard; the guard was not raised.