Repository navigation
fix(showcase/railway): P3 promote gate skips non-staging-probe-eligible services - #5752
Merged
Merged
Conversation
…le services P3 (the staging-live-green precondition in `bin/railway promote`) handed EVERY service in the snapshot to verify-deploy.ts, including services the SSOT marks `probe.staging=false` (harness-workers). verify-deploy.ts hard-errors on a `--services` entry that is not probe-eligible, so P3 surfaced "verify-deploy crashed: ... not probe-eligible" as a REFUSE. In a tier-ordered fleet promote (`bin/railway promote llamaindex`) that REFUSE gated every later tier, so llamaindex was never promoted (CI run 28332775532). Fix: derive STAGING_PROBE_INELIGIBLE from the same SSOT, and in check_p3_staging_live_green drop those names BEFORE invoking the probe, logging "P3 N/A (<svc>): not staging-probe-eligible". An ineligible-only set returns no findings (clean skip); a mixed set still probes — and still gates on — the eligible services. P3 is unchanged for eligible services. Renumbered the snapshot-ivar-lint allowlist for the shifted lines.
Contributor
📣 Social Copy GeneratorGenerate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.
|
Contributor
Production Digest-Pinning AuditAll 41 services digest-pinned. Run 2026-06-28 12:22:27 PDT — 0 finding(s). |
jpr5
marked this pull request as ready for review
June 28, 2026 19:24
jpr5
requested review from
marthakelly,
mme,
ranst91 and
tylerslaton
as code owners
June 28, 2026 19:24
jpr5
added a commit
that referenced
this pull request
Jun 28, 2026
…(prod verify-prod crash) (#5753) ## The crash Promote CI run [28333317081](https://github.com/CopilotKit/CopilotKit/actions/runs/28333317081) PROMOTED llamaindex into prod successfully, but the `verify-prod` job then crashed: ``` verify-deploy crashed: service "harness-workers" is not probe-eligible for env "prod" (probe.prod=false in SSOT) ``` exit 2 → the whole run was marked failed even though the promote itself succeeded. `verify-prod` runs `npx tsx verify-deploy.ts --env prod --services "<promoted set>"`. That set includes `harness-workers`, which is intentionally `probe.prod=false` (and `probe.staging=false`) in the SSOT. `verify-deploy.ts` HARD-ERRORED (exit 2) on any `--services` entry that wasn't probe-eligible for the target env. Sibling fix #5752 fixed the **staging** path by passing an opt-in `--skip-ineligible` flag from the promote staging precondition. But the `verify-prod` job calls `verify-deploy.ts` **directly without that flag**, so the prod path still crashed. ## The fix Generalize the eligibility filter into `verify-deploy.ts` itself instead of relying on each caller to remember a flag: - `parseArgs` now defaults `skipIneligible` to **true** (skip-by-default). A known-but-not-probe-eligible service for the requested env is SKIPPED with an `N/A — not probe-eligible for env <env> (probe.<env>=false in SSOT), skipped` status line, and only the eligible subset is probed. Works for **any** `--env`, so it composes with #5752's staging path and fixes the direct prod-verify call — no workflow change needed. - When **every** requested service is ineligible (e.g. the promoted set is just `harness-workers`), `runVerify` exits **0** with a clear "nothing to probe" note, distinct from the empty-filter vacuous-green fault (which still fails loud). - **Unknown (non-SSOT) names STILL hard-error** on every path — a typo is a real fault, never a legitimate skip. - Added `--strict-eligibility` to opt back into the old hard-refuse for an explicit single-service probe. `--skip-ineligible` is kept as an explicit no-op for back-compat with the #5752 staging-precondition caller. This completes #5752 for the prod path. ## Red → green (real surface, `showcase/scripts`) **RED** (before): ``` $ npx tsx verify-deploy.ts --env prod --services harness-workers verify-deploy crashed: service "harness-workers" is not probe-eligible for env "prod" (probe.prod=false in SSOT) EXIT=2 ``` **GREEN** (after): ``` $ npx tsx verify-deploy.ts --env prod --services harness-workers harness-workers N/A — not probe-eligible for env prod (probe.prod=false in SSOT), skipped verify-deploy --env=prod targets=0 — nothing to probe (all requested services are not probe-eligible for env prod, skipped) EXIT=0 ``` **Regression — eligible service still probed and red-gated:** ``` $ npx tsx verify-deploy.ts --env prod --services harness-workers,showcase-llamaindex harness-workers N/A — not probe-eligible for env prod (probe.prod=false in SSOT), skipped verify-deploy --env=prod targets=1 showcase-llamaindex showcase-llamaindex-production.up.railway.app FAIL: agent: Railway GraphQL errors [...]: Not Authorized 1 service(s) failed verify in prod ``` `harness-workers` is skipped; `showcase-llamaindex` is resolved (`targets=1`) and the live probe **runs** (reaches the Railway GraphQL call). It reports red here only because the local env has **no `RAILWAY_TOKEN`** ("Not Authorized") — that live-probe step is env-blocked locally, but it proves the eligible service is still probed and gates red, not silently skipped. `showcase-llamaindex` alone behaves identically (`targets=1`, probe runs). **Guards preserved:** ``` $ npx tsx verify-deploy.ts --env prod --services harness-workers --strict-eligibility verify-deploy crashed: service "harness-workers" is not probe-eligible for env "prod" ... (exit 2) $ npx tsx verify-deploy.ts --env prod --services bogus-typo verify-deploy crashed: unknown service "bogus-typo" (not in SSOT). ... (exit 2) ``` ## Tests `npx vitest run __tests__/verify-deploy.test.ts` → **37 passed**. Updated the default-flag assertions, added `--strict-eligibility` parse coverage, and added a runVerify test for the all-ineligible "nothing to probe" exit-0 path. (4 pre-existing `emit-railway-envs-json.test.ts` failures are an unrelated `oxfmt` tooling issue — confirmed failing on clean `origin/main` without this change.) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
pull Bot
pushed a commit
to justinlietz93/CopilotKit
that referenced
this pull request
Jun 28, 2026
The promote workflow's verify-prod job calls verify-deploy.ts directly (--env prod --services <promoted set>) without CopilotKit#5752's --skip-ineligible flag, so a known-but-ineligible service (harness-workers, probe.prod=false) hard-errored exit 2 and crashed the gate AFTER a successful promote (CI run 28333317081: llamaindex landed, then verify-prod crashed). Generalize the eligibility filter into verify-deploy.ts itself rather than relying on each caller to pass a flag: flip skipIneligible to ON by default in the CLI (parseArgs). A known-but-not-probe-eligible service for the requested env is now SKIPPED with an `N/A — not probe-eligible ... skipped` status line and the eligible subset is probed. Works for ANY --env, so it composes with CopilotKit#5752's staging path and fixes the direct prod-verify call. When EVERY requested service is ineligible (e.g. promoted set is just harness-workers), runVerify exits 0 with a "nothing to probe" note instead of the vacuous-green FAIL — distinct from the empty-filter fault, which still fails loud. Unknown (non-SSOT) names STILL hard-error on every path (a typo is a real fault). Added --strict-eligibility to opt back into the hard-refuse; --skip-ineligible kept as an explicit no-op for back-compat. Red: `verify-deploy.ts --env prod --services harness-workers` crashed exit 2. Green: same command skips (N/A) and exits 0. Mixed set harness-workers,showcase-llamaindex skips workers and still probes (and red-gates) llamaindex.
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.
The bug (CI run 28332775532, promote step)
bin/railway promote llamaindexexpands to a tier-ordered fleet. It promoted aimock/pocketbase/dashboard/harness fine, then REFUSED onharness-workers:harness-workersis INTENTIONALLY not staging-probe-eligible (probe.staging=falsein the SSOT — a queue worker with no HTTP surface). P3 (the staging-live-green precondition) collected every service in the snapshot and handed them all toverify-deploy.ts, which hard-errors on a--servicesentry that is not probe-eligible. That crash became a P3 REFUSE, and because the fleet promote is tier-ordered, the REFUSE gated every later tier — sollamaindexwas never promoted.The fix
showcase/bin/railway:STAGING_PROBE_INELIGIBLE(services withprobe.staging=false), sourced from the samerailway-envs.generated.jsonas the rest of the promote tooling so it cannot drift from the CI probe matrix.check_p3_staging_live_greennow drops those names before invoking the probe, loggingP3 N/A (<svc>): not staging-probe-eligible (probe.staging=false in SSOT) — skipped.Also renumbered the
test_snapshot_ivar_lint.rballowlist for the lines the new constant shifted.Red → green (integration, real failure surface)
RED — the exact CI crash, reproduced against the real probe entrypoint (what pre-fix P3 invoked):
GREEN — fixed
check_p3_staging_live_greenon aharness-workers-only snapshot, with the real un-stubbed probe:REGRESSION — fixed P3 on an eligible service still probes and still gates:
Unit suite:
ruby bin/spec/all_tests.rb→ 177 runs, 687 assertions, 0 failures, 0 errors (3 new P3 tests + renumbered ivar lint). New tests fail (RED) against pre-fix code and pass (GREEN) with the fix.Impact
Merging this unblocks the
llamaindexprod promote (and any future tier-ordered fleet promote that includesharness-workers): P3 stops crash-REFUSing on the intentionally-unprobed worker and lets the rest of the tier through.🤖 Generated with Claude Code