Repository navigation
Conversation
…3711) The plugin's tool.call hook asks nodespace gate check before Edit, Write, MultiEdit and NotebookEdit. A deny refuses the call with the gate's reason and tells the agent not to retry it unchanged; an advisory would-deny and a check that did not run are notes on the result and never block. The hook holds no rule logic. Shell writes are not covered, and the docs say so. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Pragmatic Code Review: PR #3714 (closes #3711)Review Type: Initial Review (no prior reviews or comments on the PR) SummaryA small, well-scoped change: the plugin's Requirements Check
Findings🔴 CriticalNone. 🟡 Improvements
🟢 Nitpicks
SecurityFail-open is intentional and per ADR-097 §5/§7 (not a boundary). No secrets, no shell interpolation (argv array), reason single-lined, capped to 1000 chars, marker-neutralised and covered by a test. Only Finding 2 is a prompt-injection hardening point. RecommendationAPPROVE (with the contract caveat in Finding 1 to be re-checked when #3708 lands; Findings 2 and 4 are cheap and worth folding into this PR). |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment, GitHub blocks self-approval). Full findings in the review comment above.
…unreadable output - Deny text no longer tells the agent to do what graph text says: the shipped sentence says the reason is graph data and never waives a confirmation rule. - --path=<file> is one argument, so a path starting with - is not a flag. - gateCheck documents the answer shape it reads. - Tests: unreadable output, a CLI that cannot start, and the watch note and gate note delivered together. Skipped: a shorter gate-specific timeout and remembering a failure in session state. Revisit when #3708 lands, if its check does not fail fast. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Review addressed (10d78c7)Addressed
Skipped
Re-Review DecisionDecision: NO RE-REVIEW NEEDED. Changes are wording, one argument form and added tests; no logic change. Merge: still held until #3708 lands and the verdict shape is confirmed (see PR description). |
|
Closing: issue #3711 is being closed, so this work is discarded. |
Summary
tool.callhook runsnodespace gate check --action repo_write --path <file>beforeEdit,Write,MultiEditandNotebookEdit.denyrefuses the call with the gate's reason, states the edit was not made, and tells the agent not to retry it unchanged.nodespacecommands, user-facing tools and sessions with no project never reach the check.packages/skill/README.md,references/cli.md) state that shell writes are not covered.Route chosen
The plugin's own
tool.callhook, not aPreToolUsecommand hook: the plugin is already the module that refuses calls (ADR-093 §5), a settings entry is a second install target the installer does not own, and a command hook cannot see the launch's session id (held only in plugin state once the launch variables are removed). Recorded in the README.Depends on #3708 and #3710 (not merged)
nodespace gate checkdoes not exist on main yet. This is built against ADR-097 §1:--jsonoutput{verdict, reason, rule}, pluswould_deny/notefor advisory andchecked: falsefor a check that did not run. Parsing is in one function (gateCheck), so reconciling with #3708's real output is a small edit. Do not merge before #3708 lands and the shape is confirmed.Tests
bun run --cwd packages/skill test:plugin: 66 pass (10 new: allow, deny, every write tool, advisory, daemon unreachable, check-did-not-run, launched session id, no project, marker injection, stopped session).bun run test:changed: skill, scripts and types tiers pass.node-types:checkfails because the shared docs checkout already listsrequires_specontask(Refuse repo writes until the session has an in-progress task with an approved spec #3710's sheet); unrelated to this diff.🤖 Generated with Claude Code