mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
92726458a2
## Summary The showcase Railway promote CI flow could not promote the fleet: an `all` promote was blocked end-to-end whenever a single service was red, and the reported failure traced to `showcase-ag2` being chronically red on staging. Root causes and fixes: - **ag2 crash-on-import (the red service).** `gen_ui_agent.py` carried `from __future__ import annotations`, which stringified the `set_steps` tool's `context_variables: ContextVariables` parameter into an unresolved `ForwardRef`. AG2's tool-schema generation then raised `PydanticUserError` at import time, so the process never came up and the staging healthcheck failed on every deploy since 2026-05-31. Removed the import (matching the working sibling agents) and added a regression test that statically asserts the future-import stays absent (version-independent) plus a live import check. - **Promote loop was all-or-nothing.** The per-service loop ran under `set -euo pipefail`, so the first failing service aborted the whole `all` promote, leaving the rest unpromoted. Extracted the loop into `showcase/scripts/promote-fleet.sh`, which attempts every service, accumulates succeeded/failed sets, exits non-zero only after attempting all, and exports `succeeded_csv`. - **`verify-prod` defeated the best-effort design.** It was skipped on any non-zero promote and verified the full requested set. It now runs `if: !cancelled()` and scopes `--services` to the succeeded set. - **Staging precondition blocked the fleet.** `verify-staging-precondition` failed the whole `all` promote when any one service was staging-red. It is now advisory — `promote` runs regardless, and `bin/railway`'s per-service P2/P3 staging-green gates authoritatively refuse red services while green services promote. `notify` success keys on PROMOTE && PROD. - **Regression tests now gate in CI.** Added a `shell-script-tests` job (bats + shellcheck) to `showcase_validate.yml`, plus input-validation hardening in the script (fail-loud on empty / all-empty CSV, `RAILWAY_BIN` executability check, whitespace trim). ## Test plan - [x] ag2 regression test passes in the 3.12 venv (`PYTHONPATH=".:src" pytest tests/python/`) — 2/2 - [x] `promote-fleet.bats` — 12/12 (best-effort loop, succeeded_csv export, empty/whitespace/missing-binary guards, digest forwarding) - [x] `shellcheck promote-fleet.sh` clean; `actionlint` clean on both workflows - [ ] CI green on this PR