Skip to content

feat(preflight): detect stale contributor forks - #272

Merged
morluto merged 1 commit into
mainfrom
agent/fork-freshness-preflight
Aug 5, 2026
Merged

feat(preflight): detect stale contributor forks#272
morluto merged 1 commit into
mainfrom
agent/fork-freshness-preflight

Conversation

@morluto

@morluto morluto commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Fixes #271.

Problem

workflow.preflight_contribution could not determine whether a contributor fork's default branch was stale or diverged from upstream, so publishing through that fork could carry unrelated history into the contribution path.

Change

  • Add optional fork context, inferred from an unambiguous workspace remote or an existing pull request when available.
  • Read upstream and fork metadata and default-branch tips, verify the fork parent, and compare cross-fork refs through GitHub.
  • Return current, behind, diverged, or unavailable with branch SHAs, merge-base evidence, effective-diff risk, and a recovery action.
  • Preserve the read-only boundary: no local fetch, fork sync, force-push, or GitHub mutation.
  • Document the contract and add adapter and preflight regression coverage.

Validation

  • make verify — passed

@morluto
morluto marked this pull request as ready for review August 5, 2026 09:19
@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@morluto
morluto merged commit b7adb53 into main Aug 5, 2026
13 checks passed
@morluto
morluto deleted the agent/fork-freshness-preflight branch August 5, 2026 09:19
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.

[Feature] Detect stale forks before publishing contribution branches

1 participant