Skip to content

homebrew: browser framebuffer smoke harness; certify modeset + fbdoom (kd-k3l9)#817

Open
brandonpayton wants to merge 4 commits into
mainfrom
gascity/kd-1mr/kd-k3l9-browser-framebuffer-smoke
Open

homebrew: browser framebuffer smoke harness; certify modeset + fbdoom (kd-k3l9)#817
brandonpayton wants to merge 4 commits into
mainfrom
gascity/kd-1mr/kd-k3l9-browser-framebuffer-smoke

Conversation

@brandonpayton

Copy link
Copy Markdown
Member

What

Adds a browser framebuffer/device smoke harness and uses it to certify the two
rootfs/shell packages the terminal smoke (kd-1mr.5) could only skip -- so the full
12-package kd-0hns rootfs/shell tap is now browser_compatible (homebrew-validate: ok).

  • fbdoom -> /dev/fb0: boots the Homebrew keg + DOOM shareware IWAD, binds a
    640x400 framebuffer, pushes 1424 pixel-write frames (91 MB), 249k non-blank
    canvas pixels. CERTIFIED browser_compatible=true.
  • modeset -> /dev/dri/card0: 110 KMS page-flip commits at 1920x1080 via
    WebGL2 (CRTC 1). CERTIFIED browser_compatible=true.

Harness

  • scripts/homebrew-package-framebuffer-smoke.ts -- pours the Homebrew VFS (reusing
    planHomebrewVfs + buildHomebrewVfs), injects the IWAD for fbdoom, drives
    new-headless Chromium (chromium channel for WebGL2-in-worker), runs the program,
    asserts framebuffer/CRTC activity.
  • apps/browser-demos/pages/homebrew-fb-smoke/ -- boots the poured VFS with a PTY,
    then observes either /dev/fb0 writes (fbdoom, via FramebufferRegistry
    onChange/onWrite) or /dev/dri/card0 page-flip commits (modeset, via
    kmsAttachCanvas + a stats SAB, WebGL2 mode).
  • apps/browser-demos/vite.config.ts -- registers the homebrew-fb-smoke page input.

Two defects the harness solves: framebuffer programs query /dev/tty at keyboard
init and exit without a PTY (pty: true); and kmsAttachCanvas must run after
boot() (the worker doesn't exist before boot).

Verification

  • Framebuffer smoke: 5 pass / 0 fail / 0 skip (test-runs/kd-k3l9/fb-smoke/summary.json).
  • cargo xtask homebrew-validate --tap-root test-runs/kd-0hns/rootfs-shell-tap ->
    ok (packages=12, bottles=12, ...); all 12 packages browser_compatible=true.
  • homebrew-composite-status (browser): shell/browser and rootfs/browser no
    longer list modeset/fbdoom as blockers -- both now gated only on kd-1mr.4's
    bash/ncurses/curl/nethack. vim-browser-bundle/browser PASS.

Sidecars were regenerated via cargo xtask homebrew-sidecars (provenance shas
consistent); only browser_compatible + runtime_support changed, no bottle sha/url.

Stacking / review note

Stacks on kd-1mr.5 (which brought in the kd-v3fs browser tooling + certified the
10 terminal packages), which stacks on kd-0hns (#811) (the tap). Net kd-k3l9
contribution: the framebuffer harness (runner + page + vite input), the
modeset/fbdoom sidecar certification, and the evidence artifacts under
test-runs/kd-k3l9/. Suggested merge order: kd-0hns -> kd-v3fs -> kd-1mr.5 -> kd-k3l9.

See test-runs/kd-k3l9/DISPOSITION.md for full detail.

🤖 Generated with Claude Code

brandonpayton and others added 4 commits June 30, 2026 10:37
Repair the two defects that made the VFS rootfs/shell input sidecars
nonpublishable: an invalid fork_instrumentation="auto" and local-only
file:// bottle urls.

- scripts/homebrew-generate-sidecars-from-env.sh: package_fork_instrumentation()
  now emits only the sidecar schema enum (not-required/required/disabled/
  unknown), aggregated from per-output package.toml policies; the legacy
  "auto" placeholder and any unknown value can no longer reach a sidecar.
- packages/registry/{16 scoped}/package.toml: declare fork_instrumentation on
  each output (bash/dash/git/vim required; the rest not-required), matching
  whether build-<name>.sh applies wasm-fork-instrument to a forking binary.
- docs/homebrew-publishing.md: document the fork_instrumentation disposition
  values and the publishable https bottle-url requirement.
- test-runs/kd-0hns: regenerated sidecars with corrected fork disposition and
  canonical GHCR https urls. Combined 12-package rootfs/shell tap validates:
  `xtask homebrew-validate` -> packages=12 bottles=12 ok. Disposition and
  passed/failed/skipped outcome lists cover all 16 scoped packages.

Publishable (12/16): dash, git, vim, less, lsof, modeset, nano, netcat, wget,
fbdoom (repaired) + bzip2, xz (adopted pilot). Blocked (4/16, missing Homebrew
Formula): bash, ncurses, curl, nethack.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…r.5)

Run wasm32 in-browser smokes (Chromium/Playwright via BrowserKernel) for the
12 kd-0hns rootfs/shell packages and record the results in their Homebrew
sidecars.

Certified browser_compatible=true (10): dash, git, vim, less, lsof, nano,
netcat, wget, bzip2, xz -- each boots in-browser and passes a package smoke
(exit 0 + expected output). Sidecars regenerated via `cargo xtask
homebrew-sidecars` so provenance shas stay consistent; `homebrew-validate: ok`.

Skipped with reason_code (2): modeset (framebuffer-device-required, /dev/dri),
fbdoom (framebuffer-and-iwad-required, /dev/fb0) -- framebuffer/device programs
not certifiable via the non-interactive terminal smoke, mirroring the Node
framebuffer skips. Encoded as browserFormulaUnsupportedReason().

Effect: homebrew-composite-status browser tier no longer blocks on these 12
being browser_compatible=false; vim-browser-bundle/browser moves skip -> pass.
rootfs/browser now blocked only on bash+ncurses; shell/browser on
bash/ncurses/curl/nethack (kd-1mr.4) plus modeset/fbdoom (framebuffer follow-up).

Adds tailored browser smoke cases (dash/lsof/netcat) and the framebuffer skip
hook. Brings in the kd-v3fs browser tooling required to run the smokes
(browser-smoke/composite-status/smoke-cases/smoke-outcomes runners, the
homebrew-smoke demo page, vfs-planner); those dedupe when kd-v3fs merges.

Evidence under test-runs/kd-1mr.5/ (browser smoke 23 pass/0 fail/2 skip;
composite-status; DISPOSITION.md).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… (kd-k3l9)

Adds a browser framebuffer/device smoke harness and uses it to certify the two
rootfs/shell packages the terminal smoke (kd-1mr.5) could only skip, so the full
12-package kd-0hns rootfs/shell tap is now browser_compatible (homebrew-validate: ok).

Harness:
- scripts/homebrew-package-framebuffer-smoke.ts: pours the Homebrew VFS, injects
  the DOOM shareware IWAD for fbdoom, drives new-headless Chromium (WebGL2), runs
  the program, and asserts framebuffer/CRTC activity.
- apps/browser-demos/pages/homebrew-fb-smoke/: boots the poured VFS with a PTY
  (framebuffer programs query /dev/tty and exit without one) and observes either
  /dev/fb0 writes (fbdoom, via FramebufferRegistry) or /dev/dri/card0 page-flip
  commits (modeset, via kmsAttachCanvas + a stats SAB, WebGL2 mode).

Certified browser_compatible=true:
- fbdoom  -> /dev/fb0: bound 640x400, 1424 pixel-write frames, 249k non-blank px.
- modeset -> /dev/dri/card0: 110 KMS page-flip commits at 1920x1080 via WebGL2.

Sidecars regenerated via cargo xtask homebrew-sidecars (provenance shas consistent).
Effect: modeset/fbdoom removed as shell/browser blockers; shell/browser now gated
only on kd-1mr.4's bash/ncurses/curl/nethack.

Evidence under test-runs/kd-k3l9/ (fb smoke 5 pass/0 fail; composite-status; DISPOSITION.md).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Phase B-1 matrix build status — pr-817-staging

ABI v16. 36 built, 6 failed, 42 total.

Package Arch Status Sha
libcurl wasm32 failed
libcxx wasm32 built 309bed52
libcxx wasm64 built 97469b49
libpng wasm32 built da19660c
libxml2 wasm32 failed
libxml2 wasm64 failed
openssl wasm32 built 7147c05c
openssl wasm64 built b6a3f9b1
sqlite wasm32 built 29fd8435
sqlite wasm64 built 5e9ff2df
zlib wasm32 built 90cf6353
zlib wasm64 built 64f7dfc9
bc wasm32 built de85184a
coreutils wasm32 built 27ddf559
diffutils wasm32 built 5f6c2432
dinit wasm32 built a31a9b89
file wasm32 built 54db045a
findutils wasm32 built 8c37f324
gawk wasm32 built 28cac8a6
grep wasm32 failed
gzip wasm32 built 54a71b67
hello wasm32 built 2c152ee8
kandelo-sdk wasm32 built 27ae1cb3
kernel wasm32 built b0cf812f
m4 wasm32 built b2e8d996
make wasm32 failed
mariadb wasm32 built 76b7be27
mariadb wasm64 built 8d87af85
msmtpd wasm32 built 5dec8fca
nginx wasm32 built 11e38a46
php wasm32 failed
posix-utils-lite wasm32 built 7e291a98
sed wasm32 built b5c5f32b
spidermonkey wasm32 built 49ef9232
tar wasm32 built b38257d8
tcl wasm32 built 599fd76a
unzip wasm32 built 01f2d4d4
userspace wasm32 built 355492ee
zip wasm32 built 1e0b11f2
zstd wasm32 built 6a8c2f1f
node wasm32 built 3210297a
spidermonkey-node wasm32 built fa666ecc

Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant