ReviewOS

home-lang/home

Generator ABI gate: resolve test-context spawn EBADF and missing child captures

#865
Closed chris opened this 9 days ago ·
9 days ago

Follow-up to #66. The filesystem/process source checkpoint 482ea58d2 passes all 499 selected original runtime entries and six native regression groups. Its generator/ABI gate remains red because the host's child-process capture fails inside bun:test.

The installed Bun 1.3.14 returns empty stdout/stderr for successful and failing spawned commands inside a minimal test. The selected Bun 1.4 artifact reports EBADF from posix_spawn for /bin/sh, with stdin ignore/inherit/pipe; parent descriptors 0, 1 and 2 are valid. The same standalone invocations capture bytes and print the expected ABI rejection. Debugger-paced file-action calls capture the expected output, but are diagnostic evidence, not passing gate credit. NODE_ENV=test and a PTY do not resolve the control failure.

The latest ABI rerun reports 9 passing / 61 failing tests; assertions requiring actual rejection diagnostics remain unchanged. Do not replace missing output with expected strings, omit negative cases, add retries/delays, or call the gate green on exit status alone. Trace descriptor ownership and spawn/capture state, implement the actual missing behavior, then rerun the complete generator/ABI gate and its native controls.

Retained minimal controls, direct rejection, debugger traces and failures. Full Bun parity remains incomplete under #66.

9 days ago

Resolved the native Home gate in source f5173883a. Broad test discovery retained directory handles; Darwin rejects posix_spawn file-action descriptors above 10,239 despite the raised NOFILE limit. Relative test arguments scan the tree; absolute file arguments avoid that scan, explaining the earlier launch-context observations. The saved parent fails the new 11,000-directory control with EBADF.

Home discovery now queues paths and closes directory handles after reading. Symlink classification avoids retaining handles. Per-read iterator state and explicit cache-hit traversal preserve repeated/overlapping root discovery without running selected tests twice. Filters, excludes, original assertions and deadlines remain unchanged.

The original relative-path generator/ABI invocation in Home passes all 70 tests / 1,158 assertions, with real child output and rejection diagnostics. All seven native groups pass, including the 11,000-directory regression, symlink/cached-root controls and 13 IPC controls. Three unchanged original CLI suites validate 16 registered passes, zero failures, no skips/TODOs. Debug build 33/33, peak 5,684 MB under 8,192 MB; final tests 545 MB under 3,840 MB. Targeted Pickier and Zig formatting pass.

All 58 committed archives verify; three final reports restore and validate. The failed parent, earlier relative-path ABI failures and absolute-path diagnostic control are retained. External Bun binaries were not rebuilt by this Home fix. Full parity remains open under #66.

Sign in to comment on this issue.