diff --git a/.github/maintenance/content.sh b/.github/maintenance/content.sh index e76c59a..1db5a2f 100644 --- a/.github/maintenance/content.sh +++ b/.github/maintenance/content.sh @@ -41,7 +41,7 @@ case "$mode" in fi } > "$RUNNER_TEMP/content-prompt.txt" python "$helper/maintenance.py" snapshot "$RUNNER_TEMP/content-snapshot.json" README.md - 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 + 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 python "$helper/maintenance.py" verify "$RUNNER_TEMP/content-snapshot.json" if git diff --quiet HEAD; then echo 'AI documentation review completed without a proposed change' >> "$GITHUB_STEP_SUMMARY" diff --git a/.github/maintenance/test_content.py b/.github/maintenance/test_content.py index 7277af5..5a6a4e6 100644 --- a/.github/maintenance/test_content.py +++ b/.github/maintenance/test_content.py @@ -55,6 +55,12 @@ def test_markdown_local_links_and_title(self): finally: os.chdir(previous) + def test_documentation_agent_does_not_create_a_repository_map_cache(self): + script = Path(__file__).with_name('content.sh').read_text() + agent_command = next(line for line in script.splitlines() if ' agent aider ' in line) + self.assertIn('--map-tokens 0', agent_command) + self.assertIn('--no-suggest-shell-commands', agent_command) + def test_default_branch_pushes_cannot_invoke_ai(self): workflow = Path(__file__).parents[1] / 'workflows/daily-ai-maintenance.yml' data = c.guard.yaml.load(workflow.read_text(), Loader=c.guard.WorkflowLoader)