ReviewOS

home-lang/home

Port native bun pm view and bun info registry metadata path

#72
Closed chris opened this 10 days ago ·
10 days ago

Tracks the native registry-metadata command slice split out from #66.

Current state:

  • The copied PmViewCommand type-checks through the shared package-manager utilities dispatcher.
  • packages/runtime/test/bun-corpus/cli/install/bun-info.test.ts reports 19/19, but the corpus harness currently models its registry responses in __home_spawn_bun_info_fixture; this does not validate native HTTP execution.
  • Temporarily routing home pm view and running home pm view is-number name against the real native command exits with status 133 before producing output. Under the system debugger the request remains stuck in the native HTTP path.
  • The route was intentionally not published, so users do not receive a command that appears available but traps.

Likely work:

  • finish the AsyncHTTP.initSync / sendSync integration used by pm_view_command.zig
  • verify registry scope/auth/proxy/TLS behavior
  • validate dist-tags, exact versions, semver ranges, scoped packages, property/index paths, JSON output, and npm error responses
  • replace or supplement the modeled corpus path with native execution coverage
  • expose both bun pm view and the direct bun info alias once native behavior is stable

Acceptance:

  • native bun-info.test.ts behavior is 19/19 without relying on the response fixture
  • direct smoke tests against the dummy registry cover text, JSON, property paths, and failures
  • build plus full home_test gate pass
  • #66 is updated with the landed commit and exact counts
10 days ago

Completed in fce7b7ab2.

Native acceptance is now met:

  • Exposed home pm view and the top-level home info alias through the ported package-manager implementation.
  • Corrected Home’s uSockets connect declaration to the current Bun ABI, including the optional local bind address arguments; this removed the native registry-request crash.
  • Fixed synchronous HTTP response ownership for Zig 0.17 by preserving caller-owned body bytes across terminal state reset instead of restoring a shallow pointer to poisoned storage.
  • Disconnected bun-info.test.ts from __home_spawn_bun_info_fixture, so the corpus now executes real Home subprocesses and native registry HTTP.
  • Added regression coverage for the current connect ABI and response-body preservation.

Validation:

  • ./zig-out/bin/home info is-number name → is-number
  • controlled-registry home pm view is-number repository.url → native property value
  • bun-info.test.ts: 19 passed, 0 failed, 0 unsupported, 0 todo (fixture-free)
  • ./pantry/.bin/zig build --summary failures passed
  • ./pantry/.bin/zig build test -Dfilter=home_test --summary failures passed
  • scoped bunx --bun pickier ... passed

Sign in to comment on this issue.