Skip to content

Read the Fetched Hub Ref for the Exemption-Commit Lookup - #999

Merged
ptr727 merged 1 commit into
developfrom
fix-resync-origin-main-ref
Aug 25, 2026
Merged

Read the Fetched Hub Ref for the Exemption-Commit Lookup#999
ptr727 merged 1 commit into
developfrom
fix-resync-origin-main-ref

Conversation

@ptr727

@ptr727ptr727 commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Follow-up to #995 (fixing #987): the promotion PR's CodeRabbit review caught a real bug in the new RESYNC.md procedure step. git log main -1 ... reads local main, which a bare git fetch does not fast-forward, so the exemption-commit lookup could read a stale answer on a reused hub checkout. Reads origin/main instead, the ref a fetch actually updates.

Summary by CodeRabbit

  • Documentation
    • Updated deletion guidance to use the latest fetched main branch when checking workflow exemptions.
    • Clarified handling for bare fetches that do not update the local main branch.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Read the Fetched Hub Ref for Exemption-Commit Lookup

🐞 Bug fix📝 Documentation🕐 Less than 5 minutes

Grey Divider

AI Description

• Query origin/main when locating the fetched dead-path exemption commit.
• Prevent stale local main from producing incorrect pin ancestry decisions.
Diagram

graph TD
A["Fetch hub"] --> B["origin/main"] --> C["Find exemption"] --> D{"Pin includes commit?"}
D -->|Yes| E["Retire local path"]
D -->|No| F["Bump workflow pin"] --> E
Loading
High-Level Assessment

Using origin/main is the appropriate fix because it is the named remote-tracking ref updated by the documented fetch. Local main can remain stale, while alternatives such as FETCH_HEAD are less explicit and can depend on fetch shape.

Files changed (1) +1 / -1

Bug fix (1) +1 / -1
RESYNC.mdUse fetched remote ref for exemption lookup+1/-1

Use fetched remote ref for exemption lookup

• Changes the exemption-commit lookup from local 'main' to 'origin/main'. The guidance now explains that a bare fetch updates the remote-tracking ref without fast-forwarding the local branch, preventing stale ancestry checks in reused hub checkouts.

RESYNC.md

@coderabbitai

coderabbitaiBot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8dc0a912-a21b-4d6c-8989-e0311185f4cd

📥 Commits

Reviewing files that changed from the base of the PR and between 4f1e005 and e0ce0c7.

📒 Files selected for processing (1)
  • RESYNC.md

Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The deletion guidance now retrieves the HUB_HOSTED exemption commit from fetched origin/main history. This prevents stale local main references when bare fetches do not update local branches.

Changes

Deletion preflight

Layer / File(s)Summary
Use fetched remote history
RESYNC.md
The deletion preflight uses git log origin/main to find the dead-path exemption commit. The ancestry comparison and pin-update requirement remain unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk:⚪ Minimal · up to e0ce0

This localized documentation change makes the exemption-commit lookup use the ref updated by fetch, avoiding stale results on reused checkouts. No actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly describes the main change: using the fetched Hub ref for the exemption-commit lookup instead of the local main ref.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-resync-origin-main-ref

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0)📘 Rule violations (0)📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can hide the parts of a finding you never read, like the evidence or the agent prompt

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@ptr727
ptr727 merged commit a6461d9 into developAug 25, 2026
8 checks passed
@ptr727
ptr727 deleted the fix-resync-origin-main-ref branch August 25, 2026 15:44
Sign up for freeto 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

@ptr727