Repository navigation
Conversation
…ning Lets a PostHog grant turn Core's asset output scanning on or off for a cohort. Both land ahead of Core: an older core drops the arg as dropped_unsupported.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC. 📝 WalkthroughWalkthroughThe grantable-argument allowlist adds ChangesCore beta grants
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No concrete current-head failure is established: conflicting scanning directions are intentionally rejected, and the broader assets-disable interaction has no demonstrated failure. No actionable merge blocker is supported. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @synap5e.
Found 6 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 1 |
| 🟢 Low | 3 |
| ⚪ Nit | 1 |
Panel: 8/8 reviewers contributed findings.
| { arg: '--disable-assets-output-scanning', commit_ranges: range } | ||
| ] | ||
| }) | ||
| ).toEqual([]) |
There was a problem hiding this comment.
🟠 High — This test asserts parseCoreBetaGrants returns [] when a payload names both --enable-assets-output-scanning and --disable-assets-output-scanning, but the only production change in this diff is the two new entries in CORE_BETA_GRANTABLE_ARGS — no whole-payload conflict rejection is added here. Either the conflict logic already exists elsewhere in parseCoreBetaGrants (in which case the test is fine but the diff should say so), or the implementation half of this change is missing and the test will fail. Raised by 1 of 8 reviewers (gemini-3.1-pro edge-case).
There was a problem hiding this comment.
No change needed. The rule already exists in parseCoreBetaGrants: after collecting entries, it returns [] if any granted arg's --enable-/--disable- opposite (oppositeArg) is also granted. Adding the two tokens to the allowlist is all it takes for them to be covered, and the test passes. Since c7e71ab the refusal is also logged.
| '--enable-agent' | ||
| '--enable-agent', | ||
| '--enable-assets-output-scanning', | ||
| '--disable-assets-output-scanning' |
There was a problem hiding this comment.
🟡 Medium — Allowlisting both directions of the same stem makes the whole-payload void reachable from a legitimate staged rollout: the conflict check compares only arg, so an --enable-assets-output-scanning scoped to one commit lineage plus a --disable-assets-output-scanning scoped to a disjoint lineage counts as a contradiction and discards every other grant in the payload (including --enable-assets) for all clients. selectCoreBetaGrantArgs already resolves per-arg conflicts first-wins with a withheld reason and would grant at most one of two disjoint ranges on any install, so consider scoping the rejection to the conflicting pair rather than the entire payload. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Keeping the whole-payload refusal. It predates this PR, applies the same way to --enable-assets/--disable-assets, and since c7e71ab it logs the conflicting pair, so the void is visible. Resolving each pair on its own would change the grant contract for every pair, which is out of scope for adding two allowlist entries.
| '--disable-assets', | ||
| '--enable-agent' | ||
| '--enable-agent', | ||
| '--enable-assets-output-scanning', |
There was a problem hiding this comment.
🟢 Low — oppositeArg pairs only exact stems, so --enable-assets-output-scanning (stem assets-output-scanning) is unrelated to the --enable-assets/--disable-assets pair. A single payload can therefore put --disable-assets --enable-assets-output-scanning on one command line — the contradictory-flag situation the module's contract says must not occur — and a user who explicitly passed --disable-assets still receives the sub-flag grant, with Core's precedence for a sub-flag of a disabled subsystem unspecified. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
No change. Core's output-scanning switches only take effect with assets enabled (the flag help says 'Only applies with --enable-assets'), so --disable-assets --enable-assets-output-scanning leaves assets off and the sub-flag does nothing. The two don't contradict each other. If both scanning switches ever reach Core, disable wins.
| '--enable-agent' | ||
| '--enable-agent', | ||
| '--enable-assets-output-scanning', | ||
| '--disable-assets-output-scanning' |
There was a problem hiding this comment.
🟢 Low — The whole-payload void is silent: nothing logs the conflicting pair, and the withheld reporting lives in selectCoreBetaGrantArgs, which receives the already-empty list. An operator typo is indistinguishable from "no grants configured" apart from cached= [] in the init log, and because the raw payload persists, the void survives restarts until someone notices. Log the conflicting arg pair at parse time. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Taken (c7e71ab). A payload that names both directions now logs [core-beta] payload refused: it grants both <arg> and <opposite>. Both tokens are allowlisted, so the log line carries nothing else from the payload.
| '--enable-agent' | ||
| '--enable-agent', | ||
| '--enable-assets-output-scanning', | ||
| '--disable-assets-output-scanning' |
There was a problem hiding this comment.
🟢 Low — --disable-assets-output-scanning makes a scanning control remotely switchable off by PostHog payload, and a --disable-* grant with no payload description is deliberately silent (betaActivationNotice.ts skips unnamed force-offs), so the only trace is a [core-beta] launch-log line that persists across restarts via ops-flags.json. Confirm output scanning is an indexing convenience rather than a safety or integrity check before exposing it to remote, notice-free disabling. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Confirmed: output scanning is about catalogue completeness, not safety or integrity. With it off, outputs are still registered as nodes produce them, and output rows already in the database are kept and served. The scanner just doesn't catalogue files no node declared, or notice out-of-band changes and deletions. Remote disabling without a notice works the same way as --disable-assets, which is already grantable.
| '--enable-agent' | ||
| '--enable-agent', | ||
| '--enable-assets-output-scanning', | ||
| '--disable-assets-output-scanning' |
There was a problem hiding this comment.
⚪ Nit — The allowlist assertion mirrors the source constant verbatim, so a misspelled token (e.g. singular --enable-asset-output-scanning) would pass both tests while shipping a grant Core can never parse — it would be silently reported as dropped_unsupported forever. The new case also only exercises the --disable- direction end to end; add a case granting --enable-assets-output-scanning on its own. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Taken (98e8187): the enable switch is now granted on its own, end to end. Both spellings match Core's comfy/cli_args.py on the output-scanning branch (--enable-assets-output-scanning, --disable-assets-output-scanning).
The test named both directions but only parsed the disable switch alone; the enable switch appeared only in the rejected both-directions payload.
|
Follow-up from review: added a test that the enable switch is also granted when it's the only scanning entry in the payload (not just alongside the disable switch). |
The whole-payload refusal was silent: nothing distinguished it from an empty payload, and the persisted payload kept it that way across restarts. Log the conflicting pair; both tokens are allowlisted.
|
Closing this for clean-up, might want to reopen when the new version of Desktop lands. |
TL;DR
Reviewer attention: Low priority, small. Two allowlist entries and a test.
PR Justification: Core is adding a switch pair for asset output scanning (Comfy-Org/ComfyUI#16566). A Core beta grant can only set args on Desktop's allowlist, so the allowlist has to ship first.
Stakes: Low. Grants can only add args, a user's own arg or its opposite still wins, and a core without the flag drops it as
dropped_unsupported.Changes: Adds
--enable-assets-output-scanningand--disable-assets-output-scanningtoCORE_BETA_GRANTABLE_ARGS.Why
Output scanning keeps the asset library in sync with the output folder. It picks up files added outside ComfyUI and marks deleted ones as missing. Core#16566 makes it switchable, so a rollout can compare both settings on real installs before any default changes. Desktop ignores grants for args it doesn't know. Until this ships, a payload that grants either switch is skipped for that entry, and the rest of the payload still applies.
Notes
--enable-/--disable-pairing is derived from the prefixes, so the two new args get the existing conflict rule without any new code: a payload that names both grants nothing. That refusal now logs the conflicting pair ([core-beta] payload refused: ...), so it can't be mistaken for an empty payload.--disable-assets, the allowlist lands ahead of Core. Granting either arg to a core without the flag is safe; the launch reports it asdropped_unsupported.Change breakdown
Merge base
3cb5001c, headc7e71abf. 56 changed lines (53 added + 3 deleted).src/main/lib/coreBetaGrants.tssrc/main/lib/coreBetaGrants.test.tsHow tested
--enable-assets, and naming both in one payload grants nothing.coreBetaGrants.test.tspasses 116/116 atc7e71abf, and node typecheck and eslint are clean.coreBetaGrants,betaActivationNoticeandtelemetrytests pass (321 tests).