Repository navigation
Add check-effect-allowlist: fail on an effect outside a reviewed allowlist - #4411
Merged
Merged
Conversation
Contributor
Author
|
APPROVE at dbeac1b Independent review at this exact head (base bbf5a82, up to date with origin/main, mergeable). Ran myself in a clean worktree:
Findings
Trusted without re-running: the removal ticket c6cb44c4 contents, and the PIN registry claim for pinReachableNodes (I read the call sites only). 🤖 Generated with Claude Code |
Contributor
Author
|
Merge queue: #4411 was taken out of the queue — the merge gate failed on it, on top of main. Reproduce by merging or rebasing |
…wlist scripts/check-effect-allowlist.ts scans non-test source under packages/desktop-app/src/ for $effect, $effect.pre and $effect.root calls (comments and strings blanked first) and compares the count per file with EFFECT_ALLOWLIST, which names the external system each effect drives. Fails on an uncovered call (file and line) and on a stale entry. Effects that write reactive state carry a writesState reason and are capped by MAX_STATE_WRITING_EFFECTS. Wired into the push check (test-gate.ts) and bun test scripts/; the gate scope now routes a frontend change to the scripts tier. AGENTS.md describes the rule and the check. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
mstomar125
force-pushed
the
effect-allowlist-checker
branch
from
December 1, 2026 13:56
dbeac1b to
34f216a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NodeSpace task: e4d933d6 (a new effect outside a reviewed allowlist fails the push check).
What
scripts/check-effect-allowlist.tsscans non-test.svelte/.ts/.jsunderpackages/desktop-app/src/for$effect(,$effect.pre(and$effect.root(, after blanking comments (line, block, HTML) and string literals, and compares the count per file withEFFECT_ALLOWLIST. Each entry names the file and one element per effect with the external system it drives.writesStatereason ("removal tracked in c6cb44c4");MAX_STATE_WRITING_EFFECTS = 11caps them so the set can shrink but not grow.scripts/test-gate.ts, same shape as the lifecycle/key-prefix checks),bun test scripts/(real-repo test), andgate-scope.tsnow routes a frontend change to the scripts tier (scope.frontendimpliesscope.scripts; its test and thedescribeScopetest updated). Comments in test-gate.ts and AGENTS.md that said the scripts tier is skipped for frontend-only diffs are corrected.No component was changed: state-writing effects are listed, not removed (that is c6cb44c4).
Counts
46 production effect call sites in 30 files, matching the issue. 11 assign reactive state directly in the effect body (settings-pane, collection-move-dialog, database-name-dialog, node-ref-preview, kanban-view, person-schema-form x2, relationship-viewer-modal x2, remote-tool-confirmation-card x2), matching the issue's 11. Not flagged, but they write state through a call or callback and say so in
drives: import-options-modal (resetToDefaults), relationship-viewer-modal's closeAdd and load effects, pane-content (async viewer maps), ai-chat-pty-session (listener sets sessionEnded), code-block-node render effects (CodeBlockRenderer state).Not done
The reactivity decision and the code-quality standard are NodeSpace workspace nodes, not files in this repo; they are not updated here (the daemon was not reachable, and I did not write to the workspace). Proposed text is in the author's report.
Verified
bun test scripts/: 1727 pass, 0 fail.bun run quality:scripts:checkclean.bun run scripts/check-effect-allowlist.tspasses on the tree. The push check ran on push and passed.🤖 Generated with Claude Code