Skip to content

fix(reconcile): keep ticking after a failed pass - #94

Merged
tbhb-agent merged 1 commit into
mainfrom
agent/gm-rec-h0-codex
Nov 23, 2026
Merged

tbhb-agent merged 1 commit into
mainfrom
agent/gm-rec-h0-codex

Conversation

@tbhb-agent

Copy link
Copy Markdown
Collaborator

Why

The scheduler in internal/reconcile stopped permanently on the first pass error. A watermark write that failed once ended all later passes. The reconciler design also says an events-read give-up ends the pass, but the code kept walking later repositories. This change closes those gaps, and adds tests for three paths the earlier pull requests left untested.

Behavior change

  • A pass error logs at error level without the error text and counts as partial, then the loop keeps ticking.
  • After three consecutive pass errors, Start returns the last error, so the service stops and the restart policy brings it back. A successful pass resets the count.
  • An events-read give-up now ends the pass, the same as a walk give-up.
  • A failed watermark write clears the first-page tag.

Decisions

  • The limit of three is the named constant maxConsecutivePassErrors. The task left the number open.
  • The design table in section 8 and the log paragraph in section 9 now describe this behavior.

Deviations from the task

None.

Needs human judgment

  • Whether three consecutive errors is the right limit for the service.
  • The events gate for items that would skip a milestone is undecided and outside this change.

Risk

Tier 1. The change edits the loop and the run, with no credentials or token source involved, and no running service changes because the service doesn't call the loop yet.

Verification

  • bazelisk test //internal/reconcile/... passes in a clean worktree.
  • pr_size reports 279 of 400 code lines.

Human steering

None so far.

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:75739c9e7ef6277a;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

Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.2-sol;session=sha-256-64:75739c9e7ef6277a;surface=exec
@tbhb-agent
tbhb-agent merged commit fb6f8f9 into main Nov 23, 2026
8 checks passed
@tbhb-agent
tbhb-agent deleted the agent/gm-rec-h0-codex branch November 23, 2026 15:43
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