The best way to control Claude Code, Codex and more from any computer or phone
ci: fail PRs on invalid allowBuilds entries in pnpm-workspace.yaml (#18564)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Theo Browne committed
Oct 12, 2026 at 00:37 UTC
eac6ba5ae9dfcd8106b43ac1b5612b2983bda642
2 files changed
+23
-1
scripts/build-desktop-artifact.test.ts
+20
@@ -22,6 +22,7 @@ import {
22
DesktopDmgBackgroundSourceMissingError,
23
createStageWorkspaceConfig,
24
createStagePatchedDependencies,
25
+ readWorkspaceConfig,
26
createBuildConfig,
27
DESKTOP_ELECTRON_LANGUAGES,
28
DESKTOP_FILE_EXCLUSIONS,
@@ -497,6 +498,25 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
498
});
499
});
500
501
+ // pnpm writes "set this to true or false" placeholders into allowBuilds when a
502
+ // tarball changes. pnpm ignores them, but the release build decode rejects them.
503
+ it.effect("decodes the repo allowBuilds and every file: tarball it names exists", () =>
504
+ Effect.gen(function* () {
505
+ const fs = yield* FileSystem.FileSystem;
506
+ const path = yield* Path.Path;
507
+ const { allowBuilds = {} } = yield* readWorkspaceConfig();
508
+ const repoRoot = path.join(import.meta.dirname, "..");
509
+ for (const key of Object.keys(allowBuilds)) {
510
+ const tarball = key.split("@file:")[1];
511
+ if (tarball === undefined) continue;
512
+ assert.isTrue(
513
+ yield* fs.exists(path.join(repoRoot, tarball)),
514
+ `allowBuilds names a missing tarball: ${key}`,
515
+ );
516
+ }
517
+ }),
518
+ );
519
+
520
it("stages pnpm 11 allowBuilds and patchedDependencies in the workspace yaml", () => {
521
assert.deepStrictEqual(
522
createStageWorkspaceConfig({
scripts/build-desktop-artifact.ts
+3
-1
@@ -111,7 +111,9 @@ const encodeJsonString = Schema.encodeEffect(Schema.fromJsonString(Schema.Unknow
111
const decodeWorkspaceConfig = Schema.decodeEffect(fromYaml(WorkspaceConfig));
112
const encodeStageWorkspaceConfig = Schema.encodeEffect(fromYaml(StageWorkspaceConfig));
113
114
-const readWorkspaceConfig = Effect.fn("readWorkspaceConfig")(function* () {
114
+// Decodes the repo's pnpm-workspace.yaml. A PR CI test calls this too, so a bad
115
+// entry fails the PR instead of the nightly desktop build.
116
+export const readWorkspaceConfig = Effect.fn("readWorkspaceConfig")(function* () {
117
const fs = yield* FileSystem.FileSystem;
118
const path = yield* Path.Path;
119
const repoRoot = yield* RepoRoot;