Skip to content

test(minimax): clear OAuth observation deadlines - #134569

Merged
steipete merged 3 commits into
mainfrom
codex/test-minimax-oauth-deadlines
Sep 1, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/test-minimax-oauth-deadlines

Conversation

@steipete

@steipete steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

The two hanging-loopback OAuth cases leave their losing two-second observation timers running after the expected request rejection. Use the existing shared timeout helper, which clears its timer in finally, and combine the duplicate phase setup into a table.

Both real HTTP request phases, the 30 ms raw-fetch negative control, the captured 30-second production timeout callbacks, and the two-second observation limits remain. Login failures are converted to tagged outcomes before applying the test guard, so a guard expiry cannot satisfy the expected production AbortError/TimeoutError assertion.

All 33 selected OAuth and registration cases pass before and after. Suppressing the production callback makes the revised case fail through its independent guard; restoring the fixture passes the suite. Production is unchanged; tests +62/-94 (net -32). Two leftover timers are removed, with no elapsed-time gain claimed.

CI initially exposed ambient-date pricing assertions, which have since been fixed on main in #134564. The main refresh keeps that repair unchanged and resolves the resulting fixture conflicts. All 134 selected provider cases pass on the refreshed tree. Full changed checks and independent Codex autoreview pass.

@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 9:30 PM ET / September 1, 2026, 01:30 UTC.

ClawSweeper review

What this changes

The PR replaces ad-hoc MiniMax OAuth test observation races with the shared timeout helper and table-drives the authorization-code and token-polling loopback cases.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No blocking patch defect found. Current main still has the original observation race, while this member-authored PR cleanly replaces it with the existing SDK helper and retains both production OAuth timeout paths; it needs normal maintainer acceptance after exact-head checks finish.

Priority: P3
Reviewed head: 82f1254f0b9e58d8afa6d851fcd7bb8d0743900d
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative test refactor with preserved owner-boundary coverage; independent inspection of the transitive timeout implementation was unavailable in this checkout.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored PR changes only test code, so the external-contributor real-behavior gate does not apply; the supplied focused test report is supplemental evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored PR changes only test code, so the external-contributor real-behavior gate does not apply; the supplied focused test report is supplemental evidence.
Evidence reviewed 6 items Introduced test refactor: The introduced hunk changes only the observation helper and combines the two existing hanging-request scenarios; both continue to assert the captured 30-second production timeout and the request AbortSignal.
Production owner and caller remain covered: The MiniMax OAuth owner applies the same 30-second guarded fetch timeout to authorization-code and token requests, and the provider registration path invokes that owner for OAuth setup.
Current-main behavior is not redundant: Current main retains the former Promise.race observation helper, including its pending outcome and un-cleared timer path, so the central cleanup is not already implemented there.
Findings None None.
Security None None.

How this fits together

MiniMax OAuth uses an authorization-code request followed by token polling. Its tests simulate both HTTP phases against a hanging loopback server and verify that the production deadline aborts the request.

flowchart LR
  A[OAuth test harness] --> B[Hanging loopback server]
  B --> C[MiniMax OAuth login]
  C --> D[Production request timeout]
  D --> E[Tagged rejection assertion]
  E --> F[Observation deadline cleanup]
Loading

Decision needed

Question Recommendation
Should this member-authored, test-only cleanup merge once the exact-head checks complete? Merge after exact-head CI: Accept the focused test refactor once required checks complete for the current head.

Why: Current main does not contain the cleanup, but MEMBER-authored work and the protected maintainer label require an explicit maintainer merge decision.

Before merge

  • Resolve merge risk (P2) - The underlying @openclaw/fs-safe timeout implementation was unavailable in this read-only checkout, so its timer-cleanup behavior could not be independently rechecked beyond the contributor’s direct-source report.
  • Complete next step (P2) - The cleanup is not on current main, but member authorship and the maintainer label require normal maintainer merge acceptance rather than an automated repair lane.
Agent review details

Security

None.

PR surface

Tests -32. Total -32 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 62 94 -32
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 62 94 -32

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; tests +62/-94 (net -32) The patch reduces duplicated test code without changing shipped MiniMax OAuth behavior.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the production OAuth owner unchanged and merge this focused test cleanup after normal maintainer acceptance and exact-head CI completion.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the production OAuth owner unchanged and merge this focused test cleanup after normal maintainer acceptance and exact-head CI completion.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR changes test observation cleanup, not a separately reported user-facing failure. The source shows both OAuth request phases remain exercised through the existing local loopback scenario.

Is this the best way to solve the issue?

Yes, with a dependency-inspection limitation: the patch reuses the existing public plugin SDK timeout seam, preserves the meaningful production-timeout assertions, and removes duplicated phase setup.

AGENTS.md: unclear because the file could not be read completely.

Codex review notes: model internal, reasoning high; reviewed against b48e2dbce22c.

Labels

Label justifications:

  • P3: This is a focused test-maintenance cleanup with no introduced production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored PR changes only test code, so the external-contributor real-behavior gate does not apply; the supplied focused test report is supplemental evidence.

Evidence

What I checked:

  • Introduced test refactor: The introduced hunk changes only the observation helper and combines the two existing hanging-request scenarios; both continue to assert the captured 30-second production timeout and the request AbortSignal. (extensions/minimax/oauth.test.ts:193, 82f1254f0b9e)
  • Production owner and caller remain covered: The MiniMax OAuth owner applies the same 30-second guarded fetch timeout to authorization-code and token requests, and the provider registration path invokes that owner for OAuth setup. (extensions/minimax/oauth.ts:102, 82f1254f0b9e)
  • Current-main behavior is not redundant: Current main retains the former Promise.race observation helper, including its pending outcome and un-cleared timer path, so the central cleanup is not already implemented there. (extensions/minimax/oauth.test.ts:192, b48e2dbce22c)
  • Supported plugin SDK seam: The chosen plugin SDK subpath imports and re-exports withTimeout, and package exports expose that subpath to bundled plugins; existing sibling call sites use the same three-argument form. (src/plugin-sdk/text-utility-runtime.ts:67, 82f1254f0b9e)
  • Feature-history routing: History identifies Peter Steinberger as the author of the original MiniMax OAuth test file and of this cleanup; the available blame boundary prevents a verified source-line introduction claim. (extensions/minimax/oauth.test.ts:193, 22c6cef2919b)
  • Dependency inspection limitation: The facade resolves through @openclaw/fs-safe 0.5.6, but this checkout has no installed dependency tree and DNS was unavailable, so the underlying helper implementation could not be independently opened here; the contributor’s direct-source note is the supplied cleanup-contract evidence. (src/infra/fs-safe.ts:60, 82f1254f0b9e)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Alix-007: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-01T00:33:08.530Z sha dcf4e00 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T00:41:01.383Z sha dcf4e00 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T01:08:31.645Z sha b00f502 :: needs maintainer review before merge. :: none

@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer review completed at dcf4e00. I inspected the installed @openclaw/fs-safe 0.5.6 implementation directly: dist/timing.js:10-40 returns the Promise.race result inside try/finally and clears timeoutId in finally. A separate executable probe observed two timers created and two cleared, with no active handles remaining, across resolution and rejection; the resolved value and exact rejection object were preserved.

This addresses the latest ClawSweeper dependency-contract risk and Rank-up move. The focused 33-case run and suppressed-production-timeout negative control also pass as described in the PR. No code revision is needed.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 1, 2026
@steipete steipete changed the title test(minimax): clear OAuth observation deadlines test(providers): own OAuth deadlines and pricing dates Sep 1, 2026
@steipete steipete changed the title test(providers): own OAuth deadlines and pricing dates test(minimax): clear OAuth observation deadlines Sep 1, 2026
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer review complete for 82f1254. Exact-head hosted gates and native preparation pass. The latest ClawSweeper review has no patch findings; its dependency-inspection gap is covered by direct inspection of the installed @openclaw/fs-safe 0.5.6 timing implementation and a contract probe: successful and rejected operations started two deadlines, cleared both, retained no active handles, and preserved the original rejection identity. The SDK facade uses this implementation.

Both real loopback OAuth phases still assert the production 30-second deadline and abort signal. Suppressing the production timeout callback fails against the independent 2-second observation bound. All 33 OAuth/registration cases pass; the refreshed five-file CI reproduction also passes all 134 cases. Pricing fixture conflicts were resolved to exact upstream main bytes, so the final PR changes only oauth.test.ts (+62/-94; production unchanged). Normal maintainer acceptance is covered by the requested landing work; no rank-up code change remains.

@steipete
steipete merged commit bd2a91d into main Sep 1, 2026
106 of 108 checks passed
@steipete
steipete deleted the codex/test-minimax-oauth-deadlines branch September 1, 2026 01:37
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 2026
* test(minimax): clear OAuth observation deadlines

* test(providers): pin promotional pricing fixture dates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: minimax maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant