Commit b050d20
fix: roll back workspace trust-boundary hardening (#335)
## Requirement or Bug
Restore pre-2.1 file/git behavior for symlinked workspaces while keeping
the narrow write guard.
## Bug Reproduction Steps
N/A (behavior restore).
## Root Cause
The 2.1 trust-boundary hardening resolved every tool path through
realpath and probed git repo config, which broke legitimate symlinked
workspaces and slowed every git invocation. Fundamental fix: the broad
gates are removed; the guard that matters (blocking writes that resolve
to env files, credentials, or SSH keys) is kept.
## Code Changes
- File tools and background git no longer run symlink-realpath gates or
repo-config probes; project-local `local.toml` loads without the trust
prompt again.
- The tower commit-identity test coverage stays.
## Impact Scope
- `packages/agent-core-v2` (read/glob/grep/edit/write/read-media tools,
path access, git protocol, workspace dirs, project-local config), CLI
docs untouched in this slice.
- Tests: write-guard, path-access, and tower suites updated; full suite
green locally.
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md)
document.
- [x] I have linked a related issue (external PRs: issue must have a
maintainer's `/approve`). — No public issue; maintainer work.
- [x] I have added tests that prove my feature works.
- [x] Ran `gen-changesets` skill, or this PR needs no changeset.
- [x] Ran `gen-docs` skill, or this PR needs no doc update.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Behavior Changes**
* Project-local configuration loads without a trust prompt, and
configured additional directories are loaded regardless of workspace
trust.
* File and Git operations no longer apply extra symlink-path checks or
repository-configuration probes. Writes targeting environment files,
credentials, and SSH keys remain blocked.
* **Bug Fixes**
* Git context collection continues through process execution and reports
timeouts and command failures while preserving available repository
information.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Test User <test@example.test>1 parent 5c5a205 commit b050d20
281 files changed
Lines changed: 2103 additions & 2606 deletions
File tree
- .changeset
- apps
- desktop
- pythinker-code
- dist-web
- assets
- src
- cli/v2
- feedback/codebase
- tui
- components/dialogs
- utils/git
- test
- tui
- components/dialogs
- utils/git
- vis/server/src/lib
- docs
- configuration
- customization
- packages
- agent-core-v2
- docs
- src
- agent
- interruptionReminder
- llmRequester
- permissionMode
- permissionPolicy/policies
- tools
- edit
- os
- glob
- grep
- read
- write
- read-media-file
- usage
- app
- agentProfileCatalog
- config
- git
- mcpRegistry
- features
- cron
- goal
- notify
- tower/protocol
- human
- llm-pythinker
- llm
- protocol
- requester/bases
- anthropic
- openai-responses
- openai
- test
- llm
- utils
- utils
- llm-adapter
- model
- provider
- program
- session
- agentLifecycle
- profile
- subagent
- tool
- workspace
- workspaceDirs
- workspaceTrust
- test
- agent
- fullCompaction
- loop
- media/tools
- permissionMode
- permissionPolicy
- app
- edit/tools
- git
- mcpManagement
- mcpRegistry
- workspaceAliases
- features
- cron
- dynamic_workflow
- notify
- plan
- tower
- llm-adapter
- model
- protocol
- os/backends/node-local/tools
- persistence/backends/node-fs
- session/agentLifecycle/profile
- tools/fixtures
- tool
- workspace
- workspaceAgentProfileLoader
- workspaceDirs
- workspaceFs
- workspaceTrust
- agent-gateway
- src/routes
- test
- node-sdk
- src
- test
- scripts/security
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments