Skip to content

test(plugin-sdk): clear the completed cancellation deadline - #134599

Merged
steipete merged 1 commit into
mainfrom
codex/test-sdk-diff-deadline
Sep 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-sdk-diff-deadline

Conversation

@steipete

@steipete steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

The SDK API diff cancellation test discards the handle for its five-second observation deadline. When the real child closes first, that timer remains scheduled. Use the existing withTestTimeout helper to clear it on either outcome.

The test still launches the real CLI, sends SIGTERM, requires exit 143, and verifies registered-worktree cleanup, owned-directory deletion and preservation of the neighboring sentinel. All existing 10-second startup, five-second cancellation and 15-second overall bounds remain.

The native case passes before and after. A direct helper probe confirms timer cleanup, rejection identity and unresolved-deadline failure. Full changed checks and independent Codex autoreview pass. Production code is unchanged and tests shrink by four lines; one residual timer is removed, with no claimed five-second runtime saving.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 1, 2026
@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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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:10 PM ET / September 1, 2026, 01:10 UTC.

ClawSweeper review

What this changes

The PR replaces an ad hoc cancellation timeout in the Plugin SDK API-diff CLI test with the shared timeout helper so the timer is cleared after the child process exits.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No correctness or security finding: the shared helper preserves the five-second cancellation failure while clearing the scheduled deadline. This maintainer-authored, maintainer-labeled PR stays open for its normal merge decision and exact-head CI.

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

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving test cleanup that uses the established timeout owner and retains the real child-process assertions.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test-only change does not alter a user-facing production path; the relevant evidence is the real-child test design and exact-head CI, not contributor live-proof media.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored test-only change does not alter a user-facing production path; the relevant evidence is the real-child test design and exact-head CI, not contributor live-proof media.
Evidence reviewed 6 items Shared timeout semantics: The helper races the supplied promise against the same deadline and clears its timer in a finally block on either resolution or rejection.
Changed cancellation assertion: The introduced hunk wraps the real child close promise with the shared five-second timeout; exit-code and cleanup assertions remain afterward.
Owner-boundary behavior: The CLI records termination, aborts its child work, cleans registered worktrees in finally, and then returns exit 143; the test continues to exercise that real lifecycle.
Findings None None.
Security None None.

How this fits together

The Plugin SDK API-diff test starts the CLI in a temporary worktree, sends it a termination signal, then verifies exit status and cleanup. The shared timeout helper bounds that asynchronous observation and releases its timer after settlement.

flowchart LR
  A[API diff test] --> B[Start CLI child]
  B --> C[Send termination signal]
  C --> D[Shared timeout helper]
  D --> E[Child exit result]
  E --> F[Exit and cleanup assertions]
Loading

Decision needed

Question Recommendation
Should this maintainer-authored test cleanup merge once its exact-head required checks complete? Merge after exact-head CI: Accept the test-only cleanup once required checks for the current head are green.

Why: Repository policy preserves MEMBER and maintainer-labeled items for explicit maintainer handling even when the focused patch has no review finding.

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -4. Total -4 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 2 6 -4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 2 6 -4

Review metrics

Metric Value Why it matters
Production versus test delta production +0, tests -4 net The branch only consolidates a test deadline with an existing helper; no CLI or Plugin SDK runtime code changes.

Technical review

Best possible solution:

Keep the cancellation test on the shared timeout helper so deadline cleanup has one canonical implementation.

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

Not applicable: this PR repairs test-harness timer cleanup rather than reporting a user-facing product failure; source directly establishes the scheduled timer and its shared-helper cleanup path.

Is this the best way to solve the issue?

Yes: the existing helper preserves the race and error message while clearing the deadline in finally, avoiding a duplicate timeout implementation.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a small test-harness cleanup with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored test-only change does not alter a user-facing production path; the relevant evidence is the real-child test design and exact-head CI, not contributor live-proof media.

Label justifications:

  • P3: This is a small test-harness cleanup with no 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 maintainer-authored test-only change does not alter a user-facing production path; the relevant evidence is the real-child test design and exact-head CI, not contributor live-proof media.

Evidence

What I checked:

Likely related people:

  • steipete: 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.

@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Exact-head CI and native prepare now pass. The latest PR comments contain no published ClawSweeper review or Rank-up moves; the publisher is not a landing dependency. Root source review and independent Codex autoreview found no actionable issue.

The real CLI cancellation case passes before and after with SIGTERM exit 143, worktree/root cleanup and neighboring-sentinel preservation. The existing timeout helper additionally has direct timer-clear and unresolved-deadline proof. Production +0/-0; tests +2/-6. Proceeding through the native merge gate.

@steipete
steipete merged commit 3c23e2f into main Sep 1, 2026
166 of 167 checks passed
@steipete
steipete deleted the codex/test-sdk-diff-deadline branch September 1, 2026 01:14
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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: XS 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