Skip to content

feat(reconcile): add the daily sweep - #102

Merged
tbhb-agent merged 1 commit into
mainfrom
agent/gm-h2-codex
Nov 24, 2026
Merged

tbhb-agent merged 1 commit into
mainfrom
agent/gm-h2-codex

Conversation

@tbhb-dev-agent-pull-requests

@tbhb-dev-agent-pull-requests tbhb-dev-agent-pull-requests Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

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 UTC and 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 report kind=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 and bazelisk test //:golangci_lint_test passed. 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

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
tbhb-agent merged commit 91bd906 into main Nov 24, 2026
8 checks passed
@tbhb-agent
tbhb-agent deleted the agent/gm-h2-codex branch November 24, 2026 10:12
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
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