Skip to content

refactor: simplify timeout and announcement helpers - #148450

Merged
steipete merged 2 commits into
mainfrom
codex/timeout-ownership-audit
Sep 14, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/timeout-ownership-audit

Conversation

@steipete

@steipete steipete commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Related: #148388

What Problem This Solves

The maintainer timeout-ownership audit found an unreachable timeout branch and a redundant subagent announcement formatter.

User Impact

No user-visible behavior changes. Timeout selection, cancellation, and announcement text stay the same.

Why This Change Was Made

The dynamic-tool resolver returns the message timeout before reaching its configuration helper, so that helper's message branch cannot run. The private announcement formatter has one caller; inlining its body preserves the exported contract. Together these remove 11 net production lines.

The final merge commit contains only these two cleanup files. The six functional timeout findings from the broader audit remain separate work.

Evidence

  • 353 focused tests passed across subagent announcement delivery and Codex dynamic-tool execution.
  • Changed-file checks passed, including core/plugin and test typechecks, lint, export scans, and runtime guards.
  • Independent Codex review through P2, with complete owner modules supplied, found no actionable findings. git diff --check passed.
  • Initial hosted preflight exposed a duplicate Wizard recovery test inherited from main. The branch carried the one-line correction while qualifying: all six PR/push × runner-backend planner combinations and 76 planner tests passed, preserving every unique database-worker consumer. That correction landed independently in test(ci): deduplicate database worker registry #148425 before this merge. The branch was also refreshed onto main's Custodian test correction from fix(ui): restore Custodian wizard session recovery coverage #148444.
  • Exact-head CI passed on 2e379e45e8ba49e4ef87bcaad192b042c6fb304b; all 140 PR checks passed. Native prepare and merge verified that same head.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling extensions: codex size: XS maintainer Maintainer-authored PR labels Sep 14, 2026
@steipete
steipete marked this pull request as ready for review September 14, 2026 18:30
@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 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 2:37 PM ET / 18:37 UTC.

ClawSweeper review

What this changes

Removes an unreachable Codex message-timeout branch and inlines a private subagent announcement formatter while preserving timeout selection and warning text.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a useful, behavior-preserving cleanup with no actionable correctness findings. Current main retains both redundant paths, and the related merged timeout fix does not supersede this work.

Priority: P3
Reviewed head: 0c932cc8d22890d47cd93f03e2e48ce512302f81

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable cleanup with source-supported equivalence and no actionable defects.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored cleanup is exempt from external-contributor runtime proof; neither introduced hunk changes authority or observable behavior, and the reported focused tests are supplemental validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored cleanup is exempt from external-contributor runtime proof; neither introduced hunk changes authority or observable behavior, and the reported focused tests are supplemental validation.
Evidence reviewed 8 items Verified introduced scope: The merge-base-to-head diff contains only the unreachable branch removal and formatter inlining. The verified test-merge comparison against its main parent has the same two-file scope; unrelated endpoint drift is not attributed to this PR.
Message timeout remains unchanged: The resolver returns the existing 600,000 ms message budget before either call to the private configuration helper. Both ordinary execution and side-question execution use this resolver. Existing tests cover message calls with and without a 30,000 ms transport timeout.
Announcement formatting is identical: The exported formatter now directly contains the former private helper's exact expression. Its delivery caller and the underlying queue-failure summary owner are unchanged, including fallback-only output when no summary exists.
Findings None None.
Security None None.

How this fits together

The Codex plugin assigns time budgets to OpenClaw tools requested by the model. Separately, subagent announcement delivery formats diagnostic warnings when it cannot wake the requesting session.

flowchart TD
  A[Codex tool request] --> B[Select tool time budget]
  B --> C[Execute tool with watchdog]
  D[Subagent completion] --> E[Wake requesting session]
  E --> F[Format wake failure]
  F --> G[Warning and delivery fallback]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -11. Total -11 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 2 2 13 -11
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 2 13 -11

Review metrics

None.

Technical review

Best possible solution:

Keep timeout selection in its existing resolver and preserve the exported announcement formatter with the redundant private paths removed.

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

Not applicable: this is internal cleanup, and source inspection establishes that the removed timeout branch is unreachable and the formatter expression is preserved.

Is this the best way to solve the issue?

Yes: the patch removes redundancy within the existing owners without adding APIs, changing settings, or altering cancellation and delivery decisions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against eb8f6bb18334.

Labels

Label changes:

  • add P3: This removes redundant internal code without changing user-visible behavior or configuration.
  • 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: The maintainer-authored cleanup is exempt from external-contributor runtime proof; neither introduced hunk changes authority or observable behavior, and the reported focused tests are supplemental validation.

Label justifications:

  • P3: This removes redundant internal code without changing user-visible behavior or configuration.
  • 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: The maintainer-authored cleanup is exempt from external-contributor runtime proof; neither introduced hunk changes authority or observable behavior, and the reported focused tests are supplemental validation.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • gaoanze888: 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.

Remove the unreachable message-specific configuration branch after the dynamic-tool resolver early return. Inline the private announcement failure formatter into its only exported caller, preserving exact output and timeout behavior.

Validation: 353 focused tests, changed-file checks, and independent review through P2 passed. Follow-up cleanup from the timeout ownership audit after #148388.
The compact Node planner correctly refuses repeated file identities. Remove the second registry entry while preserving all 68 unique database-worker consumers and their execution owner. This is the same inherited CI correction identified in #148423 and #148425.

Validation: reproduced the original preflight error, all six planner profiles now generate, 76 planner tests and scoped changed checks pass, and independent review of the complete candidate is clean through P2.
@steipete
steipete force-pushed the codex/timeout-ownership-audit branch from 0c932cc to 2e379e4 Compare September 14, 2026 18:49
@steipete
steipete merged commit b8de9f8 into main Sep 14, 2026
189 of 190 checks passed
@steipete
steipete deleted the codex/timeout-ownership-audit branch September 14, 2026 19:06
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
* refactor: simplify timeout and announcement helpers

Remove the unreachable message-specific configuration branch after the dynamic-tool resolver early return. Inline the private announcement failure formatter into its only exported caller, preserving exact output and timeout behavior.

Validation: 353 focused tests, changed-file checks, and independent review through P2 passed. Follow-up cleanup from the timeout ownership audit after openclaw#148388.

* fix(ci): remove duplicate Wizard recovery test registration

The compact Node planner correctly refuses repeated file identities. Remove the second registry entry while preserving all 68 unique database-worker consumers and their execution owner. This is the same inherited CI correction identified in openclaw#148423 and openclaw#148425.

Validation: reproduced the original preflight error, all six planner profiles now generate, 76 planner tests and scoped changed checks pass, and independent review of the complete candidate is clean through P2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling extensions: codex 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