Skip to content

Commit 6fa4851

Browse files
authored
ci: skip scheduled workflows on forks and fix the Windows sandbox W0 lane (#6016)
Eight workflows with a cron trigger had no repository guard, so every fork with Actions enabled ran them nightly against its own, usually stale, main. On a fork they fail for reasons unrelated to the change under test: the dependency audit flags advisories already fixed upstream, and the Windows release check downloads its upgrade baseline from the fork's own releases, which do not exist. Gate each job on `github.event_name != 'schedule' || github.repository == 'apache/maka'`. Pull request, push and manual dispatch runs keep their current behavior, including on forks; only cron runs outside apache/maka are skipped. issue-pr-lifecycle and model-metadata-upkeep already guard on the repository, and npm-publication is gated by NPM_NIGHTLY_ENABLED. Generated-by: Claude Code fix(runtime): emit the filesystem worker bundle as .mjs The worker bundle was emitted as dist/workers/filesystem-worker.js, so Node walked up to the nearest package.json to decide the module type. Inside the Windows AppContainer sandbox that read is denied, and the worker crashed at launch with ERR_INVALID_PACKAGE_CONFIG. The windows_sandbox_w0_protocol job has failed on main because of it. An .mjs bundle is ESM by extension, so Node never performs the lookup. The build and desktop copy scripts now take the file name from FILESYSTEM_WORKER_BUNDLE_NAME so the producer cannot drift from the resolver; packaging verifiers keep literal paths because they check the shipped layout independently. Split out of #5969, which carries the same rename. Generated-by: Claude Code fix(release): accept the legacy worker name in Windows upgrade baselines The pinned-version upgrade check verifies the previously released installer with the current resource list, which now demands `workers/filesystem-worker.mjs`. Releases built before the rename ship `filesystem-worker.js`, so the check failed on bytes that were correct when they shipped. Relax the requirement for the upgrade-baseline contract, like the other resources that newer builds added. Generated-by: Claude Code
1 parent b298d19 commit 6fa4851

22 files changed

Lines changed: 43 additions & 26 deletions

‎.github/workflows/dependency-audit.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ concurrency:
5151

5252
jobs:
5353
audit:
54+
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
5455
runs-on: ubuntu-24.04
5556
timeout-minutes: 45
5657
steps:

‎.github/workflows/pr-effort-label.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ concurrency:
4646

4747
jobs:
4848
label:
49+
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
4950
runs-on: ubuntu-24.04
5051
timeout-minutes: 10
5152

‎.github/workflows/release-linux-check.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ jobs:
8383
# Not `package`: the Windows lane's job already claims that name, and two
8484
# checks reading `package` on the same pull request cannot be told apart.
8585
package-linux:
86+
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
8687
# x64 only. The arm64 packages are built from the same scripts, the same
8788
# configuration and the same descriptor, so this lane would re-prove all of
8889
# what it can reach and none of what differs — a 16K-page host and its own

‎.github/workflows/release-windows-check.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ concurrency:
124124

125125
jobs:
126126
package:
127+
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
127128
runs-on: windows-2025
128129
timeout-minutes: 45
129130
defaults:

‎.github/workflows/windows-acp.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ concurrency:
4545
jobs:
4646
windows_acp:
4747
name: windows_acp
48+
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
4849
runs-on: windows-2025
4950
timeout-minutes: 45
5051
steps:

‎.github/workflows/windows-baseline.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ permissions:
3636
jobs:
3737
windows_baseline:
3838
name: windows_baseline (non-blocking)
39+
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
3940
runs-on: windows-latest
4041
timeout-minutes: 45
4142
continue-on-error: true

‎.github/workflows/windows-recovery.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ permissions:
162162
jobs:
163163
windows_recovery:
164164
name: windows_recovery
165+
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
165166
runs-on: windows-latest
166167
timeout-minutes: 45
167168
steps:

‎.github/workflows/windows-sandbox-w0.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ concurrency:
4747
jobs:
4848
protocol:
4949
name: windows_sandbox_w0_protocol
50+
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
5051
runs-on: windows-2025
5152
timeout-minutes: 45
5253
steps:

‎apps/desktop/electron-builder.config.mjs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ const baseDesktopBuilderConfig = {
132132
to: 'status',
133133
},
134134
{
135-
from: 'resources/workers/filesystem-worker.js',
136-
to: 'workers/filesystem-worker.js',
135+
from: 'resources/workers/filesystem-worker.mjs',
136+
to: 'workers/filesystem-worker.mjs',
137137
},
138138
{
139139
from: '../../native/runtime-host-peer/target/release/maka_runtime_host_peer.node',

‎apps/desktop/scripts/copy-runtime-filesystem-worker.mjs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
import { copyFile, mkdir, stat } from 'node:fs/promises';
2121
import { dirname, resolve } from 'node:path';
2222
import { fileURLToPath } from 'node:url';
23+
import { FILESYSTEM_WORKER_BUNDLE_NAME } from '../../../packages/runtime/dist/filesystem-worker/resource-resolver.js';
2324

2425
const desktopRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
25-
const source = resolve(desktopRoot, '..', '..', 'packages', 'runtime', 'dist', 'workers', 'filesystem-worker.js');
26-
const target = resolve(desktopRoot, 'resources', 'workers', 'filesystem-worker.js');
26+
const source = resolve(desktopRoot, '..', '..', 'packages', 'runtime', 'dist', 'workers', FILESYSTEM_WORKER_BUNDLE_NAME);
27+
const target = resolve(desktopRoot, 'resources', 'workers', FILESYSTEM_WORKER_BUNDLE_NAME);
2728
const metadata = await stat(source).catch(() => undefined);
2829
if (!metadata?.isFile()) throw new Error(`Runtime filesystem worker bundle is missing: ${source}`);
2930
await mkdir(dirname(target), { recursive: true });

0 commit comments

Comments
 (0)