Skip to content

Promote develop to main - #1051

Merged
ptr727 merged 1 commit into
mainfrom
develop
Aug 28, 2026
Merged

Promote develop to main#1051
ptr727 merged 1 commit into
mainfrom
develop

Conversation

@ptr727

@ptr727ptr727 commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Promotes develop to main.

Included

Summary by CodeRabbit

  • Bug Fixes
    • Improved reliability when resolving the comparison baseline by retrying failed checks with increasing delays.
    • Attempts to refresh the baseline before each retry and reports the existing error if all attempts fail.

## What
The prose-gate composite action's `git rev-parse --verify` check on the
diff base
(`github.event.pull_request.base.sha`) now retries with backoff
(0/2/4/8/15/30s,
re-fetching the ref before each retry) instead of failing on the first
miss.
## Why
Fixes#1049. That issue documents `ptr727/Financial-Modeling#194`'s Lint
sources
job failing four times in a row (two reruns, one fresh push) with:
```
::error::Diff base 'fcc57bfd9c...' does not resolve in this checkout.
::error::Check the ref name and that the job checks out with fetch-depth 0.
```
against a base SHA that was confirmed, both at failure time and
afterward, to be
`develop`'s genuine tip, a real ancestor of the PR branch, reachable by
`git ls-remote`, and covered by the caller's own `fetch-depth: 0`
unshallow fetch.
The base was a merge commit created by a squash-merge only hours (in
that case) to
minutes before the failing runs, which points at GitHub-side replication
lag on a
freshly created merge commit rather than a logic bug in the checkout or
the gate.
Retrying the resolve check, rather than failing on the first miss,
absorbs that lag
without weakening the check itself: an actually-absent or malformed base
still fails
after exhausting the retries, in well under the job's overall timeout.
## Verification
- `shellcheck -x` and manual review of the extracted composite-action
script (the
embedded script isn't covered by the repo's own `*.sh` gate, so this was
a
standalone check).
- `python3 scripts/repo_gate.py` clean.
- `python3 .github/actions/prose-gate/prose_lint.py --diff
origin/develop -- .` clean
against this change's own diff (dogfooding the gate this PR modifies).
- Pre-commit hooks passed on commit.
The GitHub-side replication-lag mechanism itself isn't independently
reproducible
from this session, so this is a mitigation for the symptom the issue
describes
rather than a proven root-cause fix; the retry is safe either way since
it only
widens the window before the existing failure mode fires.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved reliability when determining the comparison baseline.
* Added retry and refresh handling to reduce failures caused by
temporarily unavailable branch data.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Retry Prose Gate Base Resolution During GitHub Replication Lag

🐞 Bug fix⚙️ Configuration changes🕐 Less than 10 minutes

Grey Divider

AI Description

• Retries unresolved prose-gate diff bases with bounded backoff.
• Refetches fresh base commits to absorb GitHub replication lag.
• Preserves hard failure after all resolution attempts are exhausted.
Diagram

graph TD
A["Prose gate"] --> B{"Base resolves?"} -- Yes --> F["Prose scan"]
B -- No --> E{"Retries left?"} -- Yes --> C["Backoff delay"] --> D["Origin fetch"] --> B
E -- No --> G["Gate error"]
Loading
High-Level Assessment

The bounded retry-and-refetch approach is appropriate because it absorbs transient replication lag while continuing to verify the exact base SHA. Fetching a branch tip or weakening the check could scan against the wrong commit, while API-based polling would add complexity without improving the final Git-object verification.

Files changed (1) +13 / -1

Bug fix (1) +13 / -1
action.ymlRetry transiently unavailable diff-base commits+13/-1

Retry transiently unavailable diff-base commits

• Replaces the single diff-base resolution check with bounded retries using 0/2/4/8/15/30-second delays. Each delayed retry refetches the exact base SHA, while exhausted attempts preserve the existing error and nonzero exit.

.github/actions/prose-gate/action.yml

@coderabbitai

coderabbitaiBot commented Aug 28, 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: ddf5089d-c2a8-4c1b-a48e-419d772fa8c0

📥 Commits

Reviewing files that changed from the base of the PR and between f502dcd and d689a93.

📒 Files selected for processing (1)
  • .github/actions/prose-gate/action.yml

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


📝 Walkthrough

Walkthrough

The prose-gate action now retries diff base resolution with increasing delays. It fetches the base ref from origin between attempts and retains the existing failure path when resolution remains unsuccessful.

Changes

Prose-gate diff base resolution

Layer / File(s)Summary
Retry diff base resolution
.github/actions/prose-gate/action.yml
The action checks the base commit after 0, 2, 4, 8, 15, and 30 seconds. It fetches origin/$BASE before subsequent checks and reports the existing error if all checks fail.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk:⚪ Minimal · up to d689a

This PR promotes the reviewed develop branch to main with no actionable merge-blocking risk remaining beyond normal checks and review.

🚥 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 primary change: promoting the develop branch to main.
Linked Issues check✅ PassedThe changes implement issue #1049 by retrying diff-base resolution with increasing delays and refetching from origin, while preserving failure after all retries are exhausted.
Out of Scope Changes check✅ PassedThe retry and refetch changes directly support the linked issue and stated promotion objective. No unrelated changes are present.
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…
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 develop

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 reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@ptr727
ptr727 merged commit d92c0f4 into mainAug 28, 2026
8 checks passed
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.

Lint sources job: prose-gate diff base intermittently fails to resolve a freshly-merged branch tip

1 participant

@ptr727