links.10x.in/docs/end-user/playbooks/ops-lab-targeting-lab Published:

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

  1. TL-01 New visitor baseline: no lp_seg, default order, zero rollups.
  2. TL-02 Moderate engagement: moderate_engagement, cookie present, rerank changed.
  3. TL-03 High engagement + campaign: high_engagement plus SEG# and SEGCAMP# rollups.
  4. TL-04 Consent transitions: full=30d, basic=24h, denied clears cookie/local state.
  5. TL-05 Tampered/expired fail-open: invalid cookie cannot satisfy segmentIn, fallback route chosen.

3. UI workflow

  1. Open https://app.10x.in/apps/targeting-lab.
  2. Pick scenario, mode (mock, live, dual), and optional campaign/consent overrides.
  3. Run selected scenario or run all.
  4. Validate sections:
  • Simulated link order
  • Deep vector debug panel
  • Raw + decoded cookie payload
  • Rollup table with mini trend chart
  • Run logs and assertion results
  1. For compatibility path, open https://app.10x.in/test/intent-engine-browser/index.html and 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 (default dual)
  • --scenario core5|all|TL-01,TL-05
  • --artifact <path>
  • --open / --no-open
  • --ui-url <url> (default http://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 running live or dual.

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 live for 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.

8. Related links