Skip to content

fix(macos): package apps from paths with glob characters - #123751

Merged
steipete merged 2 commits into
mainfrom
codex/package-shellcheck-robustness
Aug 14, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/package-shellcheck-robustness

Conversation

@steipete

@steipete steipete commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where developers packaging the macOS app from a checkout path containing shell glob metacharacters, such as square brackets, would see the universal Sparkle framework merge fail with a misleading missing-file error.

Why This Change Was Made

The framework merger now treats the primary framework root as a literal prefix when deriving each relative binary path. It also replaces path separators for temporary slice names with Bash parameter expansion, removing an unnecessary subprocess and its masked exit status.

Exact-head CI then exposed an independent current-main race in boundary-artifact freshness: filesystem mtimes can retain fractional milliseconds while Date timestamps are integer milliseconds. The artifact owner now rounds its repair floor upward so a content-hash hit really makes every output at least as new as its newest input.

User Impact

macOS app packaging now works from legal checkout paths containing glob characters. Packaging behavior for ordinary paths is unchanged.

CI artifact caches also keep their promised mtime fast path when an input and repair occur within the same millisecond.

Evidence

  • Pre-fix regression proof: the focused test failed with ERROR: Missing <absolute primary path> in <secondary framework> when the temporary checkout path contained [fixture].
  • Pre-fix CI artifact proof: exact-head run 31820700472, job 94834035780, observed output mtime 1786726580662 below input mtime 1786726580662.0535.
  • Deterministic fractional-mtime regression: failed pre-fix at 1786726813779 < 1786726813779.5.
  • node scripts/run-vitest.mjs test/scripts/package-mac-app.test.ts test/scripts/prepare-extension-package-boundary-artifacts.test.ts — 70 passed.
  • shellcheck -x scripts/package-mac-app.sh — clean.
  • bash -n scripts/package-mac-app.sh — clean.
  • git diff --check — clean.
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main — clean; no accepted/actionable findings.

AI-assisted: yes. The change and focused regression proof were reviewed and understood before submission.

@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 14, 2026 16:43
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Aug 14, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 1:40 PM ET / 17:40 UTC.

ClawSweeper review

What this changes

The branch makes macOS framework merging safe for checkout paths containing glob characters and keeps cached extension artifacts fresh when input mtimes have fractional milliseconds.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The PR remains necessary: current main retains both deterministic failures, and the two owner-level repairs have focused regression coverage with no blocking findings.

Priority: P2
Reviewed head: be65e92de56fe5a1c82706292f25d8d44cb88930

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused owner-boundary patch with deterministic regressions and no blocking review findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR includes focused before/after regression evidence; the external-contributor real-behavior-proof gate does not apply.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR includes focused before/after regression evidence; the external-contributor real-behavior-proof gate does not apply.
Evidence reviewed 7 items Current-main package failure: Current main derives the relative framework path with unquoted Bash pattern expansion, so glob characters in the framework root are interpreted as a pattern rather than a literal prefix.
Packaging owner repair and regression: The branch quotes the prefix expansion at the framework-merger owner; its macOS regression creates a real Mach-O fixture under a path containing [fixture] and verifies both architectures in the merged binary.
Current-main freshness invariant: Current main accepts a matching digest but repairs outputs with an integer wall-clock Date, which can remain older than a fractional newest input mtime and force a later rehash.
Findings None None.
Security None None.

How this fits together

macOS packaging copies architecture-specific Sparkle frameworks and merges their Mach-O slices into the app bundle. The extension-boundary artifact helper compares inputs and generated outputs to decide whether CI can skip rebuilding declarations.

flowchart LR
  A[Checkout path] --> B[macOS framework packager]
  B --> C[Mach-O slice merger]
  C --> D[Packaged app framework]
  E[Source inputs] --> F[Artifact freshness owner]
  F --> G[Repair output mtimes]
  G --> H[Reuse or rebuild CI artifacts]
Loading

Before merge

  • Resolve merge risk (P1) - Exact-head CI is still queued, so merge should remain behind the normal required-check gate.
  • Complete next step (P2) - No repair lane is needed: this maintainer-owned branch has no actionable findings and only awaits normal exact-head validation.
Agent review details

Security

None.

PR surface

Tests +72, Other 0. Total +72 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 75 3 +72
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 3 3 0
Total 4 78 6 +72

Review metrics

Metric Value Why it matters
Production versus test LOC production +3/-3 (net 0); tests +75/-3 (net +72) The fixes add no net production code; the test growth is focused regression coverage for the two repaired invariants.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the two owner-boundary fixes after the exact-head required checks pass.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the two owner-boundary fixes after the exact-head required checks pass.

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

Yes, source-level reproduction is high confidence: literal Bash prefix removal fails for [fixture] paths, and the fractional-mtime test deterministically distinguishes current main from the repair.

Is this the best way to solve the issue?

Yes. Both changes repair the shared owner boundaries rather than adding downstream workarounds, and the alternatives would leave other framework or artifact consumers exposed.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded repair for macOS packaging and CI artifact reuse, without evidence of a broad user-facing outage.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR includes focused before/after regression evidence; the external-contributor real-behavior-proof gate does not apply.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the current artifact-freshness owner and recent macOS packaging changes, and authored both repair commits. (role: recent area contributor and owner author; confidence: high; commits: 641821f25e3e, 19ace6830b17, be65e92de56f; files: scripts/package-mac-app.sh, scripts/prepare-extension-package-boundary-artifacts.mts, test/scripts/package-mac-app.test.ts)

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-14T16:49:27.706Z sha 435723fa2248979ead7ff6263674f122123c90e1 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-14T17:26:59.741Z sha c467fb92d257b53dd17d33fb712cd8ab097c0c09 :: needs maintainer review before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact-head CI exposed and this branch now fixes a deterministic fractional-mtime race in the boundary-artifact freshness owner. The package-path fix remains unchanged; please review the new second commit at 1a01190d9bc5a846f8caddebaa3895152656fbce.

@clawsweeper

clawsweeper Bot commented Aug 14, 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:

@steipete
steipete force-pushed the codex/package-shellcheck-robustness branch from 1a01190 to c467fb9 Compare August 14, 2026 17:20
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The branch is now rebased once onto current main. Exact-head lint exposed the current-main compaction test above the max-lines ratchet, so the third commit splits context-budget coverage into a focused sibling backed by a shared fixture, without suppressions or deleted tests. Please review head c467fb92d257b53dd17d33fb712cd8ab097c0c09.

@clawsweeper

clawsweeper Bot commented Aug 14, 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.

@steipete
steipete force-pushed the codex/package-shellcheck-robustness branch from c467fb9 to 7e3957c Compare August 14, 2026 17:31
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

GitHub reported a server-side conflict after another disjoint main advance, so the unchanged three-commit stack was rebased mechanically onto e44dde218f1. Focused suites, the exact failed lint stripe, and integrated branch autoreview are green. Please review head 7e3957ce5d3d061cee6a6fffb6bbb6a870696c37.

@clawsweeper

clawsweeper Bot commented Aug 14, 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:

@steipete
steipete force-pushed the codex/package-shellcheck-robustness branch from 7e3957c to be65e92 Compare August 14, 2026 17:33
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current main landed the canonical compaction test split in #123635, so the redundant third commit was dropped while resolving the add/add conflict. The branch is back to its two owner fixes; 70 focused tests, ShellCheck, Bash syntax, diff check, and integrated autoreview are green. Please review head be65e92de56fe5a1c82706292f25d8d44cb88930.

@clawsweeper

clawsweeper Bot commented Aug 14, 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.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for be65e92de56fe5a1c82706292f25d8d44cb88930:

  • node scripts/run-vitest.mjs test/scripts/package-mac-app.test.ts test/scripts/prepare-extension-package-boundary-artifacts.test.ts — 70 passed.
  • shellcheck -x scripts/package-mac-app.sh, bash -n scripts/package-mac-app.sh, and git diff --check origin/main...HEAD — clean.
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main — clean; no accepted/actionable findings.
  • Exact-head CI run 31824523924 — terminal success; macos-swift job 94847368929 and final openclaw/ci-gate job 94852554283 succeeded.
  • ClawSweeper reviewed this exact head with no findings. Its two rank-up moves were normal exact-head CI/maintainer handling; both are satisfied.
  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 123751 — passed with gates_mode=hosted_exact_or_recent_parent, and prep/head identity remained exact.

No relevant proof gap remains. Full signed release packaging is intentionally outside this bounded packaging-path and CI-freshness repair.

@steipete
steipete merged commit b9cf0bb into main Aug 14, 2026
164 of 165 checks passed
@steipete
steipete deleted the codex/package-shellcheck-robustness branch August 14, 2026 18:08
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 15, 2026
…3751)

* fix(macos): handle metacharacters in framework paths

* fix(ci): round boundary artifact refresh mtimes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts 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