Repository navigation
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #51046
Type of change
What does this PR do?
Include the matched deny pattern in permission errors, using the existing evaluator to respect rule precedence. Custom denial reasons take priority.
For example:
Permission denied: shell (denied by rule "npm *").How did you verify your code works?
From
packages/core:bun run test test/permission.test.ts— 108 passed.bun run test test/tool-shell.test.ts --test-name-pattern "pipeline redirect preserves"— 2 passed.From the repository root:
bun run check— passed.The full Shell suite has the same 7 failures on the unmodified baseline (
ad53e39d2e) and this change; both runs have 80 passing and 19 skipped tests.Screenshots / recordings
Direct screenshots of the VS Code terminal running the same core-service reproduction before and after the change:
Permission.Service.assert → toSessionError.The reproduction creates real database, agent, session, and permission services, configures a deny rule for
npm *, and submitsnpm installto the permission service. The resulting denial is passed throughtoSessionError. It does not launch the full TUI or executenpm install.Before uses the committed permission module from
ad53e39d2e; after usesa30045193c. The remaining fixture and dependencies are the same.Before
After
Checklist