fix(tools): guard concurrent gitignore and screenshot caches#713
Conversation
|
@infer Can you review this? |
Todos
✅ Infer Result: SuccessSummaryThe PR #713 changes are already fully implemented in commit Changes Implemented (3 files, +67/-1)1.
This mirrors the same pattern the 2.
3.
Validation Results
PR Status
The PR is complete and ready for review. The only remaining action is for a maintainer to approve and merge it. Model: Tokens: 954,610 in · 3,915 out · 958,525 total (20 requests) Tool calls: 26 total · 85% success rate
|
## [0.127.0](v0.126.0...v0.127.0) (2026-07-02) ### 🚀 Features * **plan:** compact context and start a fresh session when a plan is approved ([#705](#705)) ([28ddba7](28ddba7)) * **memory:** configurable git sync backend ([#707](#707)) ([6a68c3d](6a68c3d)), closes [#670](#670) [#670](#670) * **history:** each subagent gets its own history file ([#711](#711)) ([16c8fa1](16c8fa1)), closes [#699](#699) ### 🐛 Bug Fixes * **plan:** accepting a plan switches to auto-accept mode by default ([#714](#714)) ([7b0befc](7b0befc)), closes [#710](#710) * **tools:** guard concurrent gitignore and screenshot caches ([#713](#713)) ([0ff4276](0ff4276)), closes [#712](#712) * **tools:** guard Registry.tools with RWMutex against concurrent MCP registration ([#709](#709)) ([8a70871](8a70871)), closes [#708](#708) * **ui:** update dim color from [#565f89](https://github.com/inference-gateway/cli/issues/565f89) to [#7a7f9a](https://github.com/inference-gateway/cli/issues/7a7f9a) for improved contrast ([#706](#706)) ([b2ee67e](b2ee67e)) ### 🔧 Build System * **deps:** bump github.com/go-telegram/bot from 1.21.0 to 1.22.0 in the gomod group ([#703](#703)) ([3de5136](3de5136)) * **deps:** bump the github-actions group with 5 updates ([#704](#704)) ([80221f7](80221f7))
|
🎉 This PR is included in version 0.127.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The Tree tool's gitignoreCache map was read and written without synchronization in getOrLoadDirGitignore. Tools run concurrently within a turn (up to MaxConcurrentTools), so two Tree executions could touch the map at once and trigger a fatal "concurrent map read and map write", killing the infer process. This mirrors the RWMutex + double-checked lock the Grep tool already uses.
Also guards GetLatestScreenshotTool.lastCallTime (read/write in Execute) with a sync.Mutex, as the issue requested, since it is the same singleton plus concurrent-goroutine class.
Validation:
Fixes #712