Commit 9a508db
feat(synthetic): money/value-journey legs + CI→NR emit (Wave 5) (#95)
* feat(synthetic): money/value-journey legs + CI→NR emit (Wave 5)
Wave 5 of the CI integration plan (docs/ci/01-CI-INTEGRATION-DESIGN.md).
Two additive pieces, both flag/secret-gated and inert by default.
1) Generalize the prod synthetic monitor to the money/value journeys.
flow_synthetic_money.go adds four legs to the continuous flow matrix, each
reading a TRUTH SURFACE (CLAUDE.md rule 12), run by the SAME 5-min
flow_synthetic River job under the SAME FLOW_SYNTHETIC_ENABLED master flag +
per-flow FLOW_SYNTHETIC_DISABLED kill list, emitting the SAME
instant_flow_test_* counters + InstantFlowTest event (cohort=synthetic):
- claim — GET /claim/preview invalid-token → assert 400 invalid_token
contract (anon→claimed funnel step; single-use-preserving).
- deploy_status — POST /deploy/new → assert the tier-gate 402 wall on a
no-headroom tier (or 201 + reap on a headroom tier, rule 24).
- checkout — POST /api/v1/billing/checkout → assert non-5xx reachability
(contract-only; Razorpay live recurring operator-blocked).
- magic_link — POST /auth/email/start (202) THEN read forwarder_sent
.classification (rule 12 — a 'rejected' classification, the
Brevo-unvalidated-sender reality, FAILS the leg; the 202
alone is NOT a delivery).
Work() mints the session JWT once and shares it across the P0 + money matrices.
flow_synthetic_money_test.go + extended flow_synthetic_test.go give 100% patch
coverage of the new file (every contract/error/degraded branch, the headroom
deploy create→reap + reap-leak/transport-error paths, the classifier seam).
Inert when FLOW_SYNTHETIC_ENABLED is unset (the flag-off no-op test proves it).
2) CI test-run → New Relic emit (reusable composite action).
.github/actions/nr-ci-event POSTs InstantCITestRun (always) + InstantCITestFailure
(on fail) to the NR Event API; wired into ci.yml build-and-test + integration as
an if:always() step. No-ops cleanly without NEW_RELIC_LICENSE_KEY/ACCOUNT_ID.
Per-package `go test ./internal/jobs/ -short` GREEN; the flow tests pass
deterministically. NOTE: the full `go test ./... -p 1` run has a PRE-EXISTING
intermittent flake in the jobs package (River "PeriodicJobEnqueuer: context
canceled" teardown race, ~1/3 runs, unrelated to these hermetic httptest+sqlmock
flow tests) — per memory feedback_coverage_measure_per_package_not_dotdotdot the
authoritative gate is CI.
Operator action: provision NEW_RELIC_LICENSE_KEY + NEW_RELIC_ACCOUNT_ID as GitHub
secrets on the worker repo; enable the synthetic suite per
infra/FLOW-SYNTHETIC-RUNBOOK.md (FLOW_SYNTHETIC_ENABLED=true).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(ci): composite action cannot read github/secrets/job — caller passes them as inputs
The nr-ci-event composite action referenced github.*/secrets.*/job.status in its
own env: block; GitHub rejects those inside a composite action. Move resolution
to the caller's with: block; action reads only inputs.*. Adds event-name + actor
inputs; callers pass repo/workflow/branch/commit-sha/log-url/event-name/actor.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(ci): strip ${{ }} from composite-action input descriptions
GitHub evaluates ${{ }} expressions even inside an input's description: string,
so the example 'Pass ${{ secrets.NEW_RELIC_LICENSE_KEY }}' text in the
descriptions triggered the same Unrecognized-named-value validation error. Use
plain backtick-quoted text in all descriptions; only the runs: body keeps
inputs.* expressions (the one context a composite action may read).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 91ef958 commit 9a508db
6 files changed
Lines changed: 1314 additions & 36 deletions
File tree
- .github
- actions/nr-ci-event
- workflows
- internal/jobs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
102 | 124 | | |
103 | 125 | | |
104 | 126 | | |
| |||
212 | 234 | | |
213 | 235 | | |
214 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
379 | 400 | | |
380 | 401 | | |
381 | 402 | | |
| |||
408 | 429 | | |
409 | 430 | | |
410 | 431 | | |
411 | | - | |
| 432 | + | |
412 | 433 | | |
413 | 434 | | |
414 | 435 | | |
415 | 436 | | |
416 | 437 | | |
417 | 438 | | |
418 | 439 | | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
431 | 443 | | |
432 | 444 | | |
433 | 445 | | |
| |||
489 | 501 | | |
490 | 502 | | |
491 | 503 | | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
492 | 512 | | |
493 | 513 | | |
494 | 514 | | |
| |||
0 commit comments