Skip to content

test(update): classify the managed-release launch-context read in the update lint - #8962

Merged
lidge-jun merged 1 commit into
devfrom
fix/update-lint-managed-release
Nov 19, 2026
Merged

lidge-jun merged 1 commit into
devfrom
fix/update-lint-managed-release

Conversation

@lidge-jun

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

Copy link
Copy Markdown
Owner

Summary

The Windows shards on dev (62ffebbe90, ci lane=all run 44559432373, windows 9/14) fail both update-lint cases in tests/update/update-mutation-guard.test.ts, at lines 22 and 51. #8911 made src/update/managed-release.ts import trustedManagedReleaseOptIn from ../cli/launcher-context. The update lint has no reviewed entry for that edge, so it reports an unreviewed static dependency (twice) and a raw imported capability reference.

This PR adds the edge to the reviewed static-import table in tests/helpers/update-import-policy.ts for that one file and that exact import, with a comment explaining why. It is not a blanket allowlist. trustedManagedReleaseOptIn() only returns trustedContext?.managedRelease === true from the launch context the Node launcher bound at startup. It opens no process, file or network capability and only decides which update guidance is shown. #8917 handled the earlier lint gap the same way.

Verification

  • Classification checked against the scanner: an import that is listed for its file in updateStaticImports and is not a sensitive module skips capability-binding tracking (update-capability-policy.ts, the bindings loop) and passes the reason() admission. All three reported lines come from that one import statement and its single use.
  • bun run typecheck: 2,666 files, no errors. bun run structure:check and the file-size ratchet pass.
  • The two lint cases skip on macOS and Ubuntu: the TypeScript 7 sync parser cannot start under Bun on POSIX (tests/helpers/update-lint-parser.ts). They run only on the Windows shards, so the Windows confirmation comes from the next dev batch.
  • NOT RUN: the Windows lint shard on this branch (Windows runs only in the dev batch), full local suite.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. (Test-only change; none needed.)
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. (Lint classification only; no runtime change.)

Summary by CodeRabbit

  • Tests
    • Updated import-policy checks to account for managed-release update guidance accessing launcher context.
    • No user-facing behavior changes.

… update lint

#8911 made src/update/managed-release.ts import trustedManagedReleaseOptIn from ../cli/launcher-context. The update lint had no reviewed entry for that edge, so the Windows shards reported an unreviewed static dependency and a raw imported capability reference. The accessor only reads the launch context bound at startup.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner November 19, 2026 16:48
@lidge-jun lidge-jun added the ci:full Run the four full Ubuntu test shards on this pull request label Nov 19, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 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-19T16:49:50.878494Z 01a9479 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

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

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

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The static-import policy now lists trustedManagedReleaseOptIn from ../cli/launcher-context for src/update/managed-release.ts.

Changes: Managed release import policy

Layer / File(s) Summary
Add managed-release import entry
tests/helpers/update-import-policy.ts
The policy adds trustedManagedReleaseOptIn as an allowed import for src/update/managed-release.ts. A comment describes the accessor as read-only launcher-context data used to select update guidance.

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

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to 01a94

This updates a test-only import allowlist so that update-lint checks recognize one reviewed import. It has no production impact. The change is low risk to merge, and Windows CI will confirm it.

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 test(update) scope and the managed-release launch-context read that the lint classifies. The PR adds one reviewed static-import entry for the ../cli/launcher-context import from sr…
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 test(update) scope and the managed-release launch-context read that the lint classifies. The PR adds one reviewed static-import entry for the ../cli/launcher-context import from src/update/managed-release.ts in tests/helpers/update-import-policy.ts, and the objectives confirm this is the primary change. The title is specific and concise, and it matches the changeset. It is 81 characters, within a normal title length.

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 62ffebb and 01a9479.

Files selected for processing: 1

  • tests/helpers/update-import-policy.ts

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

@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer integration (lidge-jun, dev only) at head 01a9479679. Dev-fix for the windows 9/14 update-lint failures on 62ffebbe90 (ci lane=all run 44559432373). #8911 made src/update/managed-release.ts import trustedManagedReleaseOptIn from ../cli/launcher-context, an edge with no reviewed entry. This adds one exact, commented per-file import entry; there is no module-wide allowance. Fresh-reviewer review: MERGE-OK. Running the scanner with TypeScript 7.0.2 under Node 24, both lint cases fail on dev with exactly the Windows log's three lines and pass on this head (4/4). Adding the mutating launcher-context exports, or importing the accessor from another update file, each made the lint fail again, so the entry stays narrow. Union guards: dev is still 62ffebbe90, this PR's base, so the merge result is this head. Typecheck (2,666 files), structure:check and the file-size ratchet pass. Exact-head PR CI: all 31 checks passed (ci:full). NOT RUN: the Windows lint shard on this branch; it runs in the next dev batch.

@lidge-jun
lidge-jun merged commit 7ebcbb4 into dev Nov 19, 2026
37 of 39 checks passed
@lidge-jun
lidge-jun deleted the fix/update-lint-managed-release branch November 19, 2026 17:02
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