Conversation
…e, and add git baseline check before file writes Changes: - Change memory context system note from 'authoritative reference data' to 'informational background data (may be stale)' so the LLM treats recalled memory as potentially stale rather than ground truth - Update _INTERNAL_NOTE_RE regex to match both old and new phrasings - Add _check_git_baseline() to ShellFileOperations — warns before write_file when the git working tree has uncommitted changes, preventing mutations based on stale or inaccurate memory
|
BoardJames triage: I do not see a branch-local failure in the memory/file-operations change. All non-test checks are green (including build-arm64); the remaining blocker is the full |
outsourc-e
left a comment
There was a problem hiding this comment.
Local read-through only for now. The memory-context wording change looks directionally right, but this PR also changes write_file behavior globally by adding a git-baseline warning path, and there are no focused regression tests for that broader behavior in the branch. I would split this: (1) the memory prompt wording/regex cleanup, and (2) any write-safety/file-op behavior with explicit tests on the returned warning contract.
…e_file Adds TestGitBaselineCheck with 6 unit tests covering _check_git_baseline and the warning field in write_file result: - Git not available → None - Not in a git repo → None - Clean repo → None - Dirty repo → returns warning string with branch name - write_file result includes warning when dirty - write_file result omits warning when clean
What does this PR do?
Two interacting problems caused the agent to report false project status and mutate files based on stale memory:
Related Issue
Fixes #17164
Type of Change
Changes Made
How to Test