ReviewOS

home-lang/home

Support glob-expanded HTML entries in the Bun CLI

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

Goal

Implement Bun-compatible shell/glob expansion for HTML CLI entry arguments so the unchanged test/js/bun/http/bun-serve-html-entry.test.ts suite passes in Home.

This is a focused child of #202 and contributes to #66.

Current evidence

At Home 951c86eb4 with Bun source pin 4982b91e3702094330f3be3883354c52b8c01323, the exact upstream suite reports 5 pass / 1 fail / 56 assertions.

The only failure is bun *.html: Home treats *.html as a literal path and reports File not found "*.html", so the test cannot discover the server URL. The following contracts already pass unchanged:

  • single HTML entry
  • multiple explicit HTML entries and route listing
  • static asset Content-Type headers
  • SVG Content-Type
  • importing bun:main from an HTML-entry preload

Acceptance criteria

  • Expand matching HTML entry globs with Bun-compatible cwd and ordering semantics.
  • Preserve literal/missing-path errors when a pattern does not match according to Bun behavior.
  • Run the vendored upstream suite unchanged: 6 pass, 0 fail.
  • Do not rewrite the test, weaken its assertions, or shell out to Bun.
  • Remove the Bun HTML entry subprocess server whole-file TODO only after the exact native and corpus gates pass.
9 days ago

Strict unchanged-suite baseline from Home 951c86eb4: 5 pass / 1 fail / 56 assertions. The one failure is the literal File not found "*.html" path; all explicit-entry, content-type, multi-route, and preload cases pass.

9 days ago

Completed on main in 010a6d8.\n\nHome now preserves an unresolved HTML glob for the native VM HTML bundler, matching Bun current behavior instead of rejecting the literal glob during package/binary preflight.\n\nValidation used the exact untouched Bun fixture at pinned Bun SHA 4982b91. The full bun-serve-html-entry suite passed twice consecutively: 6 pass, 0 fail, 91 assertions each run, including /, /about, and /contact routing. The copied fixture remains byte-identical to Bun.

Sign in to comment on this issue.