Repository navigation
fix(release): port three release-gate fixes to main so cuts stop re-inheriting them - #19945
Conversation
The linux-arm64 release build failed packaging, and retried three times:
[verify-linux-glibc-floor] 1 bundled native binary is built for the
wrong architecture (target arm64):
resources/node_modules/@parcel/watcher-linux-x64-glibc/watcher.node
is x64, expected arm64 (from its own path)
`afterPack` ran `verifyLinuxGlibcFloor` at its top, before
`prunePackagedRuntimeNodeModules`. A cross-build intentionally installs
every optional native variant, so at that point the arm64 slice still
carries the x64 `@parcel/watcher` package that the prune exists to drop.
The check was reading a file that was never going to ship.
Move the floor check below the prune so it inspects the binaries actually
packed. Same ordering as 35f1b0e on the v1.4.197 release branch, which
shipped green and was never merged back to main.
(cherry picked from commit 6400598)
(cherry picked from commit a883e17)
The macOS, Windows, and both Linux release builds all failed on "Verify
telemetry constants present in app.asar", blocking publish-release:
::error::BUILD_IDENTITY constant missing or unexpected value in
dist/mac-arm64/Orca.app/Contents/Resources/app.asar
The verifier printed no context sample, because the string
`BUILD_IDENTITY` does not occur anywhere in the shipped bundle at all.
#17527 added `minify: 'oxc'` to the main bundle, so oxc renames the
module-local `const BUILD_IDENTITY` to a short identifier.
`BUILD_IDENTITY_RE` keys off the literal name and therefore cannot match a
production bundle. `MINIFIED_TELEMETRY_RE` matches the adjacent injected
identity/key pair instead, which survives renaming.
#11019 created these patterns without that fallback, and its own comment
predicted this exact failure if minification were ever enabled on the main
bundle. The fallback was written on the v1.4.197 release branch in
35f1b0e and never merged back to main, so main has never been able to
verify a minified bundle.
Verified against a real local bundle built with the release env vars
(ORCA_BUILD_IDENTITY=stable, ORCA_POSTHOG_WRITE_KEY=phc_...): the bundle
does not contain "BUILD_IDENTITY"; both the narrowed and the widened
BUILD_IDENTITY_RE fail; MINIFIED_TELEMETRY_RE matches and recovers
identity=stable plus the write key.
(cherry picked from commit 39c3e44)
(cherry picked from commit d0bbe44)
The Windows skill-sharing release gate — which blocks publish-release — failed on this test, wedging the 1.4.198 cut. The implementation is correct; the assertion was not. `findSkillFiles` pushes results in `readdir` order and dedupes visited directories by realpath, so of the 32 junctions pointing at one target exactly one survives. The assertion hardcoded both the array order and which link won. `readdir` order is filesystem-dependent: APFS and ext4 return SKILL.md first, while NTFS enumerates its filename index alphabetically on the uppercased name, where "LINK00" sorts before "SKILL.MD" (L=0x4C < S=0x53). Windows therefore returned the same two paths in the opposite order. Assert the contract instead: the real file is present, exactly one link-routed path survives dedup, and nothing else does. (cherry picked from commit 9a832e9) (cherry picked from commit 505b85c)
|
Warning Review limit reachedNext included review available in 4 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe Linux packaging hook now checks the pruned target-architecture binaries. Telemetry constant matching supports backtick literals and minified declarations. Telemetry verification uses fallback matches for renamed production constants. The skill-file walk test no longer depends on filesystem directory order. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The packaging validation, telemetry verification fallback, and filesystem-independent test assertions have no remaining actionable merge risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description clearly explains the problem, three changes, affected platforms, linked issues, verification status, and testing limitations. It does not follow the template fully because it omits explicit ELI5, Visual Proof with N/A, Review, Agent skill upstream boundary, Notes, and Checklist sections. Resolution Add the missing template sections. State N/A with a reason for Visual Proof because this is not a UI change. Complete the Agent skill upstream boundary and Checklist items, and include Review and Notes information. Preserve the existing problem, change, issue, and verification details. ✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
ℹ️ One minor suggestion inline — the three fixes look correct and mergeable.
Reviewed changes
Three release-gate fixes cherry-picked from release branches onto main so future cuts stop re-inheriting them.
electron-builder.config.cjs— glibc floor check reordered after the prune.verifyLinuxGlibcFloornow runs afterprunePackagedRuntimeNodeModules, so it no longer trips on wrong-arch@parcel/watchernatives that were about to be deleted. Verified the correct-arch node-ptypty.nodestill survives the prune, so the original #9902 glibc-floor protection is preserved.telemetry-bundle-constant-patterns.mjs+verify-telemetry-constants.mjs— minified-constant fallback. AddsMINIFIED_TELEMETRY_REand a??fallback becauseoxcrenamesBUILD_IDENTITY/WRITE_KEYin shipped bundles. SinceTELEMETRY_ENABLEDistrue, this gate now enforces on macOS/Windows/Linux cuts.skill-root-file-walk.test.ts— stop assertingreaddirorder. Asserts the dedup contract (realSKILL.md+ exactly one collapsed link, total 2) instead of a fixed array, which is genuinely order-independent and can still fail if dedup regresses.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
| export const BUILD_IDENTITY_RE = /\b(?:const|let|var)\s+BUILD_IDENTITY\s*=\s*["`](rc|stable)["`]/ | ||
| export const WRITE_KEY_RE = /\b(?:const|let|var)\s+WRITE_KEY\s*=\s*["`](phc_[A-Za-z0-9_-]+)["`]/ | ||
| export const MINIFIED_TELEMETRY_RE = | ||
| /\b(?:const|let|var)\s+[$\w]+\s*=\s*["'`](rc|stable)["'`][\s\S]{0,200}?[,$]\s*[$\w]+\s*=\s*["'`](phc_[A-Za-z0-9_-]+)["'`]/ |
There was a problem hiding this comment.
The $ inside [,$] is a literal dollar sign, not an end-of-line/string anchor, so it matches nothing for the comma-separated minified declaration the comment above describes (const n="rc",t="phc_..."). If it was meant to also cover a ;-separated statement form, it isn't doing that — consider dropping it or documenting why it's there, otherwise it reads as a delimiter that can never match.
There was a problem hiding this comment.
ℹ️ No new issues in this delta — the two added tests correctly pin the ported fixes.
Reviewed changes
Since the prior pullfrog review (9d372d8), two test commits landed that pin the three release-gate fixes:
- Pinned the prune-before-glibc-gate ordering with a test. Added
prunes non-target native packages before the Linux glibc gatetoconfig/scripts/electron-builder-runtime-resources.test.mjs, building a cross-built fixture whose non-target@parcel/watcherELF carries a path-declared-arch vse_machinemismatch soverifyLinuxGlibcFloorthrows if it ever runs before the prune. The arch mapping is symmetric (x64↔arm64) and the assertion genuinely fails on revert. - Pinned the minified-telemetry fallback with a test. Added
accepts minified adjacent declarationstoconfig/scripts/telemetry-bundle-constant-patterns.test.mjs, assertingMINIFIED_TELEMETRY_REmatches the minifier's comma-separatedconstform. - Reformatted the skill-root walk assertion. Collapsed the dedup
.toHaveLength(1)filter onto one line insrc/main/skills/skill-root-file-walk.test.ts.
The single prior minor suggestion remains open and unaddressed (the dead $ in MINIFIED_TELEMETRY_RE's [,$] class), so this is a non-approving comment review rather than an approval; I'm not re-raising it here.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Review status: clean, and the PR changed as a resultRan a multi-model review loop over this branch. It found a real defect in the PR — fixed below — and What changed during review
This test ablates — verified twice, independently: with the check/prune order reverted it fails
Verification
On precedent"Prune, then verify" is the standard ordering for Electron packaging pipelines — validation belongs after Known limitations, deliberately not addressed hereThese are P2 follow-ups, out of scope for a port PR:
Why this matters beyond one releaseRelease lineage is a side branch that never merges back, so a fix landed only there is lost by |
Manual Electron validation — regression smoke onlyValidated a dev build launched from this PR head ( Read this first: these screenshots do not show the packaging fix working. This PR has zero renderer/UI changes, so the app's UI here is byte-identical to its base. The point of this pass is narrower: confirm the branch still builds and runs a healthy app, and that the skills surfaces touched by Instance identity (proof I drove my own instance)Dedicated worktree, private user-data dir, private CDP port (9337) and renderer port (5177). The dev server returned 200 for a file in this worktree and 403 for a peer worktree, confirming the renderer served this checkout. 1. App boots and paints, no error dialog / whitescreenFresh profile, so "No workspaces found" is expected. 2. Skills page enumerates correctly — 127 skills across 12 present sourcesOpened through the real sidebar Skills button (not a direct route call). Facet counts are self-consistent: Home 34 + Workspace 45 + Bundled 6 + Plugin 42 = 127. Main-process log, repeated across four separate scans:
3. Skill detail resolves a real SKILL.md path from the walkThe Path row is the resolved output of 4. Workspace-root walking works (repo-scoped roots)45 results, all from repo roots inside the worktree. Cross-root de-duplication is also correct — skills present in Console / main-process errorsRenderer: 0 errors. Three warnings, all pre-existing dev-mode noise unrelated to this diff:
Main process: no errors. Two non-fatal notes:
In-scope testsAll three files resolved and ran (non-zero count matching the filters). Worth noting: What this does NOT prove
|





Problem
Three release-gate fixes have been written on release branches and never merged back to
main, soevery new cut re-inherits all three failures. This is the third recurrence:
main?35f1b0ebb9"validate minified telemetry and prune target natives first"a883e17116+d0bbe4475d(also duplicated as6400598212)release/adhoc-1.4.200-daily-202609091829-cherrypicksThe automated Daily Release Readiness Scan files it fresh every cut:
STA-7114 (v1.4.199) and
STA-7186 (09-10 daily) are the same bug, filed twice.
Release lineage is a side branch that never merges back, so a fix landed only there is lost by
construction. This PR lands all three on
mainonce.What's here
Three cherry-picks,
-xso provenance is preserved. All authored by Neil; I only ported them.prune optional natives before the linux arch floor check(config/electron-builder.config.cjs)verifyLinuxGlibcFloorran at line 288, butprunePackagedRuntimeNodeModules— which deletes thewrong-arch optional natives — runs at line 328. A cross-build still carries
@parcel/watcher-linux-x64-glibc/watcher.nodein the arm64 slice at check time, so the check throwson a file that was about to be deleted and was never going to ship. Linux arm64 packaging fails.
Pure code motion: the check moves after the prune, with a comment recording the ordering constraint.
restore the minified telemetry constant fallback(config/scripts/verify-telemetry-constants.mjs,telemetry-bundle-constant-patterns.mjs)Both regexes key off the literal
BUILD_IDENTITY/WRITE_KEYidentifiers, whichoxcrenames —minify: 'oxc'is pinned atelectron.vite.config.ts:200,312. The identifier does not occur in theshipped bundle, so the verifier reports it missing with no fallback. Fails macOS, Windows and both
Linux builds. Note this class is invisible to PR CI, which packages Linux and Windows only and
never runs the asar verifier.
stop asserting readdir order in the skill root walk test(src/main/skills/skill-root-file-walk.test.ts)The test asserted an exact array order.
findSkillFilesemits inreaddirorder, and NTFSenumerates its filename index on the uppercased name, where
LINK00sorts beforeSKILL.MD. Windowsreturns the same two paths reversed. Asserts the contract instead of the order.
Verification
main.node_modulesand I did not want a package-scriptrun installing into a shared tree. CI covers
skill-root-file-walk.test.ts; the other two files arepackaging scripts exercised only by a real cut.
Why it matters
Until this lands, every future cut starts broken in the same three ways and someone re-discovers them
under release pressure. Landing it is what closes STA-7114 / STA-7186 for good rather than for one release.