dataflow-staging-experiment

Designs and launches A/B experiments on the usage-record Dataflow pipeline against mirrored prod traffic.

7|12|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/OpenRouterTeam/docs --skill dataflow-staging-experiment-openrouterteam
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dataflow-staging-experiment
Source: https://github.com/OpenRouterTeam/docs/tree/main/.agents/skills/dataflow-staging-experiment
Command: npx skills add https://github.com/OpenRouterTeam/docs --skill dataflow-staging-experiment-openrouterteam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Testing changes to the usage-record generations Dataflow pipeline against real production traffic is risky and hard to measure. This Skill lets you run isolated A/B experiment arms on ephemeral staging Dataflow jobs that mirror prod traffic into a staging Spanner instance, with per-arm cost attribution and no impact on prod. ## Core Features & Use Cases - Isolated experiment arms: Launch concurrent staging jobs with partition-based entity slicing and disjoint shard bands so arms never contend with each other on the same Spanner rows. - Per-arm measurement: Use Spanner transaction/request tags and SPANNER_SYS queries (TXN_STATS, LOCK_STATS, QUERY_STATS) to compare abort rates, commit latency, and per-statement CPU across arms. - Traffic replay: Seek ephemeral Pub/Sub subscriptions back up to 6 hours to replay prod traffic for max-throughput tests or serial same-corpus comparisons. - Use Case: You want to know whether dropping the exclusive lock on generation_shards inserts reduces lock-wait. Deploy a control arm and a treatment arm on the same partition with offset shard bands via GitHub Actions, wait past cold start, then compare their tagged SPANNER_SYS stats. ## Quick Start Ask the agent to launch a staging experiment arm for the generations pipeline with a given partition index, shard band, and spanner tag using the deploy-dataflow-staging GitHub Actions workflow.

Frequently Asked Questions about dataflow-staging-experiment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I A/B test a Dataflow pipeline change against production traffic?▼

Deploy ephemeral staging Dataflow jobs that each create their own subscription on the prod Pub/Sub topic, receiving a full copy of traffic and writing to a staging Spanner instance. Use partition flags to slice entities and disjoint shard bands so concurrent arms never write the same rows.

How do I measure per-arm Spanner contention in a Dataflow experiment?▼

Set a per-arm transaction tag and request tags, then query SPANNER_SYS TXN_STATS for abort rate and commit latency, and QUERY_STATS for per-statement CPU. Use the latest single TOP_10MINUTE interval and report lock-wait at table level only, since LOCK_STATS does not key by tag.

Can I deploy a Dataflow staging job without local gcloud credentials?▼

Yes. The deploy-dataflow-staging GitHub Actions workflow runs the deploy script under a workload identity, triggered via workflow_dispatch or repository_dispatch. Bots with Contents:write but not Actions:write should use the repository_dispatch API path with client_payload fields.

Why do my Dataflow experiment arms show misleading abort rates?▼

Early data is cold-start noise, so discard the first several minutes after launch. Also avoid summing across overlapping TOP_10MINUTE buckets, and if you relaunched an arm with the same tag, filter intervals to after the relaunch or old stats blend into the new tag.

What is the difference between partition index and shard band in Dataflow staging arms?▼

Partition index selects which entities an arm processes via consistent hashing, while shard band only controls which rows those entities' writes rotate across. The band does not filter traffic, so arms on the same partition with disjoint bands see identical traffic without row contention.

How do I replay past Pub/Sub traffic into a Dataflow staging job?▼

Pass a seek timestamp within the topic's 6-hour retention window when deploying the staging arm. The ephemeral subscription can seek to before its own creation, replaying hours of prod traffic as an immediate backlog for throughput or serial comparison tests.