Skip to content

test(update): admit the package launcher's ocx update --desktop refusal in the update lint allowlist - #8824

Merged
lidge-jun merged 1 commit into
devfrom
fix/update-guard-desktop-refusal
Nov 16, 2026
Merged

lidge-jun merged 1 commit into
devfrom
fix/update-guard-desktop-refusal

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

dev batch run 43840762595 (858ea8d) failed windows 9/14 in tests/update/update-mutation-guard.test.ts. Two cases failed, "known-pattern lint finds no unclassified update primitive references" and "known-pattern helper inventory has explicit control-site contracts", each reporting:

bin/ocx.mjs: extra allowlisted capability occurrence: process.exit(64)
bin/ocx.mjs: unapproved runtime capability: process.exit
bin/ocx.mjs: forbidden capability root/acquisition/escape: process

#8795 added a second process.exit(64) at module level in bin/ocx.mjs (line 1346). There, the package launcher refuses ocx update --desktop, because only a Desktop installation's own ocx.exe can run it. The refusal comes before the Desktop handoff, the boot restore and any install-capable step, so it is the same pre-mutation exit class as the existing usage refusal at line 1378. The update lint's allowlist admitted exactly one bin/ocx.mjs:<module>:process.exit(64). This change raises that entry's occurrence limit to 2 and names both refusals in its reason. No other entry changes.

The lint runs only on Windows: openUpdateLintParser returns null, and lintTest skips, where its TypeScript parser cannot open. That covers the Ubuntu PR shards, which is why #8795's exact-head CI was green. The previous batch run, 43832690786, stopped this shard at batch 4/42 on the lock failure fixed in #8823, so this case was not reached there.

Verification

  • The diff is one line in tests/helpers/update-process-allowlist.ts (the count goes from 1 to 2 and the reason is extended).
  • Windows red/green on desktop-c795oh4 is running and will be posted as a comment: the guard test on this head and with dev's allowlist, plus all of windows shard 9/14 through scripts/ci/run-bun-test-batches.sh.
  • The next lane=all on dev after merge is the CI evidence for Windows.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. None are needed: this is a test allowlist.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. The lint is documented as best-effort and not a security boundary. The admitted site is a pre-mutation refusal that exits before any update action.

Summary by CodeRabbit

  • Tests
    • Expanded coverage for command-line exit-code handling when arguments are invalid or a desktop update is requested from a package installation.
    • No user-facing behavior changes.

…usal in the update lint allowlist

#8795 added a second pre-mutation process.exit(64) to bin/ocx.mjs: the package launcher refuses 'ocx update --desktop' before Desktop handoff, boot restore or any install. The Windows-only known-pattern update lint allowlisted exactly one occurrence, so dev lane=all 43840762595 failed windows 9/14 (both update-mutation-guard lint cases). The lint skips where its TypeScript parser cannot open (Ubuntu PR CI), which is why the exact-head CI for #8795 was green.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner November 16, 2026 10:02
@lidge-jun lidge-jun added the ci:full Run the four full Ubuntu test shards on this pull request label Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T10:04:20.025903Z e5a2577 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Nov 16, 2026
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The update-process allowlist now covers two bin/ocx.mjs exit-code 64 cases, including the package-installation refusal for ocx update --desktop before Desktop handoff.

Changes: Update process allowlist

Layer / File(s) Summary
Update exit-code 64 allowlist
tests/helpers/update-process-allowlist.ts
The allowlist description includes the ocx update --desktop package-installation refusal. The permitted match count increases from one to two.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Possibly related PRs

  • lidge-jun/opencodex#8795: Adds ocx update --desktop and describes the npm/pnpm Node launcher refusal that the allowlist now covers.

Suggested reviewers: luvs01

Merge Risk: Minimal · up to e5a25

This updates a test-only allowlist so the Windows update-mutation guard accepts the new ocx update --desktop refusal path. It does not affect runtime behavior. No concrete merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the update lint allowlist is extended to admit the package launcher's ocx update --desktop refusal. The title is specific and matches the raw summary and objectives.…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the update lint allowlist is extended to admit the package launcher's ocx update --desktop refusal. The title is specific and matches the raw summary and objectives. The title's type prefix 'test(update)' fits the change, which only edits a test helper allowlist. The title is 100 characters, which is long but still readable. It is a single sentence with no file list, emoji, or vague wording.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 858ea8d and e5a2577.

Files selected for processing: 1

  • tests/helpers/update-process-allowlist.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer integration of #8824 at e5a2577.

  • Windows red/green on desktop-c795oh4 with bun 1.4.4 and a fresh clone at this head. bun test tests/update/update-mutation-guard.test.ts gives 4 pass, 0 fail, 0 skip (exit 0), and both known-pattern lint cases ran. With dev's tests/helpers/update-process-allowlist.ts it gives 2 pass, 2 fail (exit 1), and both cases fail with bin/ocx.mjs: extra allowlisted capability occurrence: process.exit(64), which is the error from dev run 43840762595's windows 9/14.
  • CI on this exact head: all 31 checks passed, including test 1–5/5 (ci:full) and enforce-target. assert-mergeable-review: OK. The Ubuntu shards skip this lint by design.

The full windows shard 9/14 run on the same host is still going, and the next batched lane=all on dev waits for it, so any failure that was masked further down the shard surfaces first.

@lidge-jun
lidge-jun merged commit da021e3 into dev Nov 16, 2026
37 of 39 checks passed
@lidge-jun
lidge-jun deleted the fix/update-guard-desktop-refusal branch November 16, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). ci:full Run the four full Ubuntu test shards on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant