Skip to content

Clear the log once its fix is merged - #244

Merged
danielehrhardt merged 1 commit into
mainfrom
fix/clear-logs-after-autofix
Oct 25, 2026
Merged

danielehrhardt merged 1 commit into
mainfrom
fix/clear-logs-after-autofix

Conversation

@danielehrhardt

Copy link
Copy Markdown
Contributor

What

When a "Fix in code" ticket (Settings → Logs, a runner's card, or the nightly self-repair check) gets its pull request merged, Godmode now empties the log the ticket came from. Before, those entries stayed in the log, so the next "Fix in code" picked up the same problems again and they were fixed twice.

How

  • Migration 104 self_repair_tickets: which log (this computer or a runner) each fix ticket was filed from, and when it was cleared.
  • clearFixedLogs() in diagnostics/selfRepair.ts clears the logs of tickets whose PR is merged: clearLogs() locally, DELETE /api/logs over the link for a runner (clearRunnerLog).
  • Runs on every pr_merged task event (auto-merge, approve, and the PR watcher all record it), once at start (catches merges while Godmode was off), and before a log is read for a new ticket (catches a runner that was offline when its fix was merged).
  • Each ticket clears its log once only. Problems logged after that stay for the next fix.

Tests

  • New test in test/self-repair.test.ts: the log stays while the PR is open, is emptied once it's merged, and isn't cleared a second time.
  • self-repair, tasks, subtasks, human-tasks: 117 pass.

@danielehrhardt
danielehrhardt merged commit 63b7cb3 into main Oct 25, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant