Repository navigation
fix(ci): name both causes of an unpublished Railway preview - #1240
Conversation
A bare `Success` with no host has two causes, and the commit status is identical under either: production lost its Railway-provided domain, or the `SahajCloud` service in that one `pr-<n>` environment has none. The `::error` asserted the first as settled fact, so a fix-ci run on #1227 diagnosed production, where nothing was wrong. Name both, and give the observation that separates them: another PR whose preview deployed around the same time. #1229's status carried a host seven minutes after #1227's did not, which rules production out. The old message also promised a re-run would produce the same result. Drop that, but do not replace it with "a re-run helps once the domain exists" — Railway writes the host into the commit status at deploy time, and `classifyStatuses` reads whatever statuses that SHA already has, so a bare re-run reads the same bare `Success`. The environment has to deploy again. Classification and the exit code are untouched. Red is right either way. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjViTpaMwMtQMdPvN9W
…ept it The `::error` is not the only place that named production as the cause of a bare `Success`. The module header said the description carries a host "only while the base environment's service holds a domain", so a reader of the file was still sent to production 110 lines above the message that now names both. `railway-preview-status.ts`, the smoke lane's guide and the CI step comment each said the same in their own words. The `::error`'s own remedy was the second cause's applied to both: the runbook says existing PR environments do not backfill, so for the production cause no redeploy of an open PR produces a host. It now says only that a bare re-run reads the same status, and leaves which fix to the runbook. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjViTpaMwMtQMdPvN9W
|
🚅 Deployed to the SahajCloud-pr-1240 environment in sahajcloud
1 service not affected by this PR
|
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
One conflict, `scripts/AGENTS.md`. #1235 deleted the operator inventory table this branch edited one row of, replacing it with intent-only prose under "Warnings by script". Resolved to main's rewrite. Nothing of this branch's intent is lost. The row's false clause — a bare `Success` means base-environment misconfiguration — is gone because the sentence carrying it is gone, and main's replacement bullet asserts no cause at all, pointing at `railway-preview-status.ts` and #661 instead. Re-adding the runbook pointer would restore detail #1235 deliberately moved out of these guides. The two-cause statement still lives in the five surfaces this branch changes that main did not touch. The `<details>` note in the PR body about that row's 62-character padding is moot: the table it padded no longer exists. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXLbjYeXGCjv97dg9Q
|
Merged #1235 deleted the operator inventory table this branch edited one row of, replacing it with intent-only prose. Resolved to main's rewrite. The row's false clause went with the sentence that carried it, and the replacement bullet asserts no cause at all — it points at Lean gate green on the merge result: 284 files, 3841 tests. Body updated to match: the file list names five surfaces, and the Anomaly: two 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff is the size of the ticket: five prose surfaces and one string literal, no new file, function, type or constant, so the ladder has nothing to walk. The four surfaces beyond the ticket's two are joined — each asserted the same false cause — so none is smuggled scope. No contract surface is touched, and all four acceptance criteria hold.
The judgement call you were asked to check is right. Railway writes the host into the status at deploy time and discoverPreview re-reads that SHA's statuses, so a bare re-run does read the same bare Success. The ticket's "a re-run does help once that domain exists" was wrong; the runbook's "deploy it again" is the remedy.
Findings
should-fix— the two-cause list now has four homes beside the runbook that owns it. Three should be pointers.scripts/railway-preview-status.ts:16should-fix— the new section contradicts the "only when" rule one heading above it, and never says how this cause arises.RAILWAY_RUNBOOK.md:245consider— the new comment misattributes #661 to an absent preview, and names a domain as a configuration..github/workflows/ci.yml:72
What was checked. #1230's criteria against the diff. All five files read whole on the branch, plus the script's other four outcome branches and tests/unit/railway-preview-status.spec.ts — it pins classification, not wording, so "no test added" holds. "CI & Preview Environments" exists, so the ::error pointer resolves; the TOC lists only ## headings. Every path the body names is on the branch, and scripts/AGENTS.md's railway bullet does assert no cause, as the <details> claims. No preview surface is right: nothing in fixture.surfacePaths is touched. Grepped the repo for the single-cause claim — no surface left behind.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
…lished-preview-error
The two-cause list had four homes beside the runbook that owns it. Each copy goes stale independently, and which of the two domains is missing changes nothing these three surfaces do: the classifier classifies, the entrypoint header explains why the commit-status description is the source, and the smoke-lane guide says the job fails. Each now carries the substance a reader needs — a missing domain, not an absent preview — and points at the runbook for which one and what clears it. The entrypoint header also carried the pair unreconciled with the runbook's "only when the base service has one" rule. Dropping the enumeration removes the contradiction with it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWHVvNJVKxVURK3BqF
Two slips in one sentence. "which hid a dead smoke lane for weeks" attached to "an absent preview"; what hid it was reading this status as one. And a Railway domain is not a configuration, so "Two configurations do that — production's domain" did not parse. The enumeration goes with them: the runbook owns which domain is missing. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWHVvNJVKxVURK3BqF
The section above states Railway's rule as "only when the base service has one", which reads as "always when it does" — and the new section asserted the opposite case without saying how it arises. Name the rule for what it is: a necessary condition, not a guarantee. Why #1227's environment had no domain was never established, so the section now says so instead of implying a known mechanism. The remedy supplies an observably absent domain, so it holds under either reason. Also drops the last "configurations" where a domain was meant. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWHVvNJVKxVURK3BqF
Same slip as ci.yml's comment, one file over, on the branch that introduced it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWHVvNJVKxVURK3BqF
|
All three review threads adopted. Nothing rebutted, nothing deferred.
Merged Lean gate green — 284 files, 3841 tests. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
unpublished::errornames both causes of a bareSuccess, not production alone.Change outline
The
unpublishedbranch keeps its exit code and its classifier. What changed is what it tells the reader.Behaviour — the
unpublishedbranchExit 1 on
unpublished, andclassifyStatuses, are untouched. Red is right under either cause.Surfaces — one list, in the one file that owns it
Five surfaces stated a single cause. Each enumeration is a copy that goes stale on its own, and
which domain is missing changes nothing four of them do — so only the
::error, what an operatorreads in CI, still names both.
Prose — the two slips the enumeration carried
The #661 breadcrumb had attached itself to "an absent preview"; what hid the dead smoke lane was
reading this status as one. And a Railway domain was called a configuration in four places. Both
go with the clause that carried them.
Preview
No preview surface
Test results
tests/unit/railway-preview-status.spec.ts— 40 passedManual verification
unpublished::erroratscripts/get-railway-preview-url.ts:131. It names both causes, asserts neither, and gives the sibling-PR observation that separates them.RAILWAY_RUNBOOK.md→ "CI & Preview Environments". Both ⚠ sections now sit there: the production case (fix(ci): restore Railway preview URLs, fail closed when none is found #661) and the per-environment case, each with its own remedy. The second reconciles itself with the first's "only when the base service has one" rule, and says its own cause on chore(songs): retire the song duration backfill #1227 is unrecorded.railway-preview-status.ts:15,get-railway-preview-url.ts:17,ci.yml:70,tests/AGENTS.md. Each names a missing domain, not an absent preview, and sends the rest to the runbook.Notes for reviewer
discoverPreviewre-reads whatever statuses that SHA already has, so a bare re-run reads the same bareSuccessunder either cause. The runbook's per-environment section says to deploy that environment again; the message says only that a re-run alone changes nothing, and sends the remedy to the runbook. The ticket's criterion — stop claiming a re-run always produces the same result — holds either way.mainpins no error wording. Making it assertable would mean exporting the string and asserting substrings of prose, which rots on the next rewording.railway-preview-status.spec.tsstill pins the classification and the terminal-on-first-poll rule./code-review highraised four, all fixed in12effcb; the docs sweep found a fifth. The adversarial review's three are adopted in410c154,108334fande5667d4.Detail
scripts/AGENTS.mdis no longer in the diff. It was the sixth surface, edited in one table row. #1235 then deleted that whole operator table frommainin favour of intent-only prose, and the merge inc81098ctook that rewrite: the false clause is gone with the sentence that carried it, and the replacement bullet asserts no cause at all. Re-adding the runbook pointer there would restore detail #1235 deliberately moved out.The
/simplifypass. Run inline rather than as four agents: the diff has no logic to simplify — one string literal's content plus Markdown. Reuse, efficiency and altitude found nothing. It did cost one clause: theunpublishedcomment said "so the message names both", which the string below it already shows.On altitude. The root cause of the misdiagnosis is a message that asserted a cause it could not know, not a missing detector.
HEALTH_ERRORSwas considered as a home for the string — it is a map becausepollHealth's verdict indexes it, andunpublishedandforbiddenare both handled inline in the entrypoint, so moving it would add an export for nothing.Evidence, unchanged from the ticket, and what it does not establish. PR #1227 at
0f3c4edpostedSuccesswith no host at 23:02Z; #1229 postedSuccess - sahajcloud-sahajcloud-pr-1229.up.railway.appat 23:09Z. Production therefore held its Railway-provided domain throughout, which is what makes a sibling PR's status the discriminator. It says nothing about why #1227's own service had no domain: a grant that silently failed and a domain removed afterwards both fit. Railway's inheritance rule is a necessary condition, so the second cause needs no contradiction of it.Closes #1230