Repository navigation
Allow Auto mode on this Mac's computer (after a warning) #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
milind-soni
merged 8 commits into
milind-soni:main
from
maxkongerskov:feat/mac-local-computer-auto
Aug 21, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
848fea8
Allow Auto mode on this Mac's computer after a warning.
61a8b48
Decode TOML basic-string unicode escapes in Kimi headings.
4a1cb62
Address CodeRabbit notes on the Mac local-computer Auto commit.
4f59e7c
Tighten CodeRabbit follow-ups: invalid TOML escapes, empty CUA arches…
aee6065
Merge remote-tracking branch 'origin/main' into review/pr-315
milind-soni 6601c5d
Merge remote-tracking branch 'origin/main' into review/pr-315
milind-soni 0564fb6
Make the local-auto warning a server-side boundary, and scope Codex h…
milind-soni 7e6ed78
Merge remote-tracking branch 'origin/main' into review/pr-315
milind-soni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| export const DEFAULT_MAC_ARCHES = ["arm64", "x64"]; | ||
|
|
||
| /** Which darwin CUA trees to stage. electron-builder packages both arches | ||
| * unless the caller opts into a one-arch local stage. An empty override | ||
| * is never a silent no-op. */ | ||
| export function resolveCuaMacArches(env = process.env) { | ||
| const raw = env.OPENMAUSBOT_CUA_ARCHES; | ||
| if (raw === undefined) return [...DEFAULT_MAC_ARCHES]; | ||
| const arches = raw.split(",").map((arch) => arch.trim()).filter(Boolean); | ||
| if (arches.length === 0) { | ||
| throw new Error( | ||
| "OPENMAUSBOT_CUA_ARCHES is empty; omit the variable to stage arm64 and x64", | ||
| ); | ||
| } | ||
| if (env.OPENMAUSBOT_CUA_ARCHES_PARTIAL !== "1") { | ||
| const missing = DEFAULT_MAC_ARCHES.filter((arch) => !arches.includes(arch)); | ||
| if (missing.length) { | ||
| throw new Error( | ||
| `OPENMAUSBOT_CUA_ARCHES omits ${missing.join(", ")} but electron-builder packages both arm64 and x64. Set OPENMAUSBOT_CUA_ARCHES_PARTIAL=1 for a one-arch local stage.`, | ||
| ); | ||
| } | ||
| } | ||
| return arches; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { describe, expect, it } from "vitest"; | ||
| import { DEFAULT_MAC_ARCHES, resolveCuaMacArches } from "./cua-mac-arches.mjs"; | ||
|
|
||
| describe("resolveCuaMacArches", () => { | ||
| it("defaults to both packaging targets", () => { | ||
| expect(resolveCuaMacArches({})).toEqual(DEFAULT_MAC_ARCHES); | ||
| }); | ||
|
|
||
| it("rejects an empty override even when PARTIAL=1", () => { | ||
| expect(() => resolveCuaMacArches({ OPENMAUSBOT_CUA_ARCHES: "", OPENMAUSBOT_CUA_ARCHES_PARTIAL: "1" })).toThrow( | ||
| /OPENMAUSBOT_CUA_ARCHES is empty/, | ||
| ); | ||
| expect(() => resolveCuaMacArches({ OPENMAUSBOT_CUA_ARCHES: " , ", OPENMAUSBOT_CUA_ARCHES_PARTIAL: "1" })).toThrow( | ||
| /OPENMAUSBOT_CUA_ARCHES is empty/, | ||
| ); | ||
| }); | ||
|
|
||
| it("rejects a one-arch override unless PARTIAL=1", () => { | ||
| expect(() => resolveCuaMacArches({ OPENMAUSBOT_CUA_ARCHES: "arm64" })).toThrow(/omits x64/); | ||
| expect(resolveCuaMacArches({ OPENMAUSBOT_CUA_ARCHES: "arm64", OPENMAUSBOT_CUA_ARCHES_PARTIAL: "1" })).toEqual([ | ||
| "arm64", | ||
| ]); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.