Repository navigation
fix(doc-keeper): checkout branch before agent + gitignore report - #190
Merged
Merged
Conversation
Two fixes for scripts/doc-keeper-sweep.sh: 1. Checkout the work branch BEFORE the agent runs (not after). Previously, if the agent was killed mid-run (timeout, Ctrl-C, OOM), partial changes landed on main's working tree — exactly what happened during the dry-run test that produced PR #189's snapshot. Branching first isolates agent edits to a throwaway branch even when the script is interrupted. 2. Add .doc-keeper-report.md to .gitignore. The report is a per-run artifact regenerated each sweep; not source. Without the ignore entry, accidental commits were possible. Refs: - #189 (snapshot branch — doc-keeper dry-run findings, for review)
This was referenced Jul 19, 2026
EVWorth
added a commit
that referenced
this pull request
Jul 19, 2026
Refreshes README.md against actual code state: - Test counts: 1465 → 1488+ (matches vitest run output) - Rust integration tests: 36 → 45 (matches cargo test count) - Component count: 36 → 46 (matches actual src/components/*.tsx files) - Added ai/ and querybuilder/ to component tree (real subdirs) - Removed mas-sqlite/tests/ line (mas-sqlite is for local SQLite storage, not MySQL integration tests) - Removed DEVELOPMENT_PLAN.md from docs/design/ tree (file was deleted in #184) Found by doc-keeper agent on 2026-07-19. NOTE: A separate PR (#190) bumps React 18 → React 19 in the same file. If both merge, dprint will keep both edits; no conflict expected.
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.
Summary
Two fixes for
scripts/doc-keeper-sweep.sh:.doc-keeper-report.mdto.gitignore. Per-run artifact, regenerated each sweep, never source.Why
Fix 1 — branch before agent
During the dry-run test for PR #189, the script was killed by a shell timeout mid-agent-run. The agent's partial edits had been written to the working tree on main (because the original script only did
git checkout -bAFTER the agent returned). Result: had to manually stash the changes and createdocs/doc-keeper-snapshot-2026-07-19branch to recover them.New flow:
Fix 2 — gitignore
The
.doc-keeper-report.mdfile is written by the agent each sweep. It contains the audit trail (drift findings, fixes applied, files touched). It belongs in the PR (asgit add .will pick it up before commit) but should NOT be committed tomaindirectly. Adding to.gitignoreis belt-and-suspenders against accidental commits.Diff
No code changes outside the script and gitignore. Bash syntax verified.
Test Plan
bash -n scripts/doc-keeper-sweep.sh— syntax OKbash scripts/doc-keeper-sweep.sh --help— usage prints correctly.doc-keeper-report.mdis now ignored bygit statusRelated
🤖 Self-driving fix for self-driving script. Meta.