Repository navigation
feat(reconcile): schedule incremental passes - #91
Merged
Merged
Conversation
Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.2-sol;session=sha-256-64:0041532240a38cf8;surface=exec
tbhb-agent
added a commit
that referenced
this pull request
Nov 23, 2026
Why Main failed its lint check at 5348ca7. #91 built a `RunResult` literal in its loop test. #92 then added five fields to that type. Each PR passed alone, and the merged result broke the `exhaustruct` lint rule at `internal/reconcile/loop_test.go:137`. Behavior change None. The change only lists the five new fields, each set to zero, in one test literal. Decisions The fields stay at zero, which matches what the test built before. The test reads only the merge counts and the result. Deviations from the task None. Needs human judgment None. Risk The change touches one test line and no production code. Verification `bazelisk test //:golangci_lint_test //internal/reconcile/...` passes both targets locally. Human steering None. Generated-by: LLM effort=medium;harness=claude-code:2.1.330;model=anthropic:claude-sonnet-5-5;session=sha-256-64:6507fa80a17e0653;started_at=2026-11-15T17:24:44Z;surface=cli
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.
Why
The reconciler pass from #90 has no caller. This change adds a loop that runs it at startup and every 15 minutes, with self-metrics and a log line per pass. It also adds the recorder test that debt row D-89a asked for.
Behavior change
reconcile.Loopruns one pass at startup and then on a 15-minute ticker. A busy pass drops ticks, so passes never overlap. Each pass gets a 14-minute deadline. An error from the pass function ends the loop and returns to the caller. Cancelling the context stops the loop after the running pass.Each pass records four metrics with no repository attribute: runs, duration, repairs, and last success time. It also writes one info log line with counts only.
A later change wires
Loopinto the service.Decisions
The loop takes a pass function and a clock that supplies the ticker, so tests control time and the loop doesn't depend on the signature of
Run.The repairs metric counts merges only. Ended counts arrive with the first-end read.
Deviations from the task
The task asked for a requests counter.
RunResulthas no field for a request error count, so this change leaves it out.Needs human judgment
None.
Risk
The change adds code that no binary calls, so it can't alter running behavior. The recorder test only adds coverage.
Verification
bazelisk test //...passes 33 tests, with one skipped. The lint target passes. The size check shows 368 of 400 code lines.Human steering
None.
Opened-by: LLM effort=medium;harness=claude-code:2.1.330;model=anthropic:claude-sonnet-5-5;session=sha-256-64:6507fa80a17e0653;surface=cli
Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.2-sol;session=sha-256-64:0041532240a38cf8;surface=exec
Assisted-by: LLM effort=medium;harness=claude-code:2.1.330;model=anthropic:claude-sonnet-5-5;session=sha-256-64:6507fa80a17e0653;surface=cli