Skip to content

Commit 18d5e13

Browse files
authored
fix: keep documentation agent caches outside protected checkouts (#7)
1 parent a6c32d3 commit 18d5e13

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎.github/maintenance/content.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ case "$mode" in
4141
fi
4242
} > "$RUNNER_TEMP/content-prompt.txt"
4343
python "$helper/maintenance.py" snapshot "$RUNNER_TEMP/content-snapshot.json" README.md
44-
python "$helper/maintenance.py" agent aider --yes --no-check-update --no-show-release-notes --no-gitignore --no-auto-commits --no-pretty --no-stream --chat-history-file "$RUNNER_TEMP/content-history.md" --input-history-file "$RUNNER_TEMP/content-input" --model gpt-4.1 --message-file "$RUNNER_TEMP/content-prompt.txt" README.md
44+
python "$helper/maintenance.py" agent aider --yes --no-check-update --no-show-release-notes --no-gitignore --no-auto-commits --map-tokens 0 --no-suggest-shell-commands --no-pretty --no-stream --chat-history-file "$RUNNER_TEMP/content-history.md" --input-history-file "$RUNNER_TEMP/content-input" --model gpt-4.1 --message-file "$RUNNER_TEMP/content-prompt.txt" README.md
4545
python "$helper/maintenance.py" verify "$RUNNER_TEMP/content-snapshot.json"
4646
if git diff --quiet HEAD; then
4747
echo 'AI documentation review completed without a proposed change' >> "$GITHUB_STEP_SUMMARY"

‎.github/maintenance/test_content.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ def test_markdown_local_links_and_title(self):
5555
finally:
5656
os.chdir(previous)
5757

58+
def test_documentation_agent_does_not_create_a_repository_map_cache(self):
59+
script = Path(__file__).with_name('content.sh').read_text()
60+
agent_command = next(line for line in script.splitlines() if ' agent aider ' in line)
61+
self.assertIn('--map-tokens 0', agent_command)
62+
self.assertIn('--no-suggest-shell-commands', agent_command)
63+
5864
def test_default_branch_pushes_cannot_invoke_ai(self):
5965
workflow = Path(__file__).parents[1] / 'workflows/daily-ai-maintenance.yml'
6066
data = c.guard.yaml.load(workflow.read_text(), Loader=c.guard.WorkflowLoader)

0 commit comments

Comments
 (0)