fix(e2e): assert real prod metrics shape in live-reads (object of named series) - #182
Closed
mastermanas805 wants to merge 1 commit into
Closed
fix(e2e): assert real prod metrics shape in live-reads (object of named series)#182mastermanas805 wants to merge 1 commit into
mastermanas805 wants to merge 1 commit into
Conversation
mastermanas805
enabled auto-merge (squash)
June 5, 2026 07:41
Member
Author
|
Superseded by the clean metrics-shape fix (off current main). |
auto-merge was automatically disabled
June 5, 2026 07:46
Pull request was closed
mastermanas805
enabled auto-merge (squash)
June 5, 2026 07:47
mastermanas805
added a commit
that referenced
this pull request
Jun 5, 2026
… array) (#183) Batch A read run failed: /api/v1/resources/:id/metrics returns {ok, data_source, metrics:{<name>:number[]}} (object keyed by metric name), but the spec asserted Array.isArray(metrics). Assert the real shape: metrics is a non-array object with >=1 named time-series array + a data_source. Supersedes the conflicted #182. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… array)
The W-RES metrics leg in live-reads.spec.ts asserted `metrics` was an array,
but the real prod shape (api resource_metrics.go) is an OBJECT keyed by series
name ({connections_active: number[], ...}). e2e-prod run 27002031272 caught
this on real prod. Assert the REAL shape: a non-empty object whose values are
numeric series, plus data_source. Serial-mode meant this abort masked the
vault/apikeys/billing/audit legs — they run once this lands.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mastermanas805
force-pushed
the
live-reads-metrics-fix
branch
from
June 5, 2026 08:09
4eba85d to
429cfbb
Compare
size-limit report 📦
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fix-forward for the Batch A live-reads spec (#181). The W-RES
/:id/metricsleg assertedmetricswas an array, but the real prod shape (api/internal/handlers/resource_metrics.goreturnssamples.series) is an object keyed by series name ({connections_active: number[], cpu: number[], ...}).e2e-prodrun 27002031272 caught this against real prod:Now asserts the REAL shape: a non-empty
metrics{}object whose values are numeric series arrays, plusdata_source. (Per the hard rule: when a read returns an unexpected-but-correct prod shape, assert the REAL shape.)Because the file runs
serial, this single abort masked the vault/apikeys/billing/audit legs (they showed as-skipped); they execute once this lands.Verification
npm run gateGREEN.e2e-prodrun to green after merge.🤖 Generated with Claude Code