{{ message }}
Repository navigation
fix(files): keep file-read observations within their conversation - #3810
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

File staleness observations are currently shared by path across the entire process. If conversation A reads a file, an outside edit changes it, and conversation B reads/writes the new version, B refreshes A's recorded observation. A can then write from its old view without the existing warning. Conversely, an unread conversation can receive a warning based on another conversation's read.
Scope each remembered observation to the ambient Agent/user/session identity and resolved file path. Preserve the same bounded global LRU, realpath handling and informational warning behavior. Exclude run id so an observation remains valid across turns in the same conversation; a fresh read/write still refreshes that conversation's own view.
Validation: real public Read/Edit/Write operations, real files and explicit native mtimes reproduce nine failures on unchanged upstream, with two controls passing. The final 74-test file-tool suite passes, including previous backward-time restore, atomic edit/write, concurrent edit and memory-notification controls. Tests cover another conversation or Agent reading/writing, unread-conversation false warnings, same-conversation rereads and cross-turn observations. Both changed files pass Ruff, the new test passes Black and diff checks pass. Production ChatChannel uses RuntimeIdentity(agent_id, session_id) around message handling. No model/provider, account or external-system operations; no full app/browser run. This keeps warnings advisory and does not introduce write blocking or cross-process coordination. Rollback is a single commit revert.