惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
腾讯CDC
爱范儿
爱范儿
Google DeepMind News
Google DeepMind News
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
量子位
F
Fortinet All Blogs
G
Google Developers Blog
T
The Blog of Author Tim Ferriss
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
Tailwind CSS Blog
J
Java Code Geeks
S
SegmentFault 最新的问题
D
Docker
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
M
MIT News - Artificial intelligence
博客园 - 【当耐特】

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
chore: prefer canonical ios signing team · openclaw/openc...
joshavant · 2026-06-16 · via Recent Commits to openclaw:main

@@ -11,6 +11,7 @@ const BASH_BIN = process.platform === "win32" ? "bash" : "/bin/bash";

1111

const BASH_ARGS = process.platform === "win32" ? [SCRIPT] : ["--noprofile", "--norc", SCRIPT];

1212

const BASE_PATH = process.env.PATH ?? "/usr/bin:/bin";

1313

const BASE_LANG = process.env.LANG ?? "C";

14+

const CANONICAL_TEAM_ID = "FWJYW4S8P8";

1415

let fixtureRoot = "";

1516

let sharedBinDir = "";

1617

let sharedHomeDir = "";

@@ -50,10 +51,20 @@ function parseTeamCandidateRows(raw: string): TeamCandidate[] {

50515152

function pickTeamIdFromCandidates(params: {

5253

candidates: TeamCandidate[];

54+

canonicalTeamId?: string;

5355

preferredTeamId?: string;

5456

preferredTeamName?: string;

5557

preferNonFreeTeam?: boolean;

58+

requireCanonical?: boolean;

5659

}): string | undefined {

60+

const canonicalTeamId = (params.canonicalTeamId ?? CANONICAL_TEAM_ID).trim();

61+

if (canonicalTeamId) {

62+

const canonical = params.candidates.find((candidate) => candidate.teamId === canonicalTeamId);

63+

if (canonical || params.requireCanonical) {

64+

return canonical?.teamId;

65+

}

66+

}

67+5768

const preferredTeamId = (params.preferredTeamId ?? "").trim();

5869

if (preferredTeamId) {

5970

const preferred = params.candidates.find((candidate) => candidate.teamId === preferredTeamId);

@@ -90,6 +101,7 @@ async function writeExecutable(filePath: string, body: string): Promise<void> {

90101

function runScript(

91102

homeDir: string,

92103

extraEnv: Record<string, string> = {},

104+

scriptArgs: string[] = [],

93105

): {

94106

ok: boolean;

95107

stdout: string;

@@ -99,7 +111,7 @@ function runScript(

99111

.toSorted((a, b) => a.localeCompare(b))

100112

.map((key) => `${key}=${extraEnv[key] ?? ""}`)

101113

.join("\u0001");

102-

const cacheKey = `${homeDir}\u0000${extraEnvKey}`;

114+

const cacheKey = `${homeDir}\u0000${extraEnvKey}\u0000${scriptArgs.join("\u0001")}`;

103115

const cached = runScriptCache.get(cacheKey);

104116

if (cached) {

105117

return cached;

@@ -112,7 +124,7 @@ function runScript(

112124

...extraEnv,

113125

};

114126

try {

115-

const stdout = execFileSync(BASH_BIN, BASH_ARGS, {

127+

const stdout = execFileSync(BASH_BIN, [...BASH_ARGS, ...scriptArgs], {

116128

env,

117129

encoding: "utf8",

118130

stdio: ["ignore", "pipe", "pipe"],

@@ -218,19 +230,93 @@ printf 'BBBBB22222\\t0\\tBeta Team\\r\\n'`,

218230

});

219231

expect(preferred).toBe("BBBBB22222");

220232233+

const missingCanonical = pickTeamIdFromCandidates({

234+

candidates: rows,

235+

requireCanonical: true,

236+

});

237+

expect(missingCanonical).toBeUndefined();

238+221239

const fallback = pickTeamIdFromCandidates({

222240

candidates: rows,

223241

preferredTeamId: "CCCCCC3333",

224242

});

225243

expect(fallback).toBe("BBBBB22222");

226244

});

227245246+

it("prefers the canonical OpenClaw iOS team when it is present", async () => {

247+

const homeDir = makeTempDir(tempDirs, "openclaw-ios-team-id-canonical-");

248+

const binDir = path.join(homeDir, "bin");

249+

await mkdir(path.join(homeDir, "Library", "Preferences"), { recursive: true });

250+

await mkdir(binDir, { recursive: true });

251+

await writeFile(

252+

path.join(homeDir, "Library", "Preferences", "com.apple.dt.Xcode.plist"),

253+

"",

254+

"utf8",

255+

);

256+

const fakePythonPath = path.join(binDir, "fake-python");

257+

await writeExecutable(

258+

fakePythonPath,

259+

`#!/usr/bin/env bash

260+

printf 'AAAAA11111\\t0\\tAlpha Team\\r\\n'

261+

printf '${CANONICAL_TEAM_ID}\\t0\\tOpenClaw\\r\\n'`,

262+

);

263+264+

const result = runScript(homeDir, { IOS_PYTHON_BIN: fakePythonPath });

265+

expect(result.ok).toBe(true);

266+

expect(result.stdout).toBe(CANONICAL_TEAM_ID);

267+

});

268+269+

it("loads teams from Xcode account identifier team metadata", async () => {

270+

const homeDir = makeTempDir(tempDirs, "openclaw-ios-team-id-by-identifier-");

271+

const binDir = path.join(homeDir, "bin");

272+

await mkdir(path.join(homeDir, "Library", "Preferences"), { recursive: true });

273+

await mkdir(binDir, { recursive: true });

274+

await writeFile(

275+

path.join(homeDir, "Library", "Preferences", "com.apple.dt.Xcode.plist"),

276+

"",

277+

"utf8",

278+

);

279+

await writeExecutable(

280+

path.join(binDir, "plutil"),

281+

`#!/usr/bin/env bash

282+

if [[ "$1" == "-extract" && "$2" == "IDEProvisioningTeamByIdentifier" ]]; then

283+

cat <<'JSON'

284+

{"account-id":[{"teamID":"FWJYW4S8P8","teamName":"OpenClaw Foundation","isFreeProvisioningTeam":false,"teamType":"Company"}]}

285+

JSON

286+

exit 0

287+

fi

288+

echo '{}'`,

289+

);

290+291+

const result = runScript(homeDir, { IOS_PYTHON_BIN: "python3" }, ["--require-canonical"]);

292+

expect(result.ok).toBe(true);

293+

expect(result.stdout).toBe(CANONICAL_TEAM_ID);

294+

});

295+228296

it("resolves a fallback team ID from Xcode team listings (smoke)", () => {

229297

const fallbackResult = runScript(sharedHomeDir, { IOS_PYTHON_BIN: sharedFakePythonPath });

230298

expect(fallbackResult.ok).toBe(true);

231299

expect(fallbackResult.stdout).toBe("AAAAA11111");

232300

});

233301302+

it("fails canonical-only resolution when only fallback teams are available", () => {

303+

const result = runScript(sharedHomeDir, { IOS_PYTHON_BIN: sharedFakePythonPath }, [

304+

"--require-canonical",

305+

]);

306+

expect(result.ok).toBe(false);

307+

expect(result.stderr).toContain(

308+

`Canonical OpenClaw iOS Team ID '${CANONICAL_TEAM_ID}' is not available`,

309+

);

310+

});

311+312+

it("rejects explicit non-canonical teams in canonical-only mode", () => {

313+

const result = runScript(sharedHomeDir, { IOS_DEVELOPMENT_TEAM: "BBBBB22222" }, [

314+

"--require-canonical",

315+

]);

316+

expect(result.ok).toBe(false);

317+

expect(result.stderr).toContain("is not the canonical OpenClaw iOS team");

318+

});

319+234320

it("prints actionable guidance when Xcode account exists but no Team ID is resolvable", () => {

235321

const result = runScript(sharedHomeDir);

236322

expect(result.ok).toBe(false);