Skip to content

docs(ci): say why the overlay's ancestry tie goes to main - #4469

Merged
Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
docs/ci-overlay-tie-comment
Oct 1, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
docs/ci-overlay-tie-comment

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

This fixes the comment on the overlay's ancestry tie, which described the wrong reason for the tie. No behaviour changes.

The comment said a line fresh off main is the same as main. That holds only for the graph. cozystack-packages:main is built from main's tip, so once main moves past the cut, a stack on such a line gets newer images than the line. The comment now says so. It also says why the tie still goes to main: a branch forked from main before the cut ties the same way, and that case is far more common.

This follows up on a review note in #4460 and is stacked on it.

Screenshots

Downstream repositories

Release note

docs(ci): explain why the base-branch overlay sends an ancestry tie to main.

Summary by CodeRabbit

  • Documentation
    • Clarified how artifact selection works for stacked pull requests on release lines without line-specific commits, including why main is preferred in a tie and how that may affect image freshness.

The comment claimed a line fresh off main is the same as main, but the
cozystack-packages:main artifact is built from main's tip, not from
the cut commit. Once main moves past the cut, a stack on such a line
gets newer images than the line's, until the stack holds a commit of
the line's own.

State that limit, and why the tie still goes to main: a branch forked
from main before a cut ties the same way and is far more common.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: cozystack/cozystack/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 836d2665-58ea-4da3-a096-d2436862d013

📥 Commits

Reviewing files that changed from the base of the PR and between 6748014 and cce3387.

📒 Files selected for processing (1)
  • .github/workflows/pull-requests.yaml

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


📝 Walkthrough

Walkthrough

The workflow comment now explains that a release line with no commits of its own ties with main. A stack on that line uses the main artifact until the release line gains a commit.

Changes

Artifact selection

Layer / File(s) Summary
Document tie behavior
.github/workflows/pull-requests.yaml
The comment explains that a release line with no commits of its own ties with main, so its stack uses the main artifact. It notes that this can select newer images after main advances and states why ties favor main.

Priority: ⬇️ Low

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

Change: Other

Merge Risk: ⚪ Minimal · up to cce33

The workflow behavior is unchanged, and the updated comment accurately describes artifact selection for stacked bases. No concrete merge risk was identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the documentation change: it explains why an ancestry tie selects main.
Docstring Coverage ✅ Passed 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…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added size/S This PR changes 10-29 lines, ignoring generated files area/ci Issues or PRs related to CI workflows, GitHub Actions, automation kind/documentation Categorizes issue or PR as related to documentation labels Sep 24, 2026
Base automatically changed from fix/ci-stacked-pr-overlay-tag to main September 24, 2026 23:53

@IvanHunters IvanHunters left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict

LGTM

Comment-only change in .github/workflows/pull-requests.yaml; every claim it adds matches the tie-breaking script in the Pull base-branch packages tree step, and the new wording is more precise than the text it replaces.

Caveats

Verified against the step's own logic, not executed (no live CI run). The script seeds best from git rev-list --count origin/main..origin/$BASE_REF and switches to a line only on strict n < best, so a tie keeps ARTIFACT_REF=main: the new sentence "a tie goes to main" is exact. The replacement also tightens the old text: the line wins only once the stack itself contains a commit of the line's own (i.e. count(line..BASE_REF) < count(main..BASE_REF)), which is stricter and more correct than the previous "once the line has a commit of its own" (a line commit absent from the stack does not flip the count). The rationale for the default (a branch forked from main before the cut ties the same way, so tipping ties toward the line would misroute that common case) is consistent with the same count arithmetic.

@lexfrei
Aleksei Sviridkin (lexfrei) merged commit 4d7f9e4 into main Oct 1, 2026
48 checks passed
@lexfrei
Aleksei Sviridkin (lexfrei) deleted the docs/ci-overlay-tie-comment branch October 1, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Issues or PRs related to CI workflows, GitHub Actions, automation kind/documentation Categorizes issue or PR as related to documentation size/S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants