Repository navigation
feat: record interim pull request cycle time - #61
Merged
Merged
Conversation
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
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
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_timehistogram in seconds, with the attributesrepository,state(merged or closed) andstart_source. The start is the earlieststarted_aton the Generated-by and Assisted-by lines of the pull request body, else the creation time. The label readsstarted_atorpr_created. The earliest commit time needs the REST commits call, which a later change adds, sopr_createdvalues 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