Expand DMG intelligence for Linux parity drift#737
Conversation
Yo-DDV
left a comment
There was a problem hiding this comment.
Hi @joshyorko, I reran this draft at fbe65b3 against the current 26.707.31428 DMG, then stacked the current #736 and #738 heads. The stacked run does pass all 14 selected preflights. I still found five blockers before this is ready.
-
The isolated preflight copy can write outside its temporary root.
copyDirectoryContents()preserves symlinks atscripts/lib/upstream-dmg-intel.js:347, and the patcher later follows them when writing bundles (scripts/patches/runner.js:170). I reproduced this with a main-bundle symlink to a temporary victim outside the copy. The copied path remained a symlink and patching changed the victim's hash. Please reject symlinks in extracted input, verify containment before writes, and add a test proving the external target stays untouched. -
A failed required patch can still produce
acceptance = accepted. The child runs with--enforce-critical, but its report is filtered toPATCH_PREFLIGHTSatscripts/lib/upstream-dmg-intel.js:186;buildDecision()never checks the resulting globalblockedstatus or child exit code (scripts/dev/upstream-dmg-intel.js:117). With all 14 selected names markedapplied, an unselectedlinux-quit-guardmarkedfailed-required, and child exit 1, the preflight reportsblockedbut exposes zero blocker findings and the final decision isaccepted. Please surface every required failure, preferably from the existing required-patch policy, and gate directly on preflight status as a backstop. -
A Computer Use gate left in the patched tree can be relabeled as covered. The new post-patch checks only run when
includeComputerUsePlatformGatesis true (scripts/lib/upstream-dmg-intel.js:1482), while the production caller atscripts/patch-linux-window-ui.js:56does not enable it. The raw gate map then marks every gate for the surface aspatched-linux-paritywhen the five patch names succeeded (scripts/lib/upstream-dmg-intel.js:1808). I reproduced a remaining macOS/Windows Computer Use gate yielding zero integrity findings and zero blockers. Please run these checks on the patched candidate and require per-gate evidence before clearing the raw gate. -
The negated Linux pattern is classified backwards. The scanner explicitly matches
process.platform!==`linux`&&process.platform!==`darwin`atscripts/lib/upstream-dmg-intel.js:1746, butclassifyPlatformGate()treats any match containing the Linux literal asalready-linux-enabled(scripts/lib/upstream-dmg-intel.js:1514). The expression therefore gets zero blockers, zero review items, and a "No action" recommendation even though it excludes Linux. This needs operator-aware classification plus a regression test. -
The new Dagger section documents local tooling that is absent from the PR and
main.docs/upstream-dmg-intelligence.md:236references a missing bridge/module and Headroom function, then includes a LAN address and a contributor-specific absolute home path. Please remove that section from this PR or land the actual portable implementation with neutral configuration examples.
For context, the existing targeted suite passes 27/27, the full Node check passes 782/782, and the script smoke suite passes. These cases are outside the current coverage.
|
Please take this pull request out of draft status so it can be reviewed. |
…version ships When the scheduled upstream-build workflow detects a new ChatGPT.dmg app version (CFBundleShortVersionString), it now opens a tracking issue containing: - Version number and DMG metadata (SHA-256, Last-Modified, ETag) - Direct links to the workflow run and artifacts - A comprehensive agent playbook for addressing the new version The playbook guides an agent through: 1. Downloading and inspecting the DMG 2. Building and validating against the new version 3. Fixing patch matchers when upstream code shapes change 4. Running the test suite 5. Opening focused PRs for each fix 6. Updating the tracking issue Issues are deduplicated by version number in the title and the "upstream-version" label. The workflow only creates issues on scheduled runs when a valid version is extracted. Complements PR ilysenko#737 (DMG intelligence report) by adding scheduled version-detection and issue automation on top of the existing analysis tooling.
avifenesh
left a comment
There was a problem hiding this comment.
Solid direction — the platform-gate classification model and the isolated app.asar preflight are exactly what release triage needs, and the decision arithmetic (protectedSurfaceBlockersCount + linuxParityGateBlockersCount split) reads clean. Two things need fixing before merge, one worth a follow-up:
1. docs/upstream-dmg-intelligence.md — the "Optional Dagger MCP" section documents artifacts this PR doesn't ship and leaks personal infrastructure.
- It references
scripts/codex-dmg-intel-dagger-mcp,dagger functions,dagger call verify-dmg-inteletc., but no Dagger module or bridge script is in the PR file list — readers get instructions for files that don't exist in the repo. - It hardcodes what looks like your local setup:
DAGGER_HEADROOM_PROXY_URL = "http://10.10.10.89", an OpenRouter model pin, andCODEX_DMG_INTEL_DAGGER_REPO = "/home/kdlocpanda/second_brain/...".
Please drop the section (or move it to a gist / your fork's docs) until the module actually lands, and scrub the personal endpoints/paths either way.
2. Hardcoded patch-id sets will rot. REQUIRED_PATCH_PREFLIGHTS, LINUX_PARITY_PATCH_PREFLIGHTS, and patchPreflightOwner()'s path mapping duplicate knowledge that already lives in the patch registry and the validate-patch-report profiles. Patch ids and file layouts change frequently here (they did twice this month); when they drift, the preflight silently checks the wrong set. Deriving the required set from scripts/ci/validate-patch-report.js profiles (or the registry's ciPolicy) would keep this self-updating — fine as a follow-up if you add a cross-check test that fails when a listed id no longer exists in the registry.
Minor, non-blocking:
writeAsartest helper hand-rolls the asar pickle format — neat, but consider a one-line comment pointing at the format spec so future editors don't "fix" the 4-byte alignment.buildDecisionnow counts everynew-upstream-capabilityintoreviewItemsCount, so any new upstream plugin flips acceptance toreview— that matches the documented semantics, just confirming it's intended for the daily scheduled run too.
Validation I ran: read the full diff against current main; CI checks on the PR are green; confirmed read-aloud/read-aloud-mcp parity ids still exist in-tree so the parity preflight set is currently accurate.
|
Thank you for the detailed investigation and release-decision work. We consolidated the useful structured-verdict and diagnostic ideas into #834, while keeping upstream intelligence as optional evidence and deriving acceptance from the shared patch reports and release profile. I am closing this PR as superseded by #834. |
Summary
app.asarsafely for required and protected patch preflight instead of treating the archive as an extracted appRoot cause
The existing intelligence report could inventory a DMG, but it did not turn platform gates, newly shipped plugins/native helpers, or Linux patch viability into a release decision. Raw DMG runs also lacked an extracted ASAR tree for patch preflight, allowing missing Linux parity to remain an indirect manual review task.
Validation
node --test scripts/dev/upstream-dmg-intel.test.jsmainlinux-computer-use-install-flowas the exact parity blocker, reports two blocking Linux parity gates, keeps Sites/Chronicle/Skysight/Computer Use/Read Aloud surfaces present, and emits five issue candidates