Skip to content

ci: reuse Watch build products and repair process cleanup - #134523

Merged
steipete merged 3 commits into
mainfrom
codex/reuse-watch-ci-build-products
Sep 1, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/reuse-watch-ci-build-products

Conversation

@steipete

@steipete steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The iOS CI job compiles the Watch app and shared targets during its generic Debug build, then discarded that work by using fresh DerivedData for Watch tests. The later build-for-testing phase took 91.932 seconds in the retained full-release run.

Change

Reuse Xcode's project DerivedData for the Watch phase. Resolve the exact Watch app from its unique target's JSON build settings, retaining simulator readiness, explicit installation, build-for-testing, test-without-building, and both result bundles. Debug and Release builds, all five iPhone test selections, the Watch selection, signing flags, serial Xcode execution, and screenshot coverage remain unchanged.

The PR's CI exposed a related process-cleanup failure. Independent controlled Linux proof found that a group reaped between a successful kernel existence check and the ps snapshot could still be reported live. The shared inspector now rechecks kernel existence after that snapshot, preserving existing error policies and deadlines. Full sibling testing also exposed unsafe PID-file publication: an empty file could become PID 0, and partial digits could become an unrelated PID. Both affected fixtures now publish atomically and reuse the canonical validated PID reader. No retry, timeout, heap budget, or assertion was relaxed. The exact syscall ordering of the historical CI failure, and the signal target of an intermediate local exit 137, were not captured; those causal assignments remain unproven.

Evidence

Hosted Xcode 26.6 diagnostic passed on macos-26 with all 255 iPhone tests and 13 Watch tests, zero failures or skips. Both xcresult bundles were downloaded and checked against the Actions artifact digest. The Watch phase compiled only the three Watch test source entries; shared app targets were reused. Build-for-testing took 20.870 seconds versus 91.932 seconds in the earlier full-release job.

The diagnostic selects source 32a267887cd6874656a1b64e520ded634050b00c with workflow dc60a57c5694c449f45567127fd6353afcce6cae. It proves the Watch change before the mechanical main refresh and separate cleanup repair, not final whole-head CI. The iOS workflow section and focused tests are unchanged by that refresh. Total iOS job time was 36m30s versus 41m18s, but unrelated startup/build variation prevents attributing that whole reduction to this patch. The separate early-boot experiment is not included.

Four executable workflow regressions failed before the Watch change; all pass afterward. The cleanup owner has seven failing pre-fix regression cases and a real Linux Node reproduction that changes from incorrect live to correct dead after controlled reaping. Both actual PID producers passed the safe atomic-publication probe without sending unsafe signals. The cleanup owner/sibling/helper run passed 207 tests with one existing platform skip. The final composed six-file run passed 577 tests with one existing platform skip, and all 18 scoped checks passed, including both TypeScript lanes, lint and boundary guards. Exact-head CI33453766420 passed on 41f57ea84cdbe0aff13be6712ab10c664808e46b: 143 successful jobs, 10 skipped, zero failures, with required gate99691048998 successful. This resolves the latest review’s remaining CI risk and rank-up request.

Independent Codex review of the complete six-file candidate found no actionable P0–P2 findings. Application runtime delta is zero; workflow net +9 and tooling net +1 implement product resolution and the shared inspector repair; tests net +221. No new configuration, dependency, or persistence surface is introduced.

@clawsweeper

clawsweeper Bot commented Aug 31, 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 size: M maintainer Maintainer-authored PR labels Aug 31, 2026
@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 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 8:32 PM ET / September 1, 2026, 00:32 UTC.

ClawSweeper review

What this changes

The branch reuses the iOS build’s Apple Watch products for focused simulator tests, rechecks Linux process-group existence after inspection, and publishes two test PIDs atomically.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

This is a coherent, still-needed CI and cleanup repair. The pinned introduced changes are owner-boundary fixes with targeted coverage; current main still uses the old Watch DerivedData path, and the supplied exact-head CI evidence resolves the earlier gating concern.

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

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-covered infrastructure repair with no actionable correctness or security finding in the introduced delta.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored CI and internal process-cleanup PR is exempt from the external-contributor proof gate; the supplied hosted Watch diagnostic and exact-head CI remain positive merge 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 CI and internal process-cleanup PR is exempt from the external-contributor proof gate; the supplied hosted Watch diagnostic and exact-head CI remain positive merge evidence.
Evidence reviewed 7 items Watch build ownership: The generic OpenClaw scheme builds the OpenClaw target, whose declared dependencies include the Apple Watch app; this supports reusing its derived build product rather than naming a separate DerivedData directory.
Introduced workflow behavior: The Watch step builds test artifacts, obtains the uniquely selected Watch target’s absolute product path from Xcode build settings, installs it, and then uses test-without-building.
Cleanup-owner repair: After a successful group existence check and a non-zombie Linux snapshot, the owner now rechecks kernel group existence; ESRCH reaches the existing dead-state handling rather than returning live.
Findings None None.
Security None None.

How this fits together

The iOS CI job builds the mobile app and then runs focused iPhone and Apple Watch simulator tests. Shared script utilities supervise child process groups used by CI checks and report whether cleanup completed.

flowchart LR
  A[iOS app build] --> B[Watch test step]
  B --> C[Xcode product lookup]
  C --> D[Simulator install]
  D --> E[Watch test results]
  F[Child process exit] --> G[Process-group inspection]
  G --> H[Cleanup outcome]
Loading

Decision needed

Question Recommendation
Should this maintainer-authored CI optimization and cleanup repair proceed through normal approval on the reviewed head? Approve the reviewed head: Accept the focused CI optimization and shared cleanup repair with the supplied hosted and exact-head CI evidence.

Why: The code and supplied exact-head evidence support the patch, but the maintainer label and member authorship require explicit human handling rather than automated closure or repair dispatch.

Before merge

  • Complete next step (P2) - The remaining action is normal maintainer approval of an already coherent PR, not an automated repair task.
Agent review details

Security

None.

PR surface

Tests +221, Config +9, Other +1. Total +231 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 238 17 +221
Docs 0 0 0 0
Config 1 32 23 +9
Generated 0 0 0 0
Other 1 7 6 +1
Total 6 277 46 +231

Review metrics

Metric Value Why it matters
Production versus test delta workflow/tooling +10; tests +221 The small production increase is the Xcode product-resolution and post-snapshot liveness repair; most growth is focused regression coverage.

Technical review

Best possible solution:

Land the current focused workflow and cleanup repair through normal maintainer approval, preserving the Xcode-derived product lookup and the shared post-snapshot liveness check.

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

Yes for the cleanup race: the pre-fix owner returned live after a successful initial group probe even when the group disappeared during the ps snapshot; the new table directly models that sequence. The supplied hosted run covers the Watch workflow path, though this Linux review host has no Xcode installation.

Is this the best way to solve the issue?

Yes. The workflow resolves the product from Xcode instead of reconstructing its DerivedData layout, while the shared process-group owner—not downstream callers—rechecks the liveness fact that can race.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.

Label justifications:

  • P3: The PR improves CI efficiency and CI-process reliability without changing OpenClaw’s 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 member-authored CI and internal process-cleanup PR is exempt from the external-contributor proof gate; the supplied hosted Watch diagnostic and exact-head CI remain positive merge evidence.

Evidence

What I checked:

  • Watch build ownership: The generic OpenClaw scheme builds the OpenClaw target, whose declared dependencies include the Apple Watch app; this supports reusing its derived build product rather than naming a separate DerivedData directory. (apps/ios/project.yml:73, 41f57ea84cdb)
  • Introduced workflow behavior: The Watch step builds test artifacts, obtains the uniquely selected Watch target’s absolute product path from Xcode build settings, installs it, and then uses test-without-building. (.github/workflows/ci.yml:4546, 41f57ea84cdb)
  • Cleanup-owner repair: After a successful group existence check and a non-zombie Linux snapshot, the owner now rechecks kernel group existence; ESRCH reaches the existing dead-state handling rather than returning live. (scripts/lib/managed-child-process.mts:188, 41f57ea84cdb)
  • Focused regression coverage: The new table covers reaping after empty, live, or failed ps snapshots and preserves zombie and error-policy outcomes; the workflow test executes the extracted shell step against controlled Xcode and simulator commands. (test/scripts/managed-child-process.test.ts:593, 41f57ea84cdb)
  • Current-main necessity: Current main still creates a separate Watch DerivedData path and installs a hard-coded product path, so the central workflow improvement is not already implemented there. (.github/workflows/ci.yml:4560, 5dd4c6e3b087)
  • History and release check: The branch consists of the Watch optimization, its selector inventory update, and the cleanup repair; no stable tag contains the PR head, so this remains unshipped proposed work. (scripts/lib/managed-child-process.mts:167, 41f57ea84cdb)

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-31T23:04:52.763Z sha 32a2678 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T00:20:24.602Z sha 41f57ea :: needs maintainer review before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

The first CI run found a stale exact target inventory: the selector correctly discovered the new iOS workflow regression test, while its expected list omitted it. The follow-up adds only that expected target; the workflow and new regression test bytes are unchanged.

The original assertion failed locally before the correction. Full selector and workflow sibling coverage now passes 652 tests with two existing skips, and all 14 changed-file checks pass. The original workflow change had a clean P0–P2 managed review; the one-line inventory correction also passed managed review.

Fresh exact-head CI is running. Separate diagnostic-only hosted jobs will exercise the unchanged complete iOS build and lifecycle job, including the actual Watch build products; these are additional focused proof, not substitutes for the required CI gate or full release verification.

@steipete
steipete force-pushed the codex/reuse-watch-ci-build-products branch from ba8fe93 to 41f57ea Compare September 1, 2026 00:11
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Sep 1, 2026
@steipete steipete changed the title perf(ci): reuse project build products for Watch tests ci: reuse Watch build products and repair process cleanup Sep 1, 2026
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

The requested hosted Watch proof is now complete: Xcode 26.6 passed all 255 iPhone and 13 Watch tests, and Watch build-for-testing compiled only the test source instead of repeating 125 app/shared source files (20.870s versus 91.932s). The PR body links the exact diagnostic and describes its source scope.

The refreshed head also repairs a separately reproduced shared process-group inspection race and atomic PID publication in two existing test fixtures, without weakening cleanup or timing contracts. All 577 composed local tests passed with one existing platform skip; all 18 scoped checks and independent P0–P2 review passed. The replacement exact-head CI is 33453766420.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@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 Sep 1, 2026
@steipete
steipete merged commit cc9a9eb into main Sep 1, 2026
209 checks passed
@steipete
steipete deleted the codex/reuse-watch-ci-build-products branch September 1, 2026 00:44
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 2026
…34523)

* perf(ci): reuse project build products for Watch tests

* test(ci): include Watch workflow guard in selector inventory

* fix(ci): resolve reaped groups and publish test PIDs atomically
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. scripts Repository scripts size: M 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