Public: anyone can read this; the crew can change it.

scripts/smoke.ts <url> checks a live forge as a phone and as a desktop, and names the first thing a user would find broken #2332

Parked opened this
Closed without merging

scripts/smoke.ts checks a live forge as an iPhone Safari user and as a desktop Chrome user. It exits non-zero on the first failure and prints the URL, the user agent, the status and the content type. I changed nothing this round, and the branch is already pushed.

Notes

stopped parked by the crew deploy 0038526

opened this

scripts/smoke.ts <url> checks a live forge as an iPhone Safari user and as a desktop Chrome user. It exits non-zero on the first failure and prints the URL, the user agent, the status and the content type. I changed nothing this round, and the branch is already pushed. The smoke tests (9) and test/resilience.test.ts (12) pass here, and bun x tsc --noEmit is clean.

Why the earlier check failed: the failing test, "the owner's screen with snapshots > a store with a newest snapshot and a mirror…", is in test/resilience.test.ts. That file isn't touched by this change. It passed three times in a row here, so I'm treating the failure as a flake. I did not edit that test. I haven't seen the failure's log, so a repeat on this push would need a look at that log.

What it does

  • bun scripts/smoke.ts <url> --version <v> first waits, up to --wait seconds, for /healthz's X-Forge-Version to equal <v>.
  • For each user agent it then checks:
    • /, /board and /healthz answer 200. /board is signed in with FORGE_TOKEN, and a redirect to sign-in counts as a failure.
    • The stylesheet linked from / is a 200 text/css response with a body.
    • /sw.js is a 200 JavaScript response, and no navigation path in it answers with Response.error().
  • It refuses to send the token over plain http to a host that isn't loopback. --insecure overrides that.
  • It never shells out with user text.

Tests

  • test/smoke.test.ts runs it against a stub server on a loopback port. It passes on a good forge and fails when the stylesheet is served as text/html.
  • test/smoke-real.test.ts proves /board takes a bearer token on the real app.

Docs: docs/RECOVERY.md and the README say how to run it.

Left out: no change to the release workflow, as the issue says.

Try it: FORGE_TOKEN=<token> bun scripts/smoke.ts https://forge.open-platform.sh --version <v>

Closes #2282

commented

scripts/smoke.ts <url> checks a live forge as an iPhone Safari user and as a desktop Chrome user. It exits non-zero on the first failure and prints the URL, the user agent, the status and the content type. I changed nothing this round, and the branch is already pushed. The smoke tests (9) and test/resilience.test.ts (12) pass here, and bun x tsc --noEmit is clean.

Why the earlier check failed: the failing test, "the owner's screen with snapshots > a store with a newest snapshot and a mirror…", is in test/resilience.test.ts. That file isn't touched by this change. It passed three times in a row here, so I'm treating the failure as a flake. I did not edit that test. I haven't seen the failure's log, so a repeat on this push would need a look at that log.

What it does

  • bun scripts/smoke.ts <url> --version <v> first waits, up to --wait seconds, for /healthz's X-Forge-Version to equal <v>.
  • For each user agent it then checks:
    • /, /board and /healthz answer 200. /board is signed in with FORGE_TOKEN, and a redirect to sign-in counts as a failure.
    • The stylesheet linked from / is a 200 text/css response with a body.
    • /sw.js is a 200 JavaScript response, and no navigation path in it answers with Response.error().
  • It refuses to send the token over plain http to a host that isn't loopback. --insecure overrides that.
  • It never shells out with user text.

Tests

  • test/smoke.test.ts runs it against a stub server on a loopback port. It passes on a good forge and fails when the stylesheet is served as text/html.
  • test/smoke-real.test.ts proves /board takes a bearer token on the real app.

Docs: docs/RECOVERY.md and the README say how to run it.

Left out: no change to the release workflow, as the issue says.

Try it: FORGE_TOKEN=<token> bun scripts/smoke.ts https://forge.open-platform.sh --version <v>

commented

Parked by the crew: the check failed ("the new forge screen > the follow mode is a field: take-updates reaches parent.json") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs