Skip to content

fix(macos): prevent premature catalog frame-limit test failures - #132585

Merged
steipete merged 1 commit into
mainfrom
steipete/vigilant-germain-101476
Aug 29, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/vigilant-germain-101476

Conversation

@steipete

@steipete steipete commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a problem where the native catalog frame-limit test could fail its readiness assertion under scheduling delay even though the first request succeeded and the next request correctly rejected an oversized response. The reported serial native run failed only the first-started marker expectation at d53f57c3d25059244376b5a799b89b8756b240ea.

Why This Change Was Made

The test already had a response FIFO, but still started a separate marker deadline before its first task reached the client's serial queue. The request's own timeout starts inside queue admission. Successful FIFO-writer acquisition now establishes that the fake server has consumed the first request and reached its response gate before the second request is created.

The shared test-only FIFO helper uses cancellable nonblocking opens, and first-request completion cancels readiness so an early server failure is reported rather than leaving a blocking open behind. SIGPIPE protection and owned descriptor, task, fake-server, and client cleanup remain explicit.

Warmup, the two-second request timeout, the 1024 → 64 frame-limit transition, the throwing first-request success check, and the exact responseTooLarge expectation remain intact. No production code, queue hooks, dependency settings, or SwiftPM backend configuration changes are included. Increasing the marker timeout or moving the old blocking FIFO open earlier would not repair the causal/failure-aware readiness boundary.

The marker originated in Codex App Server client reuse, authored and merged by @vincentkoc, and was retained by the later FIFO/warmup conversion in session provenance and native fixture cleanup, authored and merged by @steipete. This is a test-fixture synchronization repair, not a Codex protocol-defect claim.

User Impact

No runtime behavior changes. Native verification no longer imposes an unrelated pre-admission readiness deadline, without relaxing the frame-size or request-timeout contracts.

Production LOC: +0 / −0. Tests/test support: +79 / −31 (net +48).

Evidence

Reported pre-fix evidence: the serial native run on disposable macOS 26.6.2 / Swift 6.4 failed only the two-second first-started marker expectation; the first request succeeded and the second produced the expected responseTooLarge. The case took 4.444 seconds, which does not identify the delayed phase. The test/client originals are unchanged between the reported revision and the checked main baseline.

Completed source checks:

  • swiftformat --lint --cache ignore --config config/swiftformat apps/macos/Tests/OpenClawIPCTests/MacNodeCodexThreadCatalogTests.swift (SwiftFormat 0.62.1)
  • node scripts/check-no-conflict-markers.mjs
  • git diff --check
  • Fresh Codex autoreview of the uncommitted patch: P0-scoped scoped-clean, no findings (source review only)

Required exact-head CI is green: run 33252731903, attempt 1, including macos-swift, macos-node, and the Actions-owned openclaw/ci-gate, at a1272b232cb34b0f4f229d3403ae608f4b1503ed.

Native evidence was independently read from the completed job logs:

  • Parallel native job: target case passed in 0.137 seconds, catalog suite in 12.764 seconds; 1,888 app tests / 196 suites and 1,497 shared tests / 116 suites passed.
  • Hosted serial native job: target case passed in 0.353 seconds, catalog suite in 17.155 seconds; the same 1,888 app tests and 1,497 shared tests passed. Serial mode was verified in the log; this does not claim an exact replay of the original execution order.

Both use the existing repository CI/native build-engine configuration selected by the maintainer. No workflow, runner, backend, or timeout setting was changed.

The broader hosted fallback run 33253792826 failed non-native baseline checks: Chromium fixture preregistration, a missing real ripgrep prerequisite for offline native-grep tests, and schema-version fixture assertions. The schema-test mismatch is already repaired on main by 16367468 — track current agent schema in eligibility checks. The browser fixture and hosted-ripgrep prerequisite are recorded as separate follow-ups, not added to this PR. The maintainer explicitly selected native-only landing on the successful required PR gate; the broader fallback is not represented as green and no gate bypass is used.

Local proof gap: no local native test or diagnostic control executed. The initial supplemental macOS 26.6 / Swift 6.3.3 VM failed to build the unchanged baseline on missing SwiftUI macro plugins. A verified Swift 6.4 payload was then prepared, but Parallels could not launch that guest bootstrap; a boot-runner alternative could not clone the active/suspended templates without disturbing their owners. All task-created VMs were cleaned up. The proposed controlled scheduling, early-exit, timeout, and frame-size sensitivity checks remain unexecuted; source review is not presented as runtime proof.

Follow-up outside this patch: audit the remaining marker-based timeout/cancellation readiness cases separately. Second-task creation preserves the existing queue scenario; this patch does not add a production queue-admission test seam.

AI-assisted.

@clawsweeper

clawsweeper Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos size: S maintainer Maintainer-authored PR labels Aug 29, 2026
@steipete
steipete marked this pull request as ready for review August 29, 2026 12:31
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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 Aug 29, 2026
@clawsweeper

clawsweeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 10:44 AM ET / 14:44 UTC.

ClawSweeper review

What this changes

The PR replaces a macOS test’s marker-file readiness wait with cancellable nonblocking FIFO readiness before it exercises a smaller frame limit on the queued request.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: current main still has the premature marker wait, while this focused test-only patch replaces it with a causal FIFO readiness observation. No introduced correctness or security defect was found; reconcile the current exact-head required-check rollup before merge.

Priority: P3
Reviewed head: a1272b232cb34b0f4f229d3403ae608f4b1503ed

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported test repair with no discrete correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, test-only PR is exempt from the external-contributor real-behavior-proof gate; the supplied native CI results are supplemental validation rather than a runtime product claim.
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 PR is exempt from the external-contributor real-behavior-proof gate; the supplied native CI results are supplemental validation rather than a runtime product claim.
Evidence reviewed 5 items Introduced test repair: The introduced hunk replaces the marker deadline with FIFO-writer readiness, then preserves the 1024-byte first request and 64-byte oversized second-request assertion.
Causal owner boundary: The client installs each request timer only after serial-queue admission and applies the active request’s frame limit while consuming stdout, so the old marker could time out before the first task reached the queue.
Current-main necessity: Fetched main retains the detached blocking FIFO open and the marker-based readiness assertion; it does not contain this repair.
Findings None None.
Security None None.

How this fits together

The macOS catalog runtime serializes requests to an App Server process and enforces each active request’s frame-size limit. The changed fixture controls two requests through a FIFO so it can verify the first succeeds and the oversized second response fails.

flowchart LR
  A[Catalog test] --> B[Serialized client queue]
  B --> C[Fake App Server]
  C --> D[FIFO response gate]
  D --> E[First request succeeds]
  B --> F[Second oversized response]
  F --> G[Frame-limit error]
Loading

Before merge

  • Resolve merge risk (P1) - The supplied check rollup contains both failed and successful ci-gate records and is truncated, so the exact-head required-check state should be reconciled before merge.
  • Complete next step (P2) - No mechanical repair remains; a maintainer should reconcile the conflicting/truncated exact-head check rollup before landing.
Agent review details

Security

None.

PR surface

Other +48. Total +48 across 1 file.

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

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; tests/test support +79/-31 The change is confined to macOS test synchronization and adds no runtime, configuration, protocol, or dependency surface.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Merge the FIFO-based readiness assertion once the required exact-head check state is confirmed, retaining the existing first-request success and second-request frame-limit contract.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Merge the FIFO-based readiness assertion once the required exact-head check state is confirmed, retaining the existing first-request success and second-request frame-limit contract.

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

Yes, source-reproducible: the prior fixture started a two-second marker wait before the client admitted its first request, while the client creates that request’s timer only after queue admission.

Is this the best way to solve the issue?

Yes. FIFO writer acquisition observes the fake server after it consumes the first request, unlike the removed pre-admission marker deadline; increasing a timeout would only mask the scheduling boundary.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.

Label justifications:

  • P3: This repairs a native test-fixture scheduling failure without changing user-facing runtime behavior.
  • 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 PR is exempt from the external-contributor real-behavior-proof gate; the supplied native CI results are supplemental validation rather than a runtime product claim.

Evidence

What I checked:

Likely related people:

  • steipete: Current blame attributes the existing fixture and this synchronization repair to Peter Steinberger; history shows concentrated work on this test surface. (role: recent fixture and client-area contributor; confidence: high; commits: aed6fe854ff2, a1272b232cb3; files: apps/macos/Tests/OpenClawIPCTests/MacNodeCodexThreadCatalogTests.swift, apps/macos/Sources/OpenClaw/NodeMode/MacNodeCodexThreadCatalogClient.swift)
  • vincentkoc: The merged App Server client work established the serialized catalog-client feature whose queue and frame-limit behavior this fixture protects. (role: original client-area contributor; confidence: medium; commits: b2cba4073cb7; files: apps/macos/Sources/OpenClaw/NodeMode/MacNodeCodexThreadCatalogClient.swift, apps/macos/Tests/OpenClawIPCTests/MacNodeCodexThreadCatalogTests.swift)

Rank-up moves

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

  • Reconcile the exact-head required-check rollup before merge.

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 (1 earlier review cycle)
  • reviewed 2026-08-29T12:42:18.230Z sha a1272b2 :: needs maintainer review before merge. :: none

@steipete

steipete commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Land-ready for the unchanged native-only patch, reviewed head a1272b232cb34b0f4f229d3403ae608f4b1503ed.

Required PR CI 33252731903, attempt 1 completed successfully, including macos-swift, macos-node, and Actions-owned openclaw/ci-gate. The live PR is mergeable/CLEAN, and effective main rules require that successful check and linear history, not a separate approval review. No bypass is requested or used.

Native job logs were independently inspected:

Proof Target case Catalog suite Full native results
Parallel job 99101179127 Passed, 0.137s Passed, 12.764s 1,888 app tests / 196 suites; 1,497 shared tests / 116 suites
Hosted serial job 99104070424 Passed, 0.353s Passed, 17.155s Same 1,888 app tests and 1,497 shared tests passed

The original warmup, two-second request timeout, first-request success, 1024→64 transition, and exact responseTooLarge expectation remain. Production +0/-0; tests +79/-31. Local checks were repository-configured SwiftFormat 0.62.1 lint, node scripts/check-no-conflict-markers.mjs, and git diff --check. Fresh P0-scoped Codex autoreview was scoped-clean; repo-native review artifacts validated with zero findings.

I re-read the latest ClawSweeper review and rank-up moves. The exact-head native result is now confirmed in both CI modes, and the latest review/moves have been checked; no code changes were requested.

Explicitly separate baseline failures: the broader hosted fallback 33253792826 is not green. Its Chromium preregistration fixture and offline native-ripgrep prerequisite failures are recorded as independent follow-ups; the schema-test mismatch is already fixed on main by 16367468. The maintainer explicitly chose to land only this native fix on its successful required gate, with those broader failures documented—not repaired, hidden, or called passing here. No production/schema, CI/backend/runner configuration, or unrelated test changes are included.

Local scheduling/failure-injection controls were not executed, as documented in the PR body. The serial CI success is not claimed to reproduce the original exact order or identify the originally delayed phase. All native proof used disposable CI; no operator app, Keychain/config/defaults, installed Gateway, or excluded resource was used.

@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. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Aug 29, 2026
@steipete
steipete merged commit 3399dd6 into main Aug 29, 2026
313 of 318 checks passed
@steipete
steipete deleted the steipete/vigilant-germain-101476 branch August 29, 2026 14:59
@steipete

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

app: macos App: macos 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