Skip to content

feat(canary): smoke harness + GHA verify workflow (Phase 2) - #987

Merged
HongmingWang-Rabbit merged 1 commit into
stagingfrom
feat/canary-smoke-harness
Apr 19, 2026
Merged

feat(canary): smoke harness + GHA verify workflow (Phase 2)#987
HongmingWang-Rabbit merged 1 commit into
stagingfrom
feat/canary-smoke-harness

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

Post-deploy verification for staging tenant images. Runs against the canary fleet after each publish-workspace-server-image build — catches auto-update breakage (exactly the class of bug that surfaced this morning as the E2E `current_task` drift from #966) before it propagates to the prod tenant fleet, which auto-pulls `:latest` every 5 min.

Shape

`scripts/canary-smoke.sh` iterates a space-separated list of canary base URLs paired with their `ADMIN_TOKEN`s and checks:

  • `/admin/liveness` reachable with admin bearer (tenant booted OK)
  • `/workspaces` list responds (wsAuth + DB path OK)
  • `/memories/commit` + `/memories/search` round-trip (encryption + scrubber)
  • `/events` admin read (AdminAuth C4 path)
  • `/admin/liveness` without bearer → 401 (C4 fail-closed regression gate)

`.github/workflows/canary-verify.yml` runs after the existing publish workflow succeeds:

  • 6-min sleep (tenant auto-updater runs every 5 min)
  • `bash scripts/canary-smoke.sh` with secrets from repo settings
  • On failure: writes a Step Summary flagging `:latest` should be rolled back

Phase 3 (follow-up PR)

Split the publish workflow so only `:staging-` ships initially, and canary-verify's green gate is what retags `:staging-` → `:latest`. This PR lays the test gate alone so we have something running against tenants immediately — if the gate goes red before the retag logic is in place, ops manually holds `:latest` at the prior digest.

Secrets to configure on the repo before the workflow fires

Secret Value shape
`CANARY_TENANT_URLS` `https://canary-pm.staging.moleculesai.app https://canary-mcp.staging.moleculesai.app\`
`CANARY_ADMIN_TOKENS` one token per URL, space-separated, same order
`CANARY_CP_SHARED_SECRET` matches staging CP's `PROVISION_SHARED_SECRET`

Test plan

🤖 Generated with Claude Code

Post-deploy verification for staging tenant images. Runs against the
canary fleet after each publish-workspace-server-image build — catches
auto-update breakage (a la today's E2E current_task drift) before it
propagates to the prod tenant fleet that auto-pulls :latest every 5 min.

scripts/canary-smoke.sh iterates a space-sep list of canary base URLs
(paired with their ADMIN_TOKENs) and checks:
- /admin/liveness reachable with admin bearer (tenant boot OK)
- /workspaces list responds (wsAuth + DB path OK)
- /memories/commit + /memories/search round-trip (encryption + scrubber)
- /events admin read (AdminAuth C4 path)
- /admin/liveness without bearer returns 401 (C4 fail-closed regression)

.github/workflows/canary-verify.yml runs after publish succeeds:
- 6-min sleep (tenant auto-updater pulls every 5 min)
- bash scripts/canary-smoke.sh with secrets pulled from repo settings
- on failure: writes a Step Summary flagging that :latest should be
  rolled back to prior known-good digest

Phase 3 follow-up will split the publish workflow so only
:staging-<sha> ships initially, and canary-verify's green gate is
what promotes :staging-<sha> → :latest. This commit lays the test
gate alone so we have something running against tenants immediately.

Secrets to set in GitHub repo settings before this workflow can run:
- CANARY_TENANT_URLS (space-sep list)
- CANARY_ADMIN_TOKENS (same order as URLs)
- CANARY_CP_SHARED_SECRET (matches staging CP PROVISION_SHARED_SECRET)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@HongmingWang-Rabbit
HongmingWang-Rabbit merged commit 79dc8cb into staging Apr 19, 2026
9 checks passed
molecule-ai Bot pushed a commit that referenced this pull request Apr 21, 2026
feat(canary): smoke harness + GHA verify workflow (Phase 2)
@HongmingWang-Rabbit
HongmingWang-Rabbit deleted the feat/canary-smoke-harness branch April 24, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant