Ops Lab Playbook: Targeting Lab
Last updated: 2026-03-08
1. Purpose and when to use this
Use Targeting Lab to simulate cookie targeting, vector reranking, and segment rollup behavior in a deterministic sandbox. The same scenario manifest powers both UI and CLI outputs.
2. Included scenarios
TL-01New visitor baseline: nolp_seg, default order, zero rollups.TL-02Moderate engagement:moderate_engagement, cookie present, rerank changed.TL-03High engagement + campaign:high_engagementplusSEG#andSEGCAMP#rollups.TL-04Consent transitions: full=30d, basic=24h, denied clears cookie/local state.TL-05Tampered/expired fail-open: invalid cookie cannot satisfysegmentIn, fallback route chosen.
3. UI workflow
- Open
https://app.10x.in/apps/targeting-lab. - Pick scenario, mode (
mock,live,dual), and optional campaign/consent overrides. - Run selected scenario or run all.
- Validate sections:
- Simulated link order
- Deep vector debug panel
- Raw + decoded cookie payload
- Rollup table with mini trend chart
- Run logs and assertion results
- For compatibility path, open
https://app.10x.in/test/intent-engine-browser/index.htmland follow launcher links.
4. CLI workflow
Run the demo script from repo root:
npm run targeting-lab:demo -- --mode dual --scenario core5 --artifact .artifacts/targeting-lab/latest.json --open
Useful options
--mode mock|live|dual(defaultdual)--scenario core5|all|TL-01,TL-05--artifact <path>--open/--no-open--ui-url <url>(defaulthttp://127.0.0.1:5173/apps/targeting-lab-harness)
5. Artifact interpretation
The artifact JSON includes:
summary: total scenarios, mock pass count, live pass count, overall pass count.results[*].mock: assertions, final cookie/vector/order state, rollup rows, logs.results[*].live: live probe status when runningliveordual.
6. Expected behavior in dual mode
Dual mode always runs mock execution plus live probes. If live probes fail but mock scenarios pass, overall success remains based on mock pass counts.
7. Failure modes and remediation
- UI URL unreachable after
--open: - Start the UI locally:
npm --prefix apps/product-suite-web run dev - Live probe failures in
dual: - Confirm API base and endpoint availability, then rerun with
--mode livefor strict live-only pass criteria. - Scenario mismatch between UI and CLI:
- Verify both are using
apps/product-suite-web/src/targeting-lab/scenarios/manifest.ts.