A production release can name a candidate revision before anyone has checked what staging currently reports. The website workflow we examined reads a staging manifest before it proceeds with the production deployment. That record has to describe the selected revision in the expected staging context. A successful response is necessary for that comparison to happen, but several successful responses can describe different things. We held the release candidate fixed and varied the records the gate received to see which differences changed its decision.
Hold the release candidate fixed
We extracted the gate from an archived website revision and ran it in an isolated local process for each case. We replaced its manifest fetch with a stub so it would receive only the response supplied by that fixture. The baseline supplied a successful response with the expected staging environment, branch, and candidate revision. The process accepted it after one read. That result shows acceptance of that combination in the fixture. No deployment ran when the process returned.
For the first variation we supplied a different revision. The identifier was still long enough and used the same allowed characters as the original. The response status and the two context fields stayed the same. The gate rejected it after reading the record, which isolates the difference between an identifier that has the right shape and the identifier the candidate actually names. A test that checked only for a successful response would have treated both cases the same.
We then kept the revision fixed and changed the branch, and in another run kept the branch fixed and changed the environment. Both cases returned successful responses and both were rejected. Those controls matter because they separate the identity of a revision from the context the manifest says it belongs to. The fixture deliberately constructed each mismatch. It gives us a way to read the gate's decision without implying that any of these combinations occurred on hosted staging.
Check whether a record can be compared
In another trial the stub returned HTTP 503 with the same record fields as the baseline. The process rejected the response before using those fields as a match. A candidate with a short identifier was also rejected, but the stub recorded no read in that case. Both trials ended with rejection. The read count helped distinguish an input rejected before lookup from a lookup that returned an unsuccessful response.
We also ran the same script in staging mode. It exited successfully without reading the manifest. An unrecognized environment exited unsuccessfully without a read. The staging mode is one path through the script, while the manifest comparison is a requirement for its production path. In this experiment we counted calls to the stub to tell those paths apart. We did not measure requests to a server, retries, or delays.
Compare the hosted records separately
We made a separate read-only request to each hosted environment. In that sample, staging and production reported the same revision. The check records for that newer revision showed successful staging and production hosting checks. These are observations about available records and reported verdicts. We did not capture what the staging manifest returned at the original moment of promotion. The hosted observations also do not replay the archived gate or any of the mismatched records from the local fixture.
A matching record is time-specific. If staging later changes, a previous observation still describes what the reader saw at that earlier moment. In the local fixture each read returned a fixed stub response. We did not exercise concurrent releases or compare deployment artifacts byte for byte. The local cases answer which inputs this gate accepts. The hosted sample tells us that the reported identifiers agreed when we looked. Keeping those results separate makes it possible to give each the right weight.
The workflow also places a separate verification step after deployment. Its position matters to the sequence. An earlier check can compare a candidate with a staging record before a production action begins. A later check can examine a deployment after it exists. Our experiment covered the former decision, and the separate hosted sample observed the environments at one point in time. Neither substitutes for checking the actual page that a reader will get. The manifest match gives a release record a precise claim it can carry forward, agreement on the fields the gate read.
← All engineering articles