ReviewOS

home-lang/home

Native CLI: verify config boundaries and help across platforms

#517
Open chris opened this 9 days ago ·
9 days ago

Published Darwin checkpoint

Published 828ecc729 on codex/runtime-port as Chris Breuer, sole author and committer with no coauthor trailer. Not merged to main.

The outer dispatcher now uses required/repeated versus optional flag metadata consistently, preserves optional-config entrypoints, honors -- and post-entry arguments, and displays native help for bare config. No clap implementation or upstream assertions changed. All 21 controlled boundary cases match pinned Bun on status, entry/argument selection and config diagnostic behavior; exact help formatting is not claimed.

The expanded existing native regression passes normally and with VM destruction/JSC checks; the published parent fails its new selection assertion. Complete unchanged suites: bun-run 291/291 / 416 assertions, native hard-link-PATH bunx 33 pass / 1 Windows-only skip / 0 fail / 161 assertions, workspaces 58/58 / 192 assertions, eval 33/33 / 70 assertions. Eval also passes in pinned Bun after Home installs the missing declared React 18.3.1 dependency into an isolated directory and links the manifest's expected local dependency location. No upstream source changed.

Build 17/17; units 1,820 pass / 19 skip / 0 fail (19/19 steps); regression commands 56/56, including 25 native files, full spawn and child-process. All 35 measured upstream source files match pin 4982b91e3702094330f3be3883354c52b8c01323. Generated bunx fixture bytes are archived and restored after normalized-content verification. Scoped lint/format/whitespace checks pass.

The unchanged tsconfig-override file remains 5 pass / 1 fail / 14 assertions in published parent and candidate versus pinned Bun's 6/6 / 17 assertions. Its auto-install 404 diagnostic mismatch is tracked separately in #525; one earlier transient pass is not stable parity. Shared Darwin checkout only; unrelated compiler edits excluded. Other platforms, exact help rendering, branch integration, and full source/runtime parity remain open. Skips/TODOs are not completed parity; #66 remains incomplete.

Evidence: zig-out/config-publication1.json, config-boundary-{parent-control,candidate1}.json, config-native-{parent,candidate1-corrected,destruction}.json, config-build{1,2}.{log,json}, config-unit1.{log,json}, config-regression1s.json, package-wide-config-candidate1.json, filter-corpus-config-candidate1.json, bunx-corpus-config-candidate1.json, config-wide-{parent,candidate1,release-control}-declared-deps.json, and config-source-integrity1.json.

Original diagnosis

Follow-up to #66 and #508, found while verifying native entrypoint diagnostics at Bun source pin 4982b91e3702094330f3be3883354c52b8c01323.

Home's outer CLI target scanner treats --config and -c as flags requiring a following value. The pinned clap schema declares the config value optional. Its long-option parser accepts an attached --config=PATH; a separate following token remains positional. The short-option optional-value path does not consume -c=PATH either. The outer Home scanner and the parsed native context can therefore select different entrypoints.

Reproducer: a directory containing bunfig.toml with logLevel = "debug", quiet.toml with logLevel = "error", a tsconfig extending a missing file, and an index.js that prints debug-entry.

  • --config=quiet.toml ./index.js: Home and the local Bun release control both print debug-entry and no diagnostic.
  • --config quiet.toml ./index.js and -c quiet.toml ./index.js: Home executes index.js; the Bun control does not print its marker. Both emit the debug diagnostic from the default config.
  • -c=quiet.toml ./index.js: both use the default debug config. It must not be used as a quiet-mode test.

The local release reports 1.4.0-canary.1+4982b91e3; that version string is a control identifier, not a standalone provenance guarantee. The parser behavior is also visible in the exact pin's schema and in Home's packages/runtime/src/clap/streaming.zig.

Align the outer dispatcher with the parsed command context (or share flag-value metadata), preserving script argument boundaries and native identity. Add regressions for implicit and explicit run, attached/separate/absent optional values, --, and arguments after the entrypoint. Do not fix this by changing Bun's test assertions or passing execution to an installed runtime.

Evidence: zig-out/entrypoint-config-control.json and entrypoint-config2-control.json. This is additional CLI scope beyond the four remaining failures in the unchanged 291-case bun-run.test.ts file. Darwin control only; other platforms and full CLI parity remain unverified.

Resolver and initialization follow-up

9b3a5c1ad publishes #525: unchanged tsconfig-override now passes 6/6 and resolver passes 39 tests (2 skips, 1 TODO), with repeated native initialization errors catchable. Bun-run remains 291/291, bunx retains 33 passes plus the Windows skip, and all 21 config controls still match. #526 separately tracks the reproduced EOF-delimited registry-response pending-task assertion; it remains unfixed in this candidate. See #66 for full verification and platform/integration limits.

9 days ago

Published 828ecc729 on codex/runtime-port as Chris Breuer, sole author and committer with no coauthor trailer. Not merged to main.

The outer dispatcher now uses required/repeated versus optional flag metadata consistently, preserves optional-config entrypoints, honors -- and post-entry arguments, and displays native help for bare config. No clap implementation or upstream assertions changed. All 21 controlled boundary cases match pinned Bun on status, entry/argument selection and config diagnostic behavior; exact help formatting is not claimed.

The expanded existing native regression passes normally and with VM destruction/JSC checks; the published parent fails its new selection assertion. Complete unchanged suites: bun-run 291/291 / 416 assertions, native hard-link-PATH bunx 33 pass / 1 Windows-only skip / 0 fail / 161 assertions, workspaces 58/58 / 192 assertions, eval 33/33 / 70 assertions. Eval also passes in pinned Bun after Home installs the missing declared React 18.3.1 dependency into an isolated directory and links the manifest's expected local dependency location. No upstream source changed.

Build 17/17; units 1,820 pass / 19 skip / 0 fail (19/19 steps); regression commands 56/56, including 25 native files, full spawn and child-process. All 35 measured upstream source files match pin 4982b91e3702094330f3be3883354c52b8c01323. Generated bunx fixture bytes are archived and restored after normalized-content verification. Scoped lint/format/whitespace checks pass.

The unchanged tsconfig-override file remains 5 pass / 1 fail / 14 assertions in published parent and candidate versus pinned Bun's 6/6 / 17 assertions. Its auto-install 404 diagnostic mismatch is tracked separately in #525; one earlier transient pass is not stable parity. Shared Darwin checkout only; unrelated compiler edits excluded. Other platforms, exact help rendering, branch integration, and full source/runtime parity remain open. Skips/TODOs are not completed parity; #66 remains incomplete.

Evidence: zig-out/config-publication1.json, config-boundary-{parent-control,candidate1}.json, config-native-{parent,candidate1-corrected,destruction}.json, config-build{1,2}.{log,json}, config-unit1.{log,json}, config-regression1s.json, package-wide-config-candidate1.json, filter-corpus-config-candidate1.json, bunx-corpus-config-candidate1.json, config-wide-{parent,candidate1,release-control}-declared-deps.json, and config-source-integrity1.json.

Sign in to comment on this issue.