Repository navigation
fix(agents): scrub home paths from recorded fixtures - #217
Open
Shruti070107 wants to merge 4 commits into
Open
Shruti070107 wants to merge 4 commits into
Shruti070107 wants to merge 4 commits into
Conversation
The recorder now replaces the operator's home directory with ~ in raw, JSON-escaped, and nested-JSONL forms before writing and before the credential check. Rewrite the four Copilot 1.0.117 recordings so public fixtures no longer contain the recording machine's username.
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.
Follow-up to the merge comment on #214: keep the recording machine's home directory out of public fixtures.
What changed
scripts/record_agent.pynow replacesPath.home()with~before writing the fixture and before the credential check. It covers raw Windows paths, JSON-escaped paths, the POSIX spellings Copilot prints (/Users/<name>,/home/<name>), and the twice-escaped form that appears inside the JSONL stored instdout/stderr.1.0.117recordings so they no longer containC:\Users\<name>or/Users/<name>.tests/test_agents/test_record_agent.pywith scrubber unit tests and a regression check that all four fixtures stay free of home paths.This is only the first follow-up. PR #207 can still be re-recorded with this shared recorder separately; I did not touch that branch here.
Verification
python -m pytest -q tests/test_agents/test_record_agent.py tests/test_agents/test_copilot.py tests/test_agents/test_copilot_recordings.py→ 20 passed.python -m ruff check .→ clean.git diff --check→ clean.