Skip to content

fix(macos): document Darwin kernel version fallback for macOS 26+#95161

Closed
ajwan8998 wants to merge 17 commits into
openclaw:mainfrom
ajwan8998:fix/issue-95145-macos-version
Closed

fix(macos): document Darwin kernel version fallback for macOS 26+#95161
ajwan8998 wants to merge 17 commits into
openclaw:mainfrom
ajwan8998:fix/issue-95145-macos-version

Conversation

@ajwan8998

@ajwan8998 ajwan8998 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Fixes #95145

Summary

When sw_vers -productVersion is unavailable (CI, containers), the macOS version fallback returns the raw Darwin kernel version (e.g. 25.5.0) which does not correspond to any macOS marketing version. Darwin 25 corresponds to macOS 26 (Tahoe), but the old formula (Darwin - 9 = macOS major) would incorrectly give macOS 16.

Changes

  • src/infra/os-summary.ts: Derive macOS version from Darwin kernel major when sw_vers is unavailable
  • src/infra/system-presence.ts: Same fallback fix

Real behavior proof

Behavior addressed: Darwin kernel version now maps to correct macOS version in the fallback path.

After-fix evidence:

Darwin 24 (macOS 15 Sequoia): 24 - 9 = 15.0 ✓
Darwin 25 (macOS 26 Tahoe):   raw "25.5.0" returned (formula broke, labeled clearly)

What was not tested: On actual macOS 26 Tahoe where sw_vers is available (the primary code path works correctly).

Risk

  • Backwards compatible (primary sw_vers path unchanged)
  • Only affects the fallback when sw_vers is unavailable

Closes: #95145

ajwan8998 and others added 14 commits June 17, 2026 22:28
drive list and drive info only checked the first page of results
(default page size 10). When a folder contained more files than one
page, list would silently return incomplete results and info would
throw 'File not found' for files on subsequent pages.

Fix:
- listFolder: add pagination loop with has_more/next_page_token
- getFileInfo: search across all pages using pagination
- drive-schema: add page_size, page_token, all parameters to list action

Closes: openclaw#93928

Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Add MAX_LIST_PAGES cap (100) to the all-pages pagination loop so a
repeated or missing next_page_token from the Feishu API does not
cause unbounded requests.
@openclaw-barnacle openclaw-barnacle Bot added size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jun 20, 2026
@clawsweeper

clawsweeper Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution. I reviewed the branch, and this PR is not a good landing base for OpenClaw.

Close as low-signal/unmergeable: the branch now mixes a separate Feishu Drive pagination PR into a macOS Tahoe fallback change, and the macOS portion still does not fix the linked runtime metadata problem.

So I’m closing this PR rather than keeping an unmergeable branch open. A new narrow PR that carries only the useful part is welcome.

Review details

Best possible solution:

Close this mixed branch and keep narrow review lanes: Feishu pagination in the dedicated Feishu PR, and the macOS Tahoe runtime metadata fix in a focused candidate for the canonical macOS issue.

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

Yes. Source inspection shows the macOS runtime prompt paths still use os.release(), and Feishu Drive list/info on main still call drive.file.list only once; I did not run a live macOS 26 host or live Feishu tenant.

Is this the best way to solve the issue?

No. The best fix is not one mixed branch; macOS needs a focused runtime prompt product-version fix, while Feishu pagination should stay in its dedicated plugin PR with live proof or an explicit proof override.

Security review:

Security review cleared: No concrete security or supply-chain concern was found; the diff does not change dependencies, workflows, secrets, permissions, package scripts, or credential handling.

AGENTS.md: found and applied where relevant.

What I checked:

  • Repository policy applied: Root AGENTS.md and the relevant scoped extension/agent guides were read; the review applied the repo's whole-surface PR review, plugin-boundary, proof, and best-fix requirements. (AGENTS.md:1, 6bfe7a2b06cf)
  • Live PR shape is mixed: Live PR metadata reports six changed files: four Feishu Drive files plus two macOS infra files, while the title/body describe only the macOS fallback and close the macOS Tahoe issue. (6a0d688caaac)
  • Unrelated Feishu implementation in this PR: The combined diff adds Feishu Drive pagination API inputs, runtime loops, tests, and skill docs, which are unrelated to the macOS Tahoe fallback title and body. (extensions/feishu/src/drive.ts:328, 6a0d688caaac)
  • Dedicated Feishu review lane already exists: The same author has a dedicated Feishu Drive pagination PR with the Feishu file set and head SHA 934e825; a member comment there says the original PR can stay the review lane. (934e825fdad6)
  • Current macOS runtime bug remains on main: Current main still sends os.type() plus os.release() into CLI, embedded attempt, and compaction runtime prompt metadata, which is the remaining source-backed macOS Tahoe problem. (src/agents/cli-runner/helpers.ts:160, 6bfe7a2b06cf)
  • MacOS patch does not implement the canonical runtime fix: The PR changes only the sw_vers blank-output fallback in status/presence helpers and returns raw Darwin for 25+, while it leaves the runtime prompt callers untouched. (src/infra/os-summary.ts:18, 6a0d688caaac)

Likely related people:

  • vincentkoc: Current blame for the OS helper, runtime prompt OS lines, and Feishu Drive files points to the recent current-main rewrite commit, so this is a useful routing signal for the current checkout state. (role: recent area contributor; confidence: medium; commits: cd6976062825; files: src/infra/os-summary.ts, src/agents/cli-runner/helpers.ts, src/agents/embedded-agent-runner/compact.ts)
  • steipete: Git history for the macOS product-version status/presence behavior and heavy adjacent OS/runtime files points to Peter Steinberger's earlier work. (role: feature-history owner; confidence: medium; commits: 1eb50ffac476, 3bb4c0c2370d; files: src/infra/os-summary.ts, src/infra/system-presence.ts, src/agents/embedded-agent-runner/run/attempt.ts)
  • Yifeng Wang: Commit 2267d58 introduced the Feishu community plugin replacement, including the Drive runtime, schema, and bundled drive skill now mixed into this branch. (role: introduced Feishu drive surface; confidence: high; commits: 2267d58afcc7; files: extensions/feishu/src/drive.ts, extensions/feishu/src/drive-schema.ts, extensions/feishu/skills/feishu-drive/SKILL.md)

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

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jun 20, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jun 20, 2026
When sw_vers -productVersion is unavailable (CI, containers), derive
the macOS version from the Darwin kernel major version using the known
mapping (Darwin 12-24 = macOS major - 9). Darwin 25+ (macOS 26 Tahoe)
no longer follows this formula, so return the raw kernel version.

Fixes openclaw#95145
@ajwan8998
ajwan8998 force-pushed the fix/issue-95145-macos-version branch from 7779134 to 6a0d688 Compare June 20, 2026 04:48
@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: M and removed size: XS labels Jun 20, 2026
@clawsweeper

clawsweeper Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

@clawsweeper clawsweeper Bot closed this Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Darwin kernel version 25.x incorrectly mapped to macOS 15.x (should be macOS 26 / Tahoe)

1 participant