Skip to content

fix(recorder): apply the repair floor - #89

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

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

Conversation

@tbhb-dev-agent-pull-requests

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

Copy link
Copy Markdown

Why

The recorder could count a pull request twice if an older release recorded its first close without a claim. A repair or a merge after a reopen could then count that close again. See docs/design/reconciler-backfill.md section 5.

Behavior change

Startup reads and logs the saved repair floor before starting the worker. A floor read error stops startup. For repairs, a milestone that passes the age and store creation gates but falls at or before the floor returns pre_floor without an observation. Repairs claim ended in that case and leave merged unclaimed so a queued webhook can still count the merge. Webhook closes ignore the floor. A reopen claims ended only for a pull request created at or before the floor. A floor read error on a reopen lets the worker retry the delivery.

Decisions

The existing store sets a missing floor on its first read. Startup reads it even when telemetry export is disabled, so the floor is ready before the recorder sees a delivery.

Deviations from the task

The recorder treats section 5's reference to appendix A step 5 as the rule for too_old milestones. They receive a claim without an observation.

Needs human judgment

The design's upgrade paragraph describes repair reads of the floor. This change also reads it on reopen, as specified in the brief. The design can describe that reopen rule when the scheduler change merges.

Risk

The first startup with this wiring sets the cutover for stores that lack a saved floor. A pre-floor first close can lose its cycle time observation if a repair claims ended ahead of the worker handling the webhook.

Verification

The recorder tests cover repairs before, at, and after the floor, the two milestone times, webhook closes, both delivery orders for a post-floor reopen, and floor read errors. Startup tests check the structured log entry and a failed floor read.

bazelisk test //... reported 33 passes and one skip. bazelisk test //:golangci_lint_test passed. Formatting and Gazelle completed. The committed size is pr_size: code=180/400 raw=230/1500.

Human steering

The brief split the recorder and startup changes from scheduler work and asked for a cutover guard on reopen deliveries.

Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.2-sol;session=sha-256-64:1ef5234db0cc02f4;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:1ef5234db0cc02f4;surface=exec
@tbhb-agent tbhb-agent changed the title Apply the repair floor in the recorder fix(recorder): apply the repair floor Nov 23, 2026
@tbhb-agent
tbhb-agent merged commit 726fbfb into main Nov 23, 2026
8 checks passed
@tbhb-agent
tbhb-agent deleted the agent/gm-rec-f1-codex branch November 23, 2026 10:13
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