Skip to content

feat: record interim pull request cycle time - #61

Merged
tbhb-agent merged 1 commit into
mainfrom
gm-cycle-time
Nov 16, 2026
Merged

tbhb-agent merged 1 commit into
mainfrom
gm-cycle-time

Conversation

@tbhb-agent

Copy link
Copy Markdown
Collaborator

Why

The service counts events and doesn't report cycle time. A pull request histogram gives the time from start to merge or close.

Behavior change

A closed pull request delivery records the github.pr.cycle_time histogram in seconds, with the attributes repository, state (merged or closed) and start_source. The start is the earliest started_at on the Generated-by and Assisted-by lines of the pull request body, else the creation time. The label reads started_at or pr_created. The earliest commit time needs the REST commits call, which a later change adds, so pr_created values read low until then. The recorder skips a delivery with a missing or unparsable time, or an end before the start.

Verification

bazelisk test //... passes, and the recorder tests cover merged, closed, started_at, creation time, and invalid input. The build also ran on the receiver host, which shows a restart count of zero.

Opened-by: LLM effort=medium;harness=claude-code:2.1.325;model=anthropic:claude-sonnet-5-5;session=sha-256-64:6507fa80a17e0653;surface=cli
Generated-by: LLM effort=high;harness=codex:0.164.0;model=openai:gpt-6.1-sol;session=sha-256-64:bc9ef605ee95f58e;surface=exec
Assisted-by: LLM effort=medium;harness=claude-code:2.1.325;model=anthropic:claude-sonnet-5-5;session=sha-256-64:6507fa80a17e0653;surface=cli

Tech debt: use the earliest commit time through the REST commits call in a later change; interim pr_created values read low.

Generated-by: LLM effort=high;harness=codex:0.164.0;model=openai:gpt-6.1-sol;session=sha-256-64:bc9ef605ee95f58e;surface=exec
@tbhb-agent
tbhb-agent merged commit 3cfed2c into main Nov 16, 2026
8 checks passed
@tbhb-agent
tbhb-agent deleted the gm-cycle-time branch November 16, 2026 02:50
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