[codex] Share staging dry-run response parsing#889
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR refactors HTTP response handling in the staging webhook dry-run script to eliminate duplicated JSON parsing and validation logic. Two client functions now delegate to a centralized ChangesHTTP Response Parsing Refactoring
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
xiefuzheng713-alt
left a comment
There was a problem hiding this comment.
Reviewed current head 316e578c78b6c64e247afbc489bb74d73b96bc87 as a non-author.
Evidence checked:
- inspected
scripts/staging_webhook_dry_run.pyandtests/test_staging_webhook_dry_run.py; - confirmed
_post_json()and_post_webhook()now share_parse_object_response()while preserving URL validation before posting, HTTPraise_for_status(), JSON parsing, and non-object JSON rejection behavior; - confirmed the webhook path still signs the compact JSON body and sends the same GitHub delivery/event/signature headers before parsing the response;
- confirmed the new regression test covers non-object JSON responses with an
httpx.Responsecarrying a request, so status handling remains realistic; - verified GitHub reports
mergeStateStatus=CLEAN, hosted Quality/readiness/docs/image success, and CodeRabbit success; - confirmed there were no prior human reviews on this head before posting this review.
Validation run on this exact head:
uv run --python 3.12 --extra dev python -m pytest tests/test_staging_webhook_dry_run.py -q-> 14 passed.uv run --python 3.12 --extra dev ruff check scripts/staging_webhook_dry_run.py tests/test_staging_webhook_dry_run.py-> passed.uv run --python 3.12 --extra dev ruff format --check scripts/staging_webhook_dry_run.py tests/test_staging_webhook_dry_run.py-> 2 files already formatted.uv run --python 3.12 --extra dev mypy scripts/staging_webhook_dry_run.py-> success.uv run --python 3.12 --extra dev python scripts/docs_smoke.py-> docs smoke ok.git diff --check origin/main...HEAD-> clean.git merge-tree --write-tree origin/main HEAD-> clean tree3f62f64d86056985ae17934143787b441c021fe0.
No blocker found. Scope stays inside staging dry-run response parsing/tests and does not touch ledger, wallet, treasury, payout, admin-token behavior, private data, secrets, exchange, bridge, cash-out, or MRWK price behavior.
Refs #846
Summary:
_parse_object_responsefor staging dry-run HTTP postsValidation:
Duplicate/scope check:
Summary by CodeRabbit
Refactor
Tests