Skip to content

test(e2e): prove the run-status wiring changes a timed-out deploy's outcome - #119

Merged
sgardoll merged 1 commit into
hardening/deploy-resiliencefrom
run-status-wiring-e2e
Oct 4, 2026
Merged

sgardoll merged 1 commit into
hardening/deploy-resiliencefrom
run-status-wiring-e2e

Conversation

@sgardoll

@sgardoll sgardoll commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Why

PR #118 made a deploy that outlives the browser wait bound stop being an opaque "go check FlutterFlow yourself". The client now generates a run id, sends it with the deploy request, and on an unconfirmed provision asks GET /runStatus/<runId> whether the runner recorded a definitive outcome (done / pre-write failed / else fall back to the reconcile re-read).

That wiring had no browser-level guard. This spec closes the gap.

The mechanism under test is identity

The id queried must be the id the deploy carried — otherwise the answer belongs to someone else's run. Each case captures the run id from the POST /deployCustomClasses request body AND the id from the GET /runStatus/<id> request and asserts they are equal. A spec that stubbed the two independently would pass even if the wiring were broken; this one cannot.

Coverage (real __CCC_PROVISION_CUSTOM_CLASSES__ transport, deploy stalled past a shortened uiTimeoutMs)

  • (a) status done → the timed-out provision resolves as a known success (provisionSucceeded: true), not an unknown outcome; the status request actually went out with the sent run id.
  • (b) status failed at a pre-write phase (verifying) → a real failure (plain Error with nothing written), never an unconfirmed outcome.
  • (c) status 404 (older runner / run that never arrived) → falls back to the existing reconcile and still reports unconfirmed — backward compatibility, not a crash or a fabricated failure; the reconcile re-read names the class that actually landed.

Spec bites (proof it would catch the wiring being removed)

Neutralising queryRunStatusWithinBudget in a scratch copy of app.js (never committed — app.js is out of scope and was restored, git status clean of it) flips all three tests to red on the shared queriedRunId === deployRunId assertion — the status query no longer fires. Restored, all three pass.

Scope

Only new file e2e/run-status-wiring.spec.js. playwright.config.js already reads CCC_TEST_PORT; run with a fresh port (CCC_TEST_PORT=4123) so the Playwright dev server cannot silently reuse a stale port 3000 server serving the main checkout.


Devin Review

…utcome

PR #118 made the client generate a run id, send it with the deploy request,
and on an unconfirmed provision ask GET /runStatus/<runId> whether the runner
recorded a definitive outcome. The mechanism is identity: the id queried must
be the id the deploy carried, or the answer belongs to someone else's run.
This spec captures both ids and asserts they match in every case, so a spec
that stubbed the two independently would pass even if the wiring were broken.

Three outcomes are driven through the real __CCC_PROVISION_CUSTOM_CLASSES__
transport with the deploy stalled past a shortened UI bound:
  (a) status DONE      -> provision resolves as a known success, not unconfirmed
  (b) status FAILED at a pre-write phase (verifying) -> a real failure, nothing written
  (c) status 404       -> falls back to the existing reconcile and still,
                          reports unconfirmed (backward compatibility)

Neutralising the queryRunStatusWithinBudget call in a scratch app.js copy
(never committed) flips all three to red on the same identity assertion, which
is the bite that proves the spec would catch the wiring being removed.
@greptile-apps

greptile-apps Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

This PR does not match any of the 1 configured review trigger rule.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@sgardoll
sgardoll merged commit 8d2c91c into hardening/deploy-resilience Oct 4, 2026
3 checks passed
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