85 lines
3.5 KiB
Markdown
85 lines
3.5 KiB
Markdown
# Luban one-by-one stop-on-SMS runner and 2026-05-11 retest
|
|
|
|
## Why this was added
|
|
|
|
BOSS asked to retry Luban SMS verification one order at a time:
|
|
|
|
- buy only one active Luban order at once;
|
|
- if `sms_received` occurs, notify immediately;
|
|
- submit the code with the proven OpenAI phone-code `InputEvent` method;
|
|
- if submission fails again, keep the OpenAI `phone-verification` page and do **not** release/navigate away/waste the number before manual retry.
|
|
|
|
This produced a reusable runner:
|
|
|
|
```text
|
|
scripts/luban_one_by_one_stop_on_sms.py
|
|
```
|
|
|
|
## Runner behavior
|
|
|
|
Run example:
|
|
|
|
```bash
|
|
PYTHONUNBUFFERED=1 MAX_BUYS=10 PHONE_POLL_SECONDS=220 MIN_HOLD_SECONDS=180 \
|
|
/Users/chick/homebrew/opt/python@3.11/bin/python3.11 \
|
|
/Users/chick/.hermes/skills/software-development/codex-oauth-plus-onboarding/scripts/luban_one_by_one_stop_on_sms.py \
|
|
| tee /tmp/luban_one_by_one_stop_on_sms.log
|
|
```
|
|
|
|
Important behavior:
|
|
|
|
1. Resolves Luban OpenAI/ChatGPT services dynamically.
|
|
2. Prioritizes France first because a previous run received a France code.
|
|
3. Verifies OpenAI country gate before buying.
|
|
4. Holds failed/timeout/submit-no-SMS-page orders for at least `MIN_HOLD_SECONDS` before release.
|
|
5. Retries Luban `reject` when provider returns messages like `停用失败,该供应商需要在:N 秒 后停止`.
|
|
6. Stops immediately when a code is received.
|
|
7. Uses the corrected OpenAI code submit method:
|
|
- `input[autocomplete="one-time-code"], input[name="code"], input`
|
|
- native `HTMLInputElement.value` setter
|
|
- `InputEvent('input', {inputType:'insertText', data:code})`
|
|
- `change`
|
|
- exact `继续` click first
|
|
8. If code submit does not leave `/phone-verification`, logs `sms_submit_failed_hold_for_retry` and stops without releasing or navigating.
|
|
9. Never prints full phone numbers or SMS code. Code is only written to `/tmp/luban_one_by_one_sms_code.txt`.
|
|
|
|
## 2026-05-11 run result
|
|
|
|
Command used from `/tmp` copy:
|
|
|
|
```text
|
|
MAX_BUYS=10 PHONE_POLL_SECONDS=220 MIN_HOLD_SECONDS=180
|
|
```
|
|
|
|
Summary:
|
|
|
|
```json
|
|
{
|
|
"bought": 4,
|
|
"direct_reject": 0,
|
|
"sms_timeout": 2,
|
|
"sms_received": 0,
|
|
"sms_submit_failed": 0,
|
|
"success": false,
|
|
"submit_no_sms_page": 2
|
|
}
|
|
```
|
|
|
|
Orders:
|
|
|
|
| Country | request_id | Result | Release |
|
|
|---|---:|---|---|
|
|
| France | 34133707 | `submit_no_sms_page`; stayed on `add-phone` without explicit reject | later confirmed `该号码已释放` |
|
|
| Germany | 34133807 | reached `phone-verification`, page channel `whatsapp`, Luban `msg=wait` for ~220s | retry release success |
|
|
| Netherlands | 34133909 | reached `phone-verification`, page channel `whatsapp`, Luban `msg=wait` for ~220s | release success |
|
|
| Argentina | 34133959 | `submit_no_sms_page`; stayed on `add-phone` | release success |
|
|
|
|
No SMS code arrived in this retest, so the corrected code-submit path was not exercised.
|
|
|
|
## Pitfalls learned
|
|
|
|
- `submit_no_sms_page` is possible without explicit OpenAI rejection. Treat it as neither direct reject nor SMS-page no-delivery. Hold and release the order, then navigate/recover `add-phone` before continuing.
|
|
- Some Luban suppliers require longer than exactly 180 seconds to reject. Parse the provider wait message and retry until success/known released, instead of only retrying once.
|
|
- Repeated phone attempts can leave OpenAI `add-phone` in `糟糕,出错了!` state; do not buy another number until the page is reloaded/recovered and the country controls work.
|
|
- `countryValue:null`/`countryText:null` after an error page means the selector is absent; this is a page-state failure, not a country unsupported result.
|