Repository navigation
ci: skip scheduled workflows on forks and fix the Windows sandbox W0 lane - #6016
Merged
Merged
Conversation
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
Astro-Han
marked this pull request as ready for review
October 9, 2026 01:57
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
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
Astro-Han
marked this pull request as draft
October 9, 2026 02:16
4 of 6 tasks
Astro-Han
marked this pull request as ready for review
October 9, 2026 02:43
zhiiw
approved these changes
Oct 9, 2026
zhiiw
left a comment
Contributor
There was a problem hiding this comment.
Verified on a real Windows machine against 78c4a6f5c69af9a7ea353e96b0c3dd1bcefe9930 (head unmoved at posting; 19 check-runs all green, including windows_sandbox_w0_protocol):
- The schedule guards read correctly:
if: github.event_name != 'schedule' || github.repository == 'apache/maka'on all eight jobs — non-schedule events on forks still run, scheduled lanes stay on the default repo. - The bundle-rename follow-through is consistent:
FILESYSTEM_WORKER_BUNDLE_NAMEis the single source; the desktop copy script, electron-builder extra resources, the W0 verify scripts and the client tests all read.mjs. On this machine the runtime worker build producesdist/workers/filesystem-worker.mjsand the copy script consumes it. filesystem-worker-client.test.js: 25/29 with 4 failures, all attributed to this machine, not the PR — 3× symlink-fixture EPERM (no Developer Mode here) plus the fd-pin test (Linux-only directory-fd semantics). The identical failure set reproduces at a recent main commit (3ac02049) on this machine, so they are pre-existing environment noise.
No blocking issues.
This was referenced Oct 9, 2026
This was referenced Oct 9, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Two CI problems that surfaced together.
Scheduled workflows on forks. Eight workflows with a
scheduletrigger have no repository guard, so every fork with Actions enabled runs them nightly against its own, usually stale,main. On forks they fail for reasons unrelated to any change: Dependency audit reports advisories already fixed upstream, and Release Windows check downloads its upgrade baseline (gh release download v0.2.0-dev.11.20260831 --repo <fork>) from releases that only exist on apache/maka. Each affected job now carries:Only cron runs outside apache/maka are skipped. Pull request, push and
workflow_dispatchruns keep their current behavior, including on forks. Affected:dependency-audit,pr-effort-label,release-linux-check,release-windows-check,windows-acp,windows-baseline,windows-recovery,windows-sandbox-w0.issue-pr-lifecycleandmodel-metadata-upkeepalready guard on the repository;npm-publicationis gated byvars.NPM_NIGHTLY_ENABLED.Windows sandbox W0.
windows_sandbox_w0_protocolhas failed on everymainrun since at least 2026-09-30. Two of the four tests infilesystem-worker-windows-smoke.test.jscrash the worker at launch:The worker bundle was emitted as
dist/workers/filesystem-worker.js, so Node walks up to the nearestpackage.jsonto decide the module type, and the AppContainer sandbox denies that read. The bundle is nowfilesystem-worker.mjs, ESM by extension, with no lookup.FILESYSTEM_WORKER_BUNDLE_NAMEstays the authority: the esbuild script and the desktop resource copy import it from the runtime build instead of repeating the literal. Packaging verifiers keep literal paths because they check the shipped layout on their own.The pinned-version upgrade check verifies the previously released installer with the current resource list, and releases built before the rename ship
filesystem-worker.js. The upgrade-baseline contract now relaxes that requirement, like the other resources newer builds added.The same rename is part of #5969; this lands it without waiting for that feature.
Refs #5969
Verification
actionlinton the eight workflows: clean.npm --workspace @maka/runtime run buildemitsdist/workers/filesystem-worker.mjs;node apps/desktop/scripts/copy-runtime-filesystem-worker.mjscopies it toresources/workers/filesystem-worker.mjs.packages/runtime:node --testoverfilesystem-worker*,linux-sandbox*,macos-seatbelt*tests: 126 pass, 8 skipped (platform-gated), 0 fail.ci-test-plan,ci-workflow-policy,desktop-release-targets,desktop-nightly,product-release,source-legal-inventory,verify-windows-harness,verify-packaged-app*,windows-package-source-closure,release-cli-*): pass.verify-packaged-app.test.mjsnow asserts the baseline contract does not demand the.mjsworker.npm run format,npm run lint: clean.windows_sandbox_w0_protocolandpackage(pinned-version upgrade) runs.AI use
Select exactly one:
Tool(s) and scope: Claude Code diagnosed both failures, wrote the guards, the rename and the baseline relaxation, ran the checks above, and drafted this description.
Checklist
Does this PR entail a change in behavior?