Skip to content

Add full-flow order tracing and per-section selector discovery#19

Merged
Multipixelone merged 2 commits into
mainfrom
claude/order-debug-dump-pk6jep
Jun 22, 2026
Merged

Add full-flow order tracing and per-section selector discovery#19
Multipixelone merged 2 commits into
mainfrom
claude/order-debug-dump-pk6jep

Conversation

@Multipixelone

Copy link
Copy Markdown
Owner

Add a trace-order CLI command and an opt-in live trace that dump a
rendered DOM, a selector probe, and a screenshot at every checkpoint of
the buy flow — product page, cart, cart view, delivery, payment, and the
review page. Unlike dump-dom/verify-selectors (which stop at the
product page), this reaches the checkout/review surface where the
place-order, order-total, and payment selectors finally render, so they
become discoverable and verifiable.

Implementation threads an optional FlowTracer through the real
BasePurchaser.buy() and the store-specific _start_checkout(), defaulting
to a shared no-op singleton. A normal worker/orchestrator buy pays only one
inert call per checkpoint — the live order path is unchanged. The CLI
command hard-forces DRY_RUN (like dry-run), so it always halts at the
review page before Place Order. Every checkpoint is best-effort: a capture
failure is logged and swallowed and can never alter the order's outcome.

  • purchase.py: FlowTracer/TraceStep/_NullTracer/new_run_id; checkpoints
    in buy() and both _start_checkout overrides; trace full-page shot prefix.
  • cli.py: trace-order command with a per-step PASS/MISS digest.
  • config.py: trace_orders flag (ROOMIEORDER_TRACE_ORDERS, default off) wired
    into the orchestrator for opt-in live tracing.
  • New /trace-order skill; bring-up/triage-failure/AGENTS docs updated.
  • Tests for the dry-run contract, step output, no-op default, checkpoint
    ordering, and best-effort probe-failure isolation.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01F5GyaYcKJEkPz7nCaKfrm7

Add a `trace-order` CLI command and an opt-in live trace that dump a
rendered DOM, a selector probe, and a screenshot at every checkpoint of
the buy flow — product page, cart, cart view, delivery, payment, and the
review page. Unlike `dump-dom`/`verify-selectors` (which stop at the
product page), this reaches the checkout/review surface where the
place-order, order-total, and payment selectors finally render, so they
become discoverable and verifiable.

Implementation threads an optional `FlowTracer` through the real
`BasePurchaser.buy()` and the store-specific `_start_checkout()`, defaulting
to a shared no-op singleton. A normal worker/orchestrator buy pays only one
inert call per checkpoint — the live order path is unchanged. The CLI
command hard-forces DRY_RUN (like `dry-run`), so it always halts at the
review page before Place Order. Every checkpoint is best-effort: a capture
failure is logged and swallowed and can never alter the order's outcome.

- purchase.py: `FlowTracer`/`TraceStep`/`_NullTracer`/`new_run_id`; checkpoints
  in `buy()` and both `_start_checkout` overrides; `trace` full-page shot prefix.
- cli.py: `trace-order` command with a per-step PASS/MISS digest.
- config.py: `trace_orders` flag (ROOMIEORDER_TRACE_ORDERS, default off) wired
  into the orchestrator for opt-in live tracing.
- New `/trace-order` skill; bring-up/triage-failure/AGENTS docs updated.
- Tests for the dry-run contract, step output, no-op default, checkpoint
  ordering, and best-effort probe-failure isolation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F5GyaYcKJEkPz7nCaKfrm7
@Multipixelone Multipixelone enabled auto-merge June 22, 2026 07:54
The nix pre-commit hook runs mypy over the test files too (a scope the
local `mypy src/roomieorder` skipped):
- Drop `is None` on the no-op tracer call (`[func-returns-value]` — the
  method returns None).
- Remove three redundant `# type: ignore[arg-type]` comments; the module
  already disables arg-type via a file-level directive (`[unused-ignore]`).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F5GyaYcKJEkPz7nCaKfrm7
@Multipixelone Multipixelone merged commit 1c9a653 into main Jun 22, 2026
2 checks passed
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.

2 participants