Context brief — Dual-run parity harness product research (plans/002)
Read this first. It is the shared ground truth for every document in this plan. Facts here are already verified against the repos and prior research; do not re-derive them, do not contradict them without flagging.
What is being researched
The dual-run parity harness (“the quality-control bench”) — Robert’s flagship build inside the Groupon rebuild program. Decided BUILD in plans/001-factory-apps-validation/00-SYNTHESIS.md (verdict #4). This plan is the full product research: challenge the concept, decide build/buy/OSS-foundation/pivot/abandon per angle, and produce the PRD.
It is an INTERNAL product. No external customers, no pricing pages, no marketing site, no procurement cycles. “Buyer” = the program (Tomas Zaruba’s gates + Robert’s investment decision). “Users” = fleet coding agents (primary, machine consumers), the 4-builder strike unit, Robert, Tomas, QSA/SOX auditors (evidence consumers), security review. Scale every generic-SaaS section of the template down or reinterpret it internally; say so explicitly when you do.
Program ground truth (verified 2026-07-18)
- The program: Tomas Zaruba’s “strike unit” rebuilds Groupon onto Encore.ts (repo
groupon2/monorepo-development, local clonerepos/monorepo-development/). Rebuild-from-audit doctrine: legacy code is never ported; capabilities are measured (HOT/WARM/COLD/DARK), a panel signs scope, and every kept capability gets a Given/When/Then use case “wired to the shadow machinery: a use case the dual-run comparison can prove is a use case nobody argues about” (reasons-and-decisions/04-audit-methodology.md). - Orders flagship schedule (
reasons-and-decisions/03-orders-flagship.md): dual-run live by week 6 (M2 checkpoint); reads authoritative in M2; write ramp 1→100% through M3 with ledger reconciliation ≥99.999% before each step; money chain OFF inside M4. Definition of DONE = 10 binary rows incl. zero-RPS 30 days, reconciliation ≥99.999%, error ≤ baseline +0.1pp, p99 ≤ +10%, QSA/SOX sign-off. Week-6 rule: “if dual-run is not live, M4 slips, publicly.” - Existing parity machinery (all of it): merchant-accounting service oracles —
reconciliation.service.ts(billing-event feed vs posted ledger entries),crossCheckRange(feed anti-join vs consumption records, classifies posted/received/unpublished). ~300 LOC, one domain slice. Nothing generic exists.analysis/monorepo-development/ASSESSMENT.mdlists “no parity/dual-run harness” as a top-5 gap. - Legacy estate facts (
analysis/legacy/SYNTHESIS.md): backend core ~1.05M active LOC (Ruby 702k, Java 349k). EOL everywhere: Ruby 1.9.3/2.4/2.6, Rails 3.2/4.1/5.2, JRuby 1.7, orders frozen ~2017, VIS frozen ~2013. MBUS (JMS/STOMP + some Kafka) is load-bearing in 16/33 repos — event parity is day-one scope for any cutover. Hubs: orders(9 in-degree), voucher-inventory(8), deal-catalog-jtier(7), users-service(6), billing-record(5). Two half-finished stranglers rot in the code (VIS3, identity-service). Verification, not codegen, is the binding constraint (“the hard part is not code generation — it’s verification”). - Decided harness shape (001 synthesis + grpn-eng:encore-architect corrections, binding):
- Parity kernel + legacy-runtime lab = workspace package + CLI/CI runner OUTSIDE Encore (Cloud Run can’t run pinned EOL images or tap MBUS). Encore surface = parity-result rows in work-ledger (always “work-ledger”, never “ledger” — merchant-accounting owns “ledger”).
- Staged scope: Orders-domain adapter first, generalizing Zaruba’s 3-oracle reconciliation; generalize further only per flagship gate.
- Legacy-runtime lab = pinned EOL Docker images to boot legacy stacks and record behavior. Legacy creds stay in the lab, never in Encore secrets.
- MBUS shadow-taps live inside the harness where a domain’s parity requires event comparison; the standalone MBUS bridge app is DROPPED.
- Recorded legacy traffic = PII/PCI → fixture masking/retention needs security sign-off.
- Known top risks (001): harness doesn’t generalize past Orders (detection: 2nd adapter costs >2× the first); “harness became the schedule” pre-mortem #2 (cap investment per flagship; fallback = impact-selected tests, the ~70% regression-reduction result).
- Fleet context: Robert runs agent fleets (proven ceiling ~64 concurrent; 1000 = queued, never concurrent). Work-ledger claims units; triage service dedups agent questions; fleet monitor = OTel/Grafana local-first. Harness verdicts gate promotion of a unit to the PR lane.
- Prior web evidence (
research/02-web-research.md, adversarially verified): Anthropic Bun port ~1M LOC / <2 weeks / ~64 agents / $165K API list, gate = 100% existing test suite; Airbnb state-machine + retry pipeline; ~6.08% agent test-regression base rate cut to 1.82% by impact analysis (~70%); no surviving published evidence on shadow-traffic effectiveness against agent regressions (open question #3) and none for >64 concurrent agents. - Economics anchor: program all-in $6.7M, M4 ≈ $0.9M; harness effort is Robert-lane, weeks not months, staged per flagship gate.
Terminology (binding)
- “work-ledger” (never plain “ledger” for our service). “Parity kernel”, “legacy-runtime lab” (or “legacy lab”), “adapter” (per-domain), “verdict” (PARITY / DIVERGED / UNVERIFIABLE), “evidence bundle”, “normalization ledger” (the report section listing what a diff ignores and why), “shadow-tap” (MBUS event capture point).
- Zaruba’s evidence standards apply to any number you state: source + window + confidence (MEASURED / MODELED / DARK / DESIGN). Never invent market data, quotes, or endorsements. Cite external claims with URL + date. Say plainly when evidence is unavailable.
Style for these documents
English, decisive, receipts over adjectives. Advisory-board sections are principle-based analytical simulations — never fabricated quotations or personal endorsements. Distinguish: confirmed fact / supported interpretation / hypothesis / assumption / unknown. Prefer short tables and tight prose; no padding, no generic-SaaS boilerplate. Each document ends with an “Open questions” section where evidence is missing. These docs live in Robert’s lane (not sent to Tomas verbatim), so normal punctuation is fine; if content is later excerpted for Tomas, it gets reformatted per his comm standards.
File map
| Path | What |
|---|---|
plans/002-dual-run-parity-harness/ |
This plan — all deliverables |
plans/001-factory-apps-validation/00-SYNTHESIS.md |
Portfolio decision + architect corrections (binding input) |
repos/monorepo-development/ |
Zaruba’s greenfield (system of record; CONFIDENTIAL — never publish content from it) |
analysis/legacy/ |
26-repo legacy sample fleet analysis |
research/02-web-research.md |
Verified agentic-refactoring evidence |
Scratchpad discovery/ |
Raw discovery notes from this plan’s research agents |