feat(679): stamp manifest variant + go-live build into play scenario#690
Merged
Conversation
Part 3 of #677 — adds the two server-side run-identity fields to the Scenario object from #678. No ClickHouse migration: both derive from data already captured. manifest_variant (ll | 2s | 6s): - find.go surfaces master_manifest_url on the play summary (anyIf non-empty); scenario.go derives the variant from its path (2s/6s markers vs LL default). server_build (which go-live build served the play): - go-live: main.Version (ldflags -X) → api.BuildVersion → X-Served-By header becomes "go-live/<build>" (was static "go-live"). All 11 header sites use the new servedBy() helper. - Dockerfile: go-live now builds with -ldflags "-X main.Version=${VERSION}", reusing the same VERSION build-arg go-proxy already consumes. - The proxy already captures X-Served-By into network_requests.response_headers; find.go extracts it per play via a server_builds CTE (JSON header parse), and scenario.go strips the "go-live/" prefix (empty for un-stamped dev builds). Plumbed through: forwarder.yaml Scenario (+manifest_variant enum, +server_build) → regenerated harness-cli client → v2-repo.ts Scenario → Sessions.vue scenario chips (variant, build). Tests: manifestVariant + serverBuild table tests, server-side-fields enrich test. go build/vet/test (forwarder, harness-cli, go-live), vue-tsc, vite build all clean. ldflags injection verified (binary prints build "v2.0.0-test"). Rollout: forwarder rebuild lights up manifest_variant immediately (derived from existing rows); server_build needs a container rebuild (VERSION arg) so go-live starts emitting the stamped header — populates for plays served after. Closes #679 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Part 3 of #677 (split out as #679). Adds the two server-side run-identity fields to the Scenario object from #678 —
manifest_variant(LL/2s/6s) andserver_build(which go-live build served the play). Per the design decision: build tag rides go-live's existing X-Served-By header via-ldflags, which the proxy already captures, so no ClickHouse migration — both fields derive from data already on the rows.manifest_variant (
ll|2s|6s)find.gosurfacesmaster_manifest_urlon the play summary (anyIfnon-empty — constant per play).scenario.goderives the variant from its path (/2s/·_2s→ 2s,/6s/·_6s→ 6s, else LL).server_build
main.Version(set via-ldflags -X) →api.BuildVersion→X-Served-Bybecomesgo-live/<build>(was staticgo-live). All 11 header sites now callservedBy().-ldflags "-X main.Version=${VERSION}", reusing the sameVERSIONbuild-arg go-proxy already consumes.X-Served-Byintonetwork_requests.response_headers;find.goextracts it per play via aserver_buildsCTE (JSON header parse), andscenario.gostrips thego-live/prefix (empty for un-stamped dev builds).Plumbed through
forwarder.yamlScenario (+manifest_variantenum, +server_build) → regeneratedharness-cliclient →v2-repo.tsScenario →Sessions.vuescenario chips (variant,build).Test
manifestVariant+serverBuild; server-side-fields enrich test.go build/vet/test(forwarder, harness-cli, go-live),vue-tsc,vite buildall clean.build "v2.0.0-test"→ headergo-live/v2.0.0-test).find.goSprintf verb/arg count re-balanced (17 = 17) after adding the CTE.Rollout
make analytics-rebuild-forwarder) lights upmanifest_variantimmediately — derived from existing rows.server_buildneeds a container rebuild (so go-live starts emitting the stamped header) and then populates for plays served afterward; older plays show no build (correct — that build info wasn't captured at the time).Closes #679
🤖 Generated with Claude Code