Skip to content

πŸ› fix: persist attributed closed PRs so 30d windows cover 30 days - #19368

Closed
hanthor wants to merge 1 commit into
v6from
fix/19365-pr-models-history
Closed

hanthor wants to merge 1 commit into
v6from
fix/19365-pr-models-history

Conversation

@hanthor

@hanthor hanthor commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Fixes #19365

What

  • New durable store (attributed-pr-store.json, src/pkg/github/attributed_pr_store.go) holding the parsed attribution/outcome fields of closed attributed PRs (no bodies). Each closed-PR scan upserts into it and returns fresh βˆͺ stored records, so PRs that age out of the 14-day live scan stay in the 30d/all windows and survive restarts.
  • One-time backfill to 30 days (HIVE_ATTRIBUTED_PR_BACKFILL, off to skip): at most 5 extra listing pages per repo per tick, resumable via a stored page cursor; a listing error pauses it and never fails enumeration. After it finishes the per-tick call count is the original head scan only.
  • coverage now derives from the store's reach (AttributedClosedPRCoverage), so closed_prs_partial is false for a window inside it. All-time stays partial.
  • A stored closed record for a PR that is open again is dropped in favour of the open one; if the scan fails with a cold cache, stored records are used.

Tests

Added store persistence, paged/resumable backfill and steady-state call count tests, plus a dashboard 30d test (3/16/29-day-old records, coverage). A package TestMain sets the backfill off so existing tests that pin exact listing calls are unchanged; NewClientForTest uses a per-client temp store. Not run locally per AGENTS.md (gofmt -l clean); CI is the verdict.

-- hive: backend=claude model=claude-sonnet-5-5

πŸ€– Generated with Claude Code


🐝 Hive Agent: contributor | SHA: 0823fe88d

The closed-PR attribution scan only lists PRs updated in the last 14 days
and keeps them in memory, so the PRs-by-model and effective-models 30d/all
windows ranked models over different spans. Keep attributed closed PR
records in a durable store, backfill it once (paged, bounded per tick), and
report coverage from the store's reach.

Hive-Run: #19365
Hive-Plan: persist attributed closed PRs
Hive-Spec: pr-models-closed-history#store

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: hanthor <hanthor@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 20, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 20, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

@hanthor this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the branch conflicts with the base and needs a rebase

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (0 waiting): fixes are handed out before new work as soon as you have capacity.

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

βœ… Resolved: no conflicting open PRs or same-file overlaps remain against v6.

@github-actions github-actions Bot added conflicts-with-open-pr Open PR has a merge conflict with another open PR and removed conflicts-with-open-pr Open PR has a merge conflict with another open PR labels Nov 20, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 20, 2026
@Danathar

Copy link
Copy Markdown
Contributor

Closing as a duplicate: #19371 (#19371) fixed #19365 the same way and merged into v6 at 2d427cb, so this branch now conflicts with it. Thanks for the parallel work. If something here isn't covered by #19371 (the off switch for the backfill, say), a small follow-up on top of v6 would be welcome.

@Danathar Danathar closed this Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

πŸ› [v6] PRs by model: closed PRs older than 14 days drop out, so 30d/all windows rank models on different spans

2 participants