Skip to content

fix(ci): repair upstream sync PR workflow#279

Merged
Just-Insane merged 5 commits into
integrationfrom
codex/fix-upstream-sync-workflow
Jun 22, 2026
Merged

fix(ci): repair upstream sync PR workflow#279
Just-Insane merged 5 commits into
integrationfrom
codex/fix-upstream-sync-workflow

Conversation

@Just-Insane

Copy link
Copy Markdown
Collaborator

Description

Repair the upstream sync PR workflow so scheduled and manual sync runs do not fail when origin and upstream publish different objects under the same release tag names.

The workflow now:

  • fetches upstream branches into refs/remotes/upstream/*
  • fetches upstream tags into refs/tags/upstream/* instead of clobbering local tags
  • resolves UPSTREAM_REF against upstream branches first, upstream namespaced tags second, and raw commit-ish values last

This preserves the existing integration-trunk sync flow while allowing upstream tag-based syncs and normal scheduled dev syncs to complete.

Changeset: fix: isolate upstream sync tag fetches

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Validation:

  • pnpm lint
  • pnpm fmt:check
  • pnpm typecheck
  • pnpm knip
  • pnpm build

Notes:

  • Verified the original failure from scheduled run 27952603603 on June 22, 2026: git fetch --tags upstream failed because upstream v1.18.0, v1.18.1, and v1.18.3 would clobber tags already fetched from origin.
  • pnpm test:run still fails on the current origin/integration baseline with a pre-existing unhandled rejection in src/app/hooks/timeline/useTimelineSync.ts (TypeError: mx.getRoom is not a function from useTimelineSync.test.tsx). This PR does not touch that area.

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

AI assistance was used to diagnose the tag-clobber failure in the GitHub Actions logs, update the workflow fetch/ref-resolution logic, and verify the fix against fresh local fetches and the standard repo gate.

Comment thread .github/workflows/upstream-sync-pr.yml Outdated
@github-code-quality

github-code-quality Bot commented Jun 22, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: JavaScript

JavaScript / code-coverage/vitest

The overall coverage remains at 26%, unchanged from the branch.


Updated June 22, 2026 15:06 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@Just-Insane Just-Insane enabled auto-merge June 22, 2026 14:50

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 187cdc971a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/upstream-sync-pr.yml Outdated
@Just-Insane Just-Insane merged commit fbc319f into integration Jun 22, 2026
15 checks passed
@Just-Insane Just-Insane deleted the codex/fix-upstream-sync-workflow branch June 22, 2026 15:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 22b83f79fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +79 to +80
upstream_branch_ref="${UPSTREAM_REF#refs/heads/}"
upstream_tag_ref="${UPSTREAM_REF#refs/tags/}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reuse the normalized dev ref for mirror updates

When a manual run uses the now-supported full branch ref refs/heads/dev, this normalization resolves the upstream commit correctly, but the later mirror update still checks the raw UPSTREAM_REF against dev. With the default update_dev_mirror=true, that run creates the sync PR without force-updating origin/dev, even though the workflow input describes this option as updating the dev mirror when syncing upstream dev. Use the normalized branch name in that condition so both dev and refs/heads/dev take the mirror path.

Useful? React with 👍 / 👎.

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.

1 participant