Skip to content

fix(site): align hosted native smoke and wasm with protocol 0.9 - #694

Merged
phall1 merged 1 commit into
mainfrom
cursor/fix-site-native-hello-019e
Sep 15, 2026
Merged

phall1 merged 1 commit into
mainfrom
cursor/fix-site-native-hello-019e

Conversation

@phall1

@phall1 phall1 commented Sep 15, 2026

Copy link
Copy Markdown
Member

Cause

site-deploy-worker failed on main after #689:

  • Run: https://github.com/no-phux/phux/actions/runs/34957405348
  • SHA: 60b63a9 (fix(site): pin hosted native phux to workspace 0.37.0)
  • Deploy + container rollout succeeded; live /healthz stayed OK
  • Smoke died in ~2s at smoke-native.ts:170: native websocket closed before verification code=1000

This is the HELLO mismatch #689 warned about, confirmed from logs + wire bytes:

  • Native image now builds phux 0.37.0 / protocol 0.9 (worker/Dockerfile)
  • Smoke still sent a protocol 0.2 HELLO (phux-tui/test, protocol_minor=2) and ATTACH on open
  • Committed browser wasm was the protocol-0.5 start_hosted backport (fe1f9563)
  • Committed edge wasm still answered ATTACH with 0.5-style snapshots and ignored HELLO
  • phux-server requires major.minor match; mismatch → ERROR + close, relayed as WS 1000

--exercise-fallback uses the same HELLO for native then edge, so smoke, edge, and the hosted browser client all had to move to 0.9 together. Native image pin is unchanged.

Fix

Surgical protocol alignment only. No architecture rewrite. Does not touch release #655.

  • Smoke HELLO/ATTACH goldens are protocol 0.9 (ClientCapabilities::new(), CreateIfMissing name=default). Smoke waits for the session envelope, then HELLO_OK, then ATTACH. Parses RESOURCE_OUTPUT and BootstrapChunk. Fails on ERROR.
  • phux-edge depends on in-tree phux-protocol 0.37.0 and speaks 0.9 HELLO_OK + READY-fenced bootstrap (greeting in BootstrapChunk).
  • In-repo clients/phux-web grows start_hosted (wait for phux.session.v1 text, then HELLO). Committed site wasm rebuilt from this checkout instead of the 0.5 pin.
  • build-client.sh builds from this repo.

How to verify

Local (already run on this branch):

RUSTFLAGS='' cargo test --manifest-path docs/site/edge/Cargo.toml
cd docs/site && bun run test && bun run worker:check

137 site tests pass; 11 edge tests pass, including HELLO 0.9 and smoke-byte lockstep.

Production path: merge to main retriggers both deploys.

  • site-deploy-worker (paths include docs/site/worker/**, docs/site/edge/**, phux-wire.ts, smoke-native.ts) redeploys Worker + edge wasm and re-runs worker:smoke-fallback
  • site-deploy (docs/**) republishes the 0.9 browser wasm so the live demo matches native

Native container image is unchanged from #689; only Worker/edge/smoke/browser wasm move. After merge, the site-deploy-worker smoke step is the live confirmation. No Cloudflare secrets were required for this in-repo fix.

Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

#689 pinned the native image to workspace 0.37.0 (protocol 0.9). Site
smoke and the committed browser/edge wasm still spoke protocol 0.2/0.5,
so native HELLO failed and the worker relayed websocket close 1000
(run 34957405348).

Rebuild in-repo phux-web with start_hosted, rebuild phux-edge for 0.9
HELLO_OK plus READY-fenced bootstrap, and teach smoke to wait for
HELLO_OK before ATTACH. Native image pin is unchanged.

Co-authored-by: phall <phall1@users.noreply.github.com>
@phall1
phall1 merged commit 38cba9c into main Sep 15, 2026
14 of 15 checks passed
@phall1
phall1 deleted the cursor/fix-site-native-hello-019e branch September 15, 2026 11:49
@linear-code

linear-code Bot commented Sep 15, 2026

Copy link
Copy Markdown

PHA-453

@phux-release-bot phux-release-bot Bot mentioned this pull request Sep 15, 2026
phall1 added a commit that referenced this pull request Sep 15, 2026
#694 restored protocol 0.9 smoke/wasm, then merged onto #655's 0.38.0
release. site-deploy-worker validate requires Dockerfile PHUX_VERSION
to match workspace.package.version, so the 0.37.0 pin failed before
smoke ran (run 34965350011).

Point the native archive at the 0.38.0 release commit. Protocol remains
0.9; this is the same pin policy as #689, not a rollback and not a
change to #655 itself.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: phall <phall1@users.noreply.github.com>
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.

2 participants