Commit f2b9e0f
fix(e2e): prod LIVE provisions + reaps as minted pro account (#176)
Two prod-only failures from run 26997362193:
1. Anon provisions 402 (free_tier_recycle_requires_claim) — the
X-E2E-Test-Token bypass was sending X-Forwarded-For, but the api's
fingerprint middleware reads the dedicated X-E2E-Source-IP header for
the override (XFF is overwritten by ingress-nginx on prod). So every
anon provision collapsed onto one fingerprint that had a recycle_seen
marker → 402.
2. Anon reap 401 — there is no unauthed resource-delete on the api, so the
ledger reaper's DELETE /api/v1/resources/:id 401'd on anon resources.
Fix (decisive: provision + reap AS the minted account on prod):
- cohort.ts: anonProvisionHeaders now sends X-E2E-Source-IP (the header
the bypass actually reads) with a unique IP per call → fresh fingerprint
→ no recycle gate. Adds authedProvisionHeaders() + provisionIdentity():
when E2E_SESSION_JWT is set (sanctioned prod run) resources are
provisioned AS the minted is_test_cohort PRO account (no recycle gate,
tier has headroom) and the provision bearer is recorded on the ledger so
the reaper's authed DELETE returns 200, not 401.
- live-provision-smoke + live-anon-provision: use provisionIdentity();
assert the identity's tier ('pro' authed / 'anonymous' otherwise);
record id.bearer for the authed reap.
- live-claim-deploy: anon claim legs get fresh fingerprints via the
source-IP fix; the deploy-lifecycle leg now deploys AS the minted pro
account directly (deployments_apps=10) instead of skipping on prod —
falls back to the dev-only set-tier path on staging.
npm run gate green (tsc + build + vitest: 1115 passed, 3 skipped).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e7757c9 commit f2b9e0f
4 files changed
Lines changed: 212 additions & 65 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
181 | 190 | | |
| 191 | + | |
| 192 | + | |
182 | 193 | | |
183 | 194 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
189 | 200 | | |
190 | 201 | | |
| 202 | + | |
191 | 203 | | |
192 | 204 | | |
193 | | - | |
| 205 | + | |
194 | 206 | | |
195 | 207 | | |
196 | 208 | | |
197 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
198 | 215 | | |
199 | 216 | | |
200 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
201 | 294 | | |
202 | 295 | | |
203 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
192 | 196 | | |
193 | 197 | | |
194 | | - | |
| 198 | + | |
195 | 199 | | |
196 | 200 | | |
197 | 201 | | |
| |||
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
220 | 228 | | |
221 | 229 | | |
222 | 230 | | |
| |||
236 | 244 | | |
237 | 245 | | |
238 | 246 | | |
239 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
240 | 252 | | |
241 | 253 | | |
242 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
478 | 479 | | |
479 | 480 | | |
480 | 481 | | |
481 | | - | |
| 482 | + | |
482 | 483 | | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
506 | 526 | | |
507 | 527 | | |
508 | 528 | | |
| |||
523 | 543 | | |
524 | 544 | | |
525 | 545 | | |
526 | | - | |
| 546 | + | |
527 | 547 | | |
528 | 548 | | |
529 | 549 | | |
| |||
552 | 572 | | |
553 | 573 | | |
554 | 574 | | |
555 | | - | |
| 575 | + | |
556 | 576 | | |
557 | 577 | | |
558 | 578 | | |
| |||
584 | 604 | | |
585 | 605 | | |
586 | 606 | | |
587 | | - | |
| 607 | + | |
588 | 608 | | |
589 | 609 | | |
590 | 610 | | |
| |||
617 | 637 | | |
618 | 638 | | |
619 | 639 | | |
620 | | - | |
| 640 | + | |
621 | 641 | | |
622 | 642 | | |
623 | 643 | | |
| |||
632 | 652 | | |
633 | 653 | | |
634 | 654 | | |
635 | | - | |
| 655 | + | |
636 | 656 | | |
637 | 657 | | |
638 | 658 | | |
| |||
641 | 661 | | |
642 | 662 | | |
643 | 663 | | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
648 | 680 | | |
649 | 681 | | |
650 | 682 | | |
| |||
0 commit comments