Skip to content

test: pin sandbox_smoke.py rail proof, document it in the runbook - #74

Merged
FetchDoge merged 1 commit into
mainfrom
m5/sandbox-smoke-pin
Nov 2, 2026
Merged

FetchDoge merged 1 commit into
mainfrom
m5/sandbox-smoke-pin

Conversation

@FetchDoge

Copy link
Copy Markdown
Owner

scripts/sandbox_smoke.py is the one-command live PayPal sandbox rail proof (OAuth, a $1.00 AUTHORIZE-intent order, an order state read, and, only when the order is already payer-approved, authorize plus an immediate void). It was mentioned in no doc and covered by no test, the same gap PR #73 closed for launch_sandbox.py.

What is pinned (fake sandbox client, no network, no credentials)

  • Missing credentials: exit 2 with instructions and no client constructed (so no network is touched); a subprocess test pins the real __main__ exit code.
  • OAuth failure: exit 1 naming the step, before any order is created.
  • Unapproved order: exit 0 through order creation and reads, authorize never called; the approval-wait timeout path also passes without authorizing.
  • Approved order: authorize called once with the configured merchant, the hold is voided, and capture is never called (the script's no-money-moves promise).
  • Authorize that still needs payer approval: exit 1, no void, no capture.

Docs

  • docs/sandbox-runbook.md: new Rail smoke check section with the exit codes and PERMIT_SMOKE_WAIT_S.
  • docs/submission-checklist.md: the sandbox requirements row now names scripts/sandbox_smoke.py.

Verification

  • New tests: 8 passed. Full suite on the branch: 425 passed, 3 skipped (417 baseline + 8). demo.py VERIFIED (16 receipts). Ruff clean on the new test file; the doc/smoke subset also passes under -O.

scripts/sandbox_smoke.py is the one-command live PayPal sandbox rail
proof (OAuth, $1.00 AUTHORIZE order, order read, authorize + void only
when already payer-approved, never a capture). It was mentioned in no
doc and covered by no test. Eight new tests pin it with a fake sandbox
client: exit 2 with no client constructed when credentials are absent,
exit 1 naming the failed step, an unapproved order passes before
authorize, an approved order authorizes then voids and never captures.
The sandbox runbook gains a Rail smoke check section with the exit
codes, and the submission checklist names the script on the sandbox
row. Suite: 425 passed, 3 skipped.

Co-authored-by: Marcus Richards <marsoju@gmail.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T15:30:36.551599Z 931b74b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@FetchDoge
FetchDoge merged commit 20c74bf into main Nov 2, 2026
9 checks passed
@FetchDoge
FetchDoge deleted the m5/sandbox-smoke-pin branch November 2, 2026 15:31
FetchDoge pushed a commit that referenced this pull request Nov 3, 2026
README claimed 413 passed / 416 collected verified 2026-10-29 at
3280b92, but PRs #73 and #74 added 12 tests: main at 20c74bf runs
425 passed, 3 skipped (428 collected), re-verified locally
2026-11-03. The Status line also still carried the pre-shift
targets (video by Nov 8, Devpost by Nov 10); the readiness target
moved 2026-11-02 to video by Nov 6 (M5) and submission-ready
Nov 9 (M6). Docs only, no code change.
FetchDoge added a commit that referenced this pull request Nov 3, 2026
README claimed 413 passed / 416 collected verified 2026-10-29 at
3280b92, but PRs #73 and #74 added 12 tests: main at 20c74bf runs
425 passed, 3 skipped (428 collected), re-verified locally
2026-11-03. The Status line also still carried the pre-shift
targets (video by Nov 8, Devpost by Nov 10); the readiness target
moved 2026-11-02 to video by Nov 6 (M5) and submission-ready
Nov 9 (M6). Docs only, no code change.

Co-authored-by: Marcus Richards <marsoju@gmail.com>
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.

1 participant