Skip to content

test(gateway): mock orphan recovery in startup proof - #117922

Merged
steipete merged 1 commit into
mainfrom
codex/fix-startup-model-runtime-large2
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-startup-model-runtime-large2

Conversation

@steipete

@steipete steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Mock the unrelated orphan-recovery marker in the Gateway startup event-loop proof, matching the canonical sibling seam.
  • Keep the real startup runtime, auth, SQLite, HTTP, ordering, and catalog assertions intact.

Verification

  • Hosted symptom: four required large2 runs timed out at the event-loop test after roughly 222–226s.
  • Focused predecessor + target suite: 12/12 before and after; observed duration improved from 26.23s to 12.38s, with the caveat that the after run benefits from a warm module/cache state.
  • Exact-path formatting and diff check: passing.
  • Independent FIRST and SECOND reviews: no findings.
  • Authenticated final review: no findings.
  • TruffleHog exact diff scan: zero findings.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Aug 2, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 5:15 AM ET / 09:15 UTC.

ClawSweeper review

What this changes

The PR mocks the orphan-session recovery marker in a Gateway startup responsiveness test so an unrelated session-recovery import graph does not dominate the timed proof.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The patch appears to be a sound, narrowly scoped test-isolation change: the Gateway responsiveness proof continues to exercise real startup, while orphan-session marking has dedicated owner-level coverage. This PR should remain open for the existing maintainer review and exact-head CI gates; no actionable patch defect was found.

Priority: P3
Reviewed head: 0c28a04adae1d1f56838112495a5a41dd066abf8

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused test-only patch with a coherent ownership boundary and no concrete correctness or security finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-labeled, test-only PR is outside the external contributor real-behavior-proof gate; its body nevertheless records hosted focused-suite evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-labeled, test-only PR is outside the external contributor real-behavior-proof gate; its body nevertheless records hosted focused-suite evidence.
Evidence reviewed 5 items Current test boundary: The current proof imports and calls Gateway post-attach startup, gates channel startup, and asserts an HTTP health response plus no plugin discovery or provider catalog execution; it is a responsiveness proof rather than recovery-marker behavior coverage.
Production ownership seam: Gateway startup lazily imports the narrow orphan-marking module specifically to keep broader restart recovery runtime out of the pre-channel path, matching the proposed mock target.
Dedicated sibling coverage: The post-attach startup suite already mocks the marker and asserts its ordering, failure handling, and interaction with model prewarming and channel startup, so the mock does not remove the only coverage of that behavior.
Findings None None.
Security None None.

How this fits together

Gateway startup starts post-attach sidecars after the health endpoint is available. The affected test holds channel startup behind a barrier and verifies that the health probe stays responsive without loading provider catalogs; orphan-session marking is a separate startup concern invoked on that path.

flowchart LR
  A[Gateway startup test] --> B[Post-attach sidecars]
  B --> C[Orphan-session marker]
  B --> D[Model-runtime prewarm]
  D --> E[Channel startup barrier]
  A --> F[Health endpoint]
  F --> G[Responsive health assertion]
  C --> H[Dedicated recovery tests]
Loading

Before merge

  • Add real behavior proof - Not applicable: This maintainer-labeled, test-only PR is outside the external contributor real-behavior-proof gate; its body nevertheless records hosted focused-suite evidence.
  • Resolve merge risk (P1) - GitHub reports the branch as mergeable but behind current main; refresh the focused startup proof on the exact merge result after the remaining checks complete.
Agent review details

Security

None.

PR surface

Tests +6. Total +6 across 1 file.

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

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the isolated responsiveness proof and the dedicated orphan-marker tests separate, then land only after the current head has the required CI and maintainer approval.
  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 isolated responsiveness proof and the dedicated orphan-marker tests separate, then land only after the current head has the required CI and maintainer approval.

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

Yes, at source level: the timed Gateway proof imports post-attach startup, whose orphan-marker lazy import can pull a separate recovery graph. The reported hosted timeout was not rerun because this review is read-only.

Is this the best way to solve the issue?

Yes: mocking the narrow marker in this proof is the best separation because the marker’s ordering and failure behavior remain covered in the post-attach startup suite, while this test retains the real Gateway startup and health-response path.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a small test-performance and reliability refinement with no production runtime or user-facing 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-labeled, test-only PR is outside the external contributor real-behavior-proof gate; its body nevertheless records hosted focused-suite evidence.

Label justifications:

  • P3: This is a small test-performance and reliability refinement with no production runtime or user-facing 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-labeled, test-only PR is outside the external contributor real-behavior-proof gate; its body nevertheless records hosted focused-suite evidence.

Evidence

What I checked:

Likely related people:

  • steipete: Current-main commits for the original gated-startup health proof and its metadata optimization are both authored by Peter Steinberger, matching the author identity for this focused follow-up. (role: introduced and recently refined the startup responsiveness proof; confidence: high; commits: 7ded64d4b646, 26cf4e6130a8, 0c28a04adae1; files: src/gateway/server-startup-model-runtime.event-loop.test.ts, src/gateway/server-startup-post-attach.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Let the remaining exact-head checks complete, then refresh the focused startup proof if the merge result changes.

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 merged commit 8404f5f into main Aug 2, 2026
104 of 110 checks passed
@steipete
steipete deleted the codex/fix-startup-model-runtime-large2 branch August 2, 2026 09:22
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime 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