Repository navigation
✨ feat(evidence): record merge.opened_at so time to merge is measurable - #12465
Conversation
Live merges and hivectl evidence backfill stamp the PR's GitHub creation time on the merge event; pkg/evidence adds Bundle.TimeToMerge and MedianTimeToMerge for the ACMM level x median time-to-merge view. Refs #12062 Signed-off-by: scanner <scanner@hive.kubestellar.io> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Refs #12062 (RFC tracker). This PR lands the time-to-merge capture that the ACMM level × median time-to-merge view needs. The remaining slices are tracked in child issues #12464 (ACMM × median TTM in the hub drill-down, built on this PR) and #12463 (per-axis criteria table). #12456 is with a human. #12369 (panel 7) is covered by #12415, and the revert rates by author kind are covered by #12428.
Base is
v5, notv6. CONTRIBUTING reservesv6for the #7563 dashboard-optional epic, and every PR in this evidence pipeline (#12241, #12322, #12385, #12415, #12428, …) targetsv5.Why
#12326 asks for ACMM level × median time-to-merge. #12428 deliberately left it out because bundles have no PR-open time.
created_aton a live bundle is when review started, not when the PR opened, so time to merge cannot be honestly derived from current evidence.What
evidence.MergeEventgains an optionalopened_at(omitzero). It is additive in schema v1 (schema/v1.json), so older bundles keep their hash.Validaterejectsopened_ataftermerge.at.review_evidence_merge.go) stamps it from the PR's GitHubcreated_at, which comes from the samePullRequests.Getcall it already makes. A clock-skewed value later than the merge is dropped.hivectl evidence backfillstamps it from the PR'screated_at.pkg/evidence/time_to_merge.go:Bundle.TimeToMerge()andMedianTimeToMerge(bundles). Bundles that cannot be measured are skipped, never counted as 0.File-overlap guard: no file touched by open PRs #12415, #12428, #12413, #12417 or #12421 is changed here. That is why the
src/docs/review-evidence.mdschema-table row is deferred to #12464, since #12428 edits that doc.Testing
go test is disabled on agent pods (hive#9845), so CI is the verdict. gofmt is clean, and
check-api-reference-citations.shreports 0 drift. New and extended tests:pkg/evidence/time_to_merge_test.go: TimeToMerge edge cases; median for odd and even counts, with unmeasured bundles skipped.pkg/evidence: Validate cases foropened_at(before, equal to and after the merge); the schema accepts a bundle withopened_atand rejects a malformed one.pkg/github/review_evidence_ttm_test.go: an end-to-end merge recordsopened_at; it is left unset when GitHub omits it or the value is skewed; the bundle stays valid and is resealed.hivectlbackfill: 🐛 governor: force-clear agents stuck in cancellation loop >5min #105 recordsopened_atand a time to merge of 24h.— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@clubanderson