Commit 5949d0f
test(e2e): functional deploy-failure debug-path live UI spec + factory withFailedDeploy (#195)
The CEO's core ask: CI must FUNCTIONALLY prove the debug path works — "deploy an
app and get its logs; fail a deployment and get its logs/events" — not just that
llms.txt redirects. Adds e2e/live-ui-failure-diag.spec.ts (real backend, minted
cohort, reaped) with three legs:
- Happy deploy → logs (schedule lane): mint pro → create deploy (202) → the
build-logs endpoint authorizes the owner and returns a recognized state
(200 streaming / 409 not_ready-still-building / 404 GC'd, NOT 401/5xx) AND
the LiveBuild SSE panel reaches a rendered stream state in the UI.
- Failed deploy → /events (API, @pr-smoke): mint with_failed_deploy →
GET /api/v1/deployments/:id = status=failed + non-empty error_message;
GET /api/v1/deployments/:id/events = autopsy event with reason (OOMKilled) +
non-empty last_lines + hint; + auth-negative (401) + cross-team (404). This
is the agent auto-debug surface, asserted end to end.
- Failed deploy → UI (FailureAutopsyPanel, @pr-smoke): load
/app/deployments/:id in the browser (minted session) → the panel renders the
reason heading + hint + last_lines (log toggle) against a real backend.
Extends e2e/factory.ts with mintUserWithFailedDeploy() (with_failed_deploy →
failed_deploy_id, api 021bb7e). The two failed-deploy legs are @pr-smoke (fast:
seeded reads + panel render, no real Kaniko build) so the debug surface can't
silently regress on a web PR; the happy real-deploy leg stays on the schedule.
Cohort-tagged + reaped (rule 24); gated on the e2e token (skip-clean).
Verified live against prod api 021bb7e: all 4 legs pass, reap clean
(attempted=8 deleted=5 alreadyGone=3 failed=0, ledger cleared).
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 1a11604 commit 5949d0f
2 files changed
Lines changed: 513 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
75 | 83 | | |
76 | 84 | | |
77 | 85 | | |
| |||
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
| 93 | + | |
85 | 94 | | |
86 | 95 | | |
87 | 96 | | |
88 | 97 | | |
89 | 98 | | |
90 | 99 | | |
91 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
92 | 110 | | |
93 | 111 | | |
94 | 112 | | |
| |||
111 | 129 | | |
112 | 130 | | |
113 | 131 | | |
114 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
115 | 137 | | |
116 | 138 | | |
117 | 139 | | |
| |||
141 | 163 | | |
142 | 164 | | |
143 | 165 | | |
| 166 | + | |
144 | 167 | | |
145 | 168 | | |
146 | 169 | | |
| |||
152 | 175 | | |
153 | 176 | | |
154 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
155 | 193 | | |
156 | 194 | | |
157 | 195 | | |
| |||
0 commit comments