fix(miner): grant Read/Bash in the agent-sdk driver's tool allowlist (#7245)#7276
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7276 +/- ##
=======================================
Coverage 93.81% 93.81%
=======================================
Files 704 704
Lines 69460 69460
Branches 18899 18899
=======================================
Hits 65164 65164
Misses 3302 3302
Partials 994 994
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-19 12:10:28 UTC
Review summary Nits — 2 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
agent-sdk-driver.ts'srun()built its Agent-SDK session withpermissionMode: "acceptEdits"but no toolallowlist (
AgentSdkQueryOptionshad noallowedToolsfield at all). As documented for its CLI-subprocesssibling's identical gap (fixed in #6840),
acceptEditsonly auto-approves file edit tool calls — it doesNOT grant
ReadorBash. So a real headless task, which needs both to explore the repo and run tests, hadevery one of those calls denied and the driver silently produced zero work.
This adds
allowedTools: ["Read", "Bash"]to the session (matching the CLI driver's--allowedTools Read Bash),adds the field to
AgentSdkQueryOptions, and updates the stale "same edit-permission scope" comment to describeboth the
acceptEditsmode and theRead/Bashgrant. Per the CLI driver's own reasoning, this deliberatelydoes NOT widen to
bypassPermissions, which would drop every other safety rail rather than closing just theRead/Bash gap the task hits.
Closes #7245
Scope
site//CNAME/lovable; no new dependency.Closes #7245).Validation
git diff --checknpm run typecheck(root — clean)npm run test:coverage— 100% of the changed lines covered. The driver's option-mapping test now assertsoptions.allowedTools === ["Read", "Bash"]alongside the existingpermissionMode/hooksassertions; allexisting agent-sdk-driver tests pass unchanged.
npm run build:miner(engine builds clean).If any required check was skipped, explain why:
packages/loopover-engine/src/miner/**(one module + one test); CI runs the full suite incl. driver-parity.Safety
bypassPermissionsis explicitly avoided, edits stayacceptEdits-scoped inside the worktree.