operator@gha-runner:~/checkout-service$ scan --source input.log --risk --evidence --style terminal-cli
provider=github-actions branch=feat/payment-pending-queue sha=b2c3d4e file=input.log local=yes
[ERR] exit=1 Run status
[OK] 6/8 Clean phases
[ERR] 2 Failing tests
[LOG] 139 Raw lines
[HYP] [|||||||||..] reason mapping Most likely area
+--- PHASE STRIP ---+width=line-count
+--- REVIEW CHECKLIST ---+operator.todo
  • Inspect `chargeOrder` status normalization for `pending_review` and `requires_action`.
  • Confirm whether the public contract should expose `reason: "pending"` for all queued charges.
  • Re-run `npm test -- tests/checkout/charge.test.ts` after the mapping change.
  • Check webhook handling still preserves the original gateway status internally.
  • Add a focused test for any new pending status that can be queued.
+--- RISK HOTSPOTS ---+evidence-linked
[ERR]

First failed assertion shows `pending_review` received where `pending` was expected.

[ERR]

Second failed assertion shows `requires_action` received where `pending` was expected.

[OK] lines 49-58

Lint and typecheck passed, so the break is behavioral rather than syntax/type-level.

+--- SUSPECTED ROOT CAUSE ---+[HYP]

Hypothesis: the queue path now preserves raw provider states instead of normalizing them to `pending` before returning the API response.

Evidence: assertion diffs at lines 85-95 and 104-110. Distinguish by checking the return object in `chargeOrder` before webhook persistence.

+--- FAILING TESTS ---+2
[FAIL] chargeOrder > queues the charge and returns pending for a pending_review status tests/checkout/charge.test.ts:32:21 · [||||||||||] reason: pending_review != pending
[FAIL] chargeOrder > queues the charge for a requires_action status tests/checkout/charge.test.ts:42:25 · [|||||||||.] reason: requires_action != pending
+--- RAW LOG ---+grep=off