Skip to content

fix: resolve known-good versions to verified commits - #111

Merged
AlexanderLanin merged 5 commits into
mainfrom
fix/resolve-lazy-known-good-pin
Sep 30, 2026
Merged

AlexanderLanin merged 5 commits into
mainfrom
fix/resolve-lazy-known-good-pin

Conversation

@AlexanderLanin

@AlexanderLanin AlexanderLanin commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

What this makes possible

The scheduled repository overview and Pages refresh can complete even when a Bazel module version in known_good.json does not directly match a GitHub ref. The overview can still compare the pinned module version with the repository's main branch whenever GitHub can resolve that version to a commit.

Why this matters

A single unresolved version currently aborts collection for the whole organization. That leaves the generated profile and repository metrics out of date until a later run succeeds.

Changes

  • Verify each version candidate with GitHub before using it in a comparison.
  • Try the v-prefixed form when the unprefixed version cannot be resolved.
  • Add regression coverage for this fallback.

a-zw
a-zw previously requested changes Sep 30, 2026
Comment thread tests/test_repo_overview.py Outdated
Comment thread src/generate_repo_overview/collector/reference_integration.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation safely handles unresolved refs and the regression test covers the intended fallback behavior.

Review effort: Balanced
Findings: None

What changed in this PR

This PR makes known-good version resolution resilient by verifying GitHub refs before comparison and falling back to v-prefixed tags.

Changes:

  • Force completion of lazy PyGithub commits to validate refs.
  • Retry unresolved versions with a v prefix.
  • Add regression coverage for fallback resolution.
File Description
src/​generate_repo_overview/​collector/​reference_integration.py Verifies version refs and returns the resolved commit SHA.
tests/​test_repo_overview.py Tests rejection of a plain version and successful prefixed-tag fallback.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@AlexanderLanin
AlexanderLanin dismissed a-zw’s stale review September 30, 2026 12:41

not critical tool, merging as-is

@AlexanderLanin
AlexanderLanin merged commit defe348 into main Sep 30, 2026
6 checks passed
@AlexanderLanin
AlexanderLanin deleted the fix/resolve-lazy-known-good-pin branch September 30, 2026 12:41
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.

4 participants