Skip to content

test(replay): replay with a service's deployed runtime config - #24654

Merged
Git-on-my-level merged 1 commit into
mainfrom
lane/replay-runtime-env
Nov 5, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
lane/replay-runtime-env

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Lets the replay harness run with a service's deployed runtime config, so fixes that ship as config can be replayed directly.

The replay environment clears every env var except PATH, TMPDIR and SYSTEMROOT, for hermeticity, so deploy config never reached product code. #24639 shipped FSR_SUBSCRIPTION_TTL_SECONDS=55 as runtime config, yet replaying main still ran the code default (60s) and reported 37 privacy mismatches.

  • --runtime-env <service>[:<env>] on run, and RUNTIME_ENV=... on make replay-harness, make replay-privacy-full and make replay-gate. The default env is prod.
  • Rendering: the repository's own composer for Cloud Run services, and the drift checker's Helm render path for GKE services. No merge rules are reimplemented, and rendering runs without ambient credentials.
  • What gets applied: only plain, allowlisted keys (FSR_*, Firestore read levers, *_PERCENT, *_TTL_SECONDS, *_ENABLED). Secret or indirect entries are dropped. Credentials, project IDs, endpoints and emulator settings stay as the hermetic environment sets them, and a conflicting value is refused.
  • Gate: each side renders from its own archived tree, so a config-only change classifies correctly.
  • Reports record the service, the env, the names of applied keys and a count of dropped entries, never other values.

Result

Full privacy replay of main with RUNTIME_ENV=backend and no TTL override: 1,400 transitions, 1,049 verified, 0 mismatches, 0 errors, 5s margin. With code defaults, the same replay reproduces the +60s mismatches. This covers the checked-in config at the tested source, not the live traffic-serving revision.

Product invariants affected

none (test tooling only; no product code, no .github changes)

Verification

  • 201 unit tests under the 1.00s CPU guard; 4 emulator integration tests, including a config-only gate classified fixed; make preflight 36 checks.
  • Luna review: CHANGES on hygiene only. A run receipt was in branch history and the README linked to it; the branch was squashed so no commit contains it. No runtime security or fidelity findings.

Rollback

Revert the PR.

Failure-Class: none

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

RUNTIME_ENV=<service>[:<env>] renders the service's runtime config with the
repository's own composer (Helm render for GKE services) and applies only
allowlisted, non-secret keys inside the hermetic replay environment. Gate
sides render from their own archived trees, so config-only changes show up.
Fixes that ship as config (e.g. FSR_SUBSCRIPTION_TTL_SECONDS=55) can now be
replayed directly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Git-on-my-level
Git-on-my-level marked this pull request as ready for review November 5, 2026 01:25
@Git-on-my-level
Git-on-my-level merged commit e2a8a1e into main Nov 5, 2026
64 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T01:28:33.864794Z 1e69d26 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level
Git-on-my-level deleted the lane/replay-runtime-env branch November 5, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant