Repository navigation
feat(reconcile): add the daily sweep - #102
Merged
Merged
Conversation
Generated-by: LLM effort=high;harness=codex:0.166.0;model=openai:gpt-6.2-sol;session=sha-256-64:579cfd52b6bed757;surface=exec
tbhb-agent
added a commit
that referenced
this pull request
Nov 24, 2026
Why The reconciler design still said every run gets a 14-minute deadline and that issue event reads use incremental priority. The sweep from #102 uses a 45-minute deadline and sweep priority, so the spec contradicted the code. Behavior change None. The change edits the run bound line and the event read line of the design doc. Decisions An incremental run keeps the 14-minute bound and a sweep gets 45 minutes. The code keeps both bounds. The event read line now says the reads use the priority of the walk. Deviations from the task The task said to change 14 minutes to 45. That would have made the incremental bound wrong. The line states both bounds. Needs human judgment None. Risk Documentation only. Verification Both lines match `internal/reconcile/loop.go` and `internal/reconcile/run.go` on main. One review run returned GO with no blocking finding. The reviewer logged one tech-debt note: the "4 runs an hour" estimate in the spec doesn't mention that a sweep replaces up to 3 incremental runs in the 03:00 `UTC` hour. Human steering The brief limits the change to the two lines. Generated-by: LLM effort=high;harness=codex:0.166.0;model=openai:gpt-6.1-sol;session=sha-256-64:f601d2eb64f1f823;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
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
A missed webhook can leave a gap after the incremental watermark moves past the pull request. The daily sweep revisits recent activity and repairs counts the incremental pass missed.
Behavior change
The sweep becomes due at 03:00
UTCand takes the next free pass slot. It clears each repository's first-page tag and walks back 24 hours with a 200-page cap. Pull request and issue event reads use sweep priority. The existing metrics and pass log reportkind=sweep. The loop still stops after three consecutive pass errors of either kind.Decisions
The sweep gets 45 minutes to give deeper walks time under the shared request budget. The existing ticker sets the cadence for both kinds of pass. When the loop starts after 03:00
UTC, the first sweep comes due the next day.Deviations from the task
The sweep follows the repair rules in section 6 of the reconciler design.
Needs human judgment
Review whether the 45-minute limit gives the sweep enough time on days with many pull request updates.
Risk
A long sweep can delay incremental repairs for a few ticks. The shared request budget still gives webhook traffic first priority.
Verification
The tests cover the daily schedule, the full repair window, first-page tag clearing, sweep priority, pass metrics, and logs. They also check that a failed sweep counts toward the stop after three errors.
bazelisk test //...reported 33 passes and one skip. The deploy test andbazelisk test //:golangci_lint_testpassed. The committed diff adds 238 code lines against a limit of 400.Human steering
The brief fixes the sweep hour and leaves the operator setting for a later decision.
Assisted-by: LLM effort=medium;harness=claude-code:2.1.330;model=anthropic:claude-sonnet-5-5;session=sha-256-64:6507fa80a17e0653;surface=cli