Repository navigation
test(e2e): prove the run-status wiring changes a timed-out deploy's outcome - #119
Merged
Merged
Conversation
…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.
Contributor
|
This PR does not match any of the 1 configured review trigger rule. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-writefailed/ 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 /deployCustomClassesrequest body AND the id from theGET /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 shorteneduiTimeoutMs)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.failedat a pre-write phase (verifying) → a real failure (plainErrorwith nothing written), never an unconfirmed outcome.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
queryRunStatusWithinBudgetin a scratch copy ofapp.js(never committed —app.jsis out of scope and was restored,git statusclean of it) flips all three tests to red on the sharedqueriedRunId === deployRunIdassertion — the status query no longer fires. Restored, all three pass.Scope
Only new file
e2e/run-status-wiring.spec.js.playwright.config.jsalready readsCCC_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.