Repository navigation
build(deps): bump the Electron client majors, holding @electron/fuses - #57
Conversation
017f960 to
bb41919
Compare
|
Rebased onto Resolved by taking
|
The
|
| Suspect | Verdict |
|---|---|
my @electron/packager 18 → 20 bump |
Not involved. @electron-forge/[email protected] pins @electron/[email protected]; our 20.3.0 is a separate copy used only by maximal/client. The failing task is @stuffbucket/maximal-electron#package, which goes through forge. |
my @electron/asar 3 → 4 bump |
Not involved. packager 18.4.4 resolves @electron/asar: 3.4.1 on this branch and on main — identical. |
lockfile drift moving minipass |
No. Both versions are byte-identical to main's lockfile. |
That leaves 43 → 44 as the only change reaching this package, which does not obviously explain a license-file read.
It is platform-specific. pnpm --filter @stuffbucket/maximal-electron run package passes on darwin-arm64 locally; only linux-x64 in CI fails. I cannot reproduce it from this machine, so I am not going to keep guessing at it through 10-minute CI rounds.
Worth a look: forge.config.ts sets derefSymlinks: true and prune: false, and prunePlatformPackages (added in #48) does a recursive readdirSync then rmSync in packageAfterCopy. An enumerate-then-delete ordering against two minipass copies is the shape that would produce exactly this error, and the linux dependency closure is the one that carries both.
Also note my verification gap: locally I ran the root pnpm run package, which is turbo run package --filter maximal-client — it never packages maximal-electron. That is why this reached CI. pnpm --filter @stuffbucket/maximal-electron run package is the command to run next time.
Dependabot has since opened #61 for this same group (it also includes @electron/fuses 2, which is blocked on Electron Forge 8 — see the PR body).
|
Correction to the line above — a shell quoting slip ate the package name. It should read:
|
`main` is red at `6d8f346`, and #57 is red with the same error naming a different file. Neither is a dependency break — which is exactly what the failing pull requests made it look like. ## The bug `@electron/packager` derives its staging base from a constant: ```js // common.js baseTempDir(opts) { return path.join(opts.tmpdir || os.tmpdir(), 'electron-packager') } // packager.js async ensureTempDir() { if (this.useTempDir) { await fs.remove(this.tempBase) // the whole shared directory, every run } } ``` The directory *inside* that base is already unique — `stagingPath` calls `mkdtemp`, which is where `tmp-TRr4aR` comes from — so uniqueness is not what is missing. The unconditional wipe of the shared **parent** is what throws it away. Since #45, CI packages two applications rather than one (`ci.yml`: "Two Forge builds, not one"). So the second build deletes the first's staged tree while asar is midway through reading it. asar crawls, `lstat`s every path, then opens each in turn, so the loss surfaces as ENOENT on a file it had **already stat'ed** — whichever file it reached at that instant. That accounts for the whole symptom set: | Observed | Because | |---|---| | `resources/app/package.json` on `main`, `node_modules/minipass/LICENSE.md` on #57 | whatever asar was reading when the wipe landed | | Failing package moves between `maximal-electron` and `maximal-client` | whichever build started first loses | | `lstat` succeeds, `open` ENOENTs, same process | the tree is deleted between crawl and read | | Green locally, red in CI | one build locally; two concurrently in CI | | Red on `main` with no Electron bump | nothing to do with any dependency | ## The fix `mkdtemp` one level up, in both applications. Packager still wipes the base, but it is one this build created and owns, and `move()` relocates the finished build into `out/`, so nothing accumulates there. Both applications must set it. One alone still leaves the other wiping a directory it does not own. ## Verification Planting another build's staging tree at the shared path — the exact path from the CI error — and running a package: ``` without this change sentinel GONE with this change sentinel PRESENT ``` No timing dependence: the wipe is unconditional, so this is deterministic rather than a race that has to be caught. Separately, a packaged run with this change creates no `electron-packager` base at all, staging under `forge-maximal-electron-AAbIdm` instead. `tsc --noEmit` and `eslint` pass in both packages. The real check is this branch's own `electron package` job, which exercises the two concurrent builds that were colliding. ## Worth reporting upstream A fixed, shared temp base that is `rm -rf`'d once per run makes concurrent `@electron/packager` invocations unsafe for anyone, not just this repository.
Held out of #55 because it fails in two packages and both needed decisions rather than a bump. Both turned out to be **knip 6 behaviour changes**, not debt this repo had accumulated. ## maximal-core **Five system binaries newly reported unlisted** — `qemu-system-aarch64`, `pgrep`, `swtpm`, `schtasks`. OS-provided, not npm binaries, so they join `trufflehog` in `ignoreBinaries`. **Five `TokenUsage*` types newly reported unused — and they are.** This was the one that looked risky, since `maximal-core` publishes to GitHub Package Registry. It isn't: - the package's surface is the **six entries** in its `exports` map (`client`, `contract`, `control-contract`, `provider-host`, `settings-types`, `supervisor`) — the token-usage barrel is not one of them; - a declaration build confirms it: **zero** `TokenUsage*` names anywhere in `dist/lib/*.d.ts`; - nor is the shape inlined structurally — no `byModel`, `byProvider`, `buckets`, `inputTokens` or `cacheRead` either; - the one file referencing the summary type (`lib/live/resources.ts`, via `Awaited<ReturnType<...>>`) is not reachable from `contract.ts`, `client.ts` or `supervisor.ts`. Nothing outside could have imported them, because nothing outside could reach them. **The types themselves stay in `store.ts`**, where they are genuinely used — `TokenUsageTotals` is extended by three of the others. Only the dead re-export goes. **Stale ignores removed** — `src/lib/auth/token.ts`, `@stuffbucket/eslint-config`, `@stuffbucket/maximal-provider-contract`. knip 6 detects all three as used, so the ignores were hiding nothing. ## maximal **knip 6 descends into the nested `client/` workspace; knip 5 did not.** `client/` has its own manifest declaring `vitest`, `react` and `@playwright/test`, so resolving its imports against `maximal`'s manifest produced 14 phantom "unlisted dependencies". `client/` is ignored here and analysed on its own terms. Three workspace dependencies plus `prettier-plugin-packagejson` are detected as used now, so those `ignoreDependencies` entries go. `lint-staged` replaces them — it is configured through a `package.json` block rather than imported, which knip does not count as usage. Same entry `maximal-core` already carries. ## Verification - knip 6 passes in **both** packages. - `maximal-core` `check:deep:host` passes end to end. - Container suite **15/15 tasks**; `verify:workspace` clean; lockfile re-resolved and stripped of rotating shard hosts. Replaces the last held item from #37 that was actually actionable. `@electron/fuses` 2 stays blocked upstream on Electron Forge 8 (see #57).
|
Correction: the #69 (landed as ff4fcf3) has the real cause — Consistent with that, this job passed on a plain re-run here with no code change. Rebasing onto main to pick up the fix. |
bb41919 to
3540c9c
Compare
|
Rebased onto The rebase itself applied cleanly, but git auto-merged
Resolved versions: The earlier red X was not this PRFor the record, since it sat red for a while: the Still worth deciding#61 is Dependabot's version of this same group, and it additionally bumps |
From the npm-major group of 17, the part that changes the artifact users install: electron 43.4.0 -> 44.0.0 (both declarations) @electron/packager 18 -> 20 @electron/asar 3 -> 4 @vitejs/plugin-react 5.2 and 6.0 -> 6.1 (both declarations) @electron/fuses 1 -> 2 is held at ^1.8.0. It breaks the peer contract of @electron-forge/[email protected], which requires ^1.0.0; only Electron Forge 8.0.0-alpha.5 and later accept ^2.0.0, and Forge's latest is still 7.11.2. Pulling a Forge alpha into the signed and notarized client to satisfy a fuses bump is not a trade worth making. It unblocks when Forge 8 ships. Aligning @vitejs/plugin-react on 6.1 emptied the split ratchet in verify-workspace.mjs, which failed as designed: "@vitejs/plugin-react is aligned now -- drop it from BACKLOG". Its own note says to delete the backlog and the ratchet with it once it reaches zero, so both are gone. What remains is the check that still does work -- no two workspace packages on different versions of the same directly-declared dependency -- and DELIBERATE, where a split that is meant gets named with a reason. Verified here: the container suite is 15/15, verify:workspace passes, `pnpm run package` builds the darwin-arm64 app on Electron 44, and CI's packaged-app assertions hold against it (app.asar 1,072,733 bytes, sidecar 74,311,010 bytes). Peer resolution is clean apart from a pre-existing dsh-brand rc.6 vs rc.8 mismatch that is already on main. NOT verified here, and it cannot be: signing, notarization, stapling, and the Gatekeeper acceptance test. Those need a prerelease tag through stuffbucket/macos-builder followed by scripts/verify-dmg.sh, whose step 12 is what checks the bundle identifier and Team ID did not move. Per AGENTS.md nothing publishes until that passes on a Mac that has never held the signing identity.
3540c9c to
3651181
Compare
|
Rebased onto The lockfile re-resolve was uneventfulWorth recording because it used to be the hard part. Resolution is what was intended
The second
Artifact verification on macOS arm64Both apps package ( I A/B'd the signing surface against Electron 43.4.0 built from Both emit the same adhoc-verify complaints on 43 as on 44, so they are the pre-existing shape of a dev What this does not establishGatekeeper, notarization and the designated requirement. Those need the macos-builder and Apple's notary queue and are gated at release, not at PR time — no PR-level run can settle them. What the above does establish is that Electron 44 changes nothing about the packaging or signing surface relative to 43. |
Group 3 of 4 replacing #37. This one changes the artifact users install, so
read the verification section before merging — a green CI run is not the verdict
here.
electron@electron/packager@electron/asar@vitejs/plugin-react@electron/fuses 2 is held back
It breaks the peer contract of
@electron-forge/[email protected], whichrequires
^1.0.0:Only Electron Forge 8.0.0-alpha.5 and later accept
^2.0.0, and Forge'slatestis still 7.11.2. Pulling a Forge alpha into the signed, notarizedclient to satisfy a fuses bump is not a trade worth making — fuses control
runtime hardening on the shipped app. Held at
^1.8.0; unblocks when Forge 8ships.
The split ratchet emptied itself
Aligning
@vitejs/plugin-reacton 6.1 removed the last entry, andverify-workspace.mjsfailed as designed:That file's own note says "When BACKLOG reaches zero, delete it and this
ratchet with it", so both are gone. What remains is the check that still does
work — no two workspace packages on different versions of the same
directly-declared dependency — plus
DELIBERATE, where a split that is meantgets named with its reason. This is the ratchet reaching the state it existed to
reach, not a check being switched off.
Verified here
verify:workspacepasses (13 assertions).pnpm run packagebuilds the darwin-arm64 app on Electron 44.0.0, and CI'spackaged-app assertions hold against it —
app.asar1,072,733 bytes, sidecar74,311,010 bytes.
dsh-brandrc.6 vs rc.8mismatch that is already on
main(from build(deps-dev): bump @deepseek-ai/dsh-attachment from 0.1.0-rc.6 to 0.1.0-rc.8 #40) and unrelated to this PR.NOT verified here — and it cannot be from a dev machine
Signing, notarization, stapling, and the Gatekeeper acceptance test.
Per AGENTS.md and RELEASING.md this needs:
stuffbucket/macos-builder(the only holderof the Developer ID), then
scripts/verify-dmg.sh <tag> <prev-tag>— step 12 is what checks thebundle identifier and Team ID did not move, and
That last one is a precondition for publishing, not a nice-to-have: a bundle-id
or Team-ID change strands every installed copy, since macOS keys TCC grants,
keychain ACLs and LaunchServices registration on the pair. An Electron major is
exactly the kind of change that can move them.
So: green checks on this PR mean the app builds and its contents are intact.
They say nothing about whether a user's Mac will open it.
Replaces part of #37.