Skip to content

Push only the PR's changed files to the submissions realm#662

Merged
richardhjtan merged 2 commits into
mainfrom
fix/push-only-pr-diff-to-submissions
Jul 17, 2026
Merged

Push only the PR's changed files to the submissions realm#662
richardhjtan merged 2 commits into
mainfrom
fix/push-only-pr-diff-to-submissions

Conversation

@richardhjtan

Copy link
Copy Markdown
Collaborator

Problem

The push-to-submissions workflow force-pushes the entire repo checkout to the shared staging submissions realm. Each PR's checkout is main + only that PR's changes, so every push resets every file on the realm to that PR's view of main — silently reverting modifications other open PRs had already pushed. With multiple PRs open in parallel, whichever pushed last wins across the whole realm, not just on genuinely conflicting files.

Fix

Stage only the PR's diff (git diff HEAD^1 HEAD against the merge commit, excluding realm.json/index.json/.boxel-sync.json via pathspec) into a temp directory and push that. Since boxel realm push without --delete only writes files present locally, the rest of the realm is left untouched. --force still resolves add-vs-update from actual remote state, so no sync manifest is needed, and the separate config-stripping step is folded into the pathspec excludes.

Remaining (accepted) limitations of the shared realm, now noted in the sticky comment footer:

  • Two PRs editing the same file still last-writer-wins on that file.
  • File deletions in a PR are not mirrored to the realm.

🤖 Generated with Claude Code

The realm is shared across open PRs. Force-pushing the whole checkout
reset every file to this PR's view of main, silently reverting files
other open PRs had modified. Staging just the merge-commit diff and
pushing that leaves the rest of the realm untouched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 17, 2026 07:14
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

Staging Submissions Preview

This PR's content is pushed to the staging submissions realm: https://realms-staging.stack.cards/submissions/

Changed folders:

  • .github/

Updated at 2026-07-17 08:16:59 UTC for commit 0ad469c. Shared realm: only this PR's changed files are pushed; files touched by multiple PRs reflect whichever pushed last, and deleted files are not removed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the push-to-submissions GitHub Actions workflow to avoid clobbering the shared staging submissions realm when multiple PRs push previews concurrently, by pushing only the files changed in the current PR rather than the entire repo checkout.

Changes:

  • Stage only the PR’s changed (non-deleted) files into a temp directory and push that directory to the submissions realm.
  • Fold the prior “strip realm-config files” behavior into the diff pathspec exclusions (realm.json, index.json, .boxel-sync.json).
  • Update the sticky PR comment footer to clarify shared-realm limitations (last-writer-wins on overlapping files; deletions not mirrored).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/push-to-submissions.yml Outdated
The comment step recomputed the diff without the pathspec excludes, so
it could list files that were never pushed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@richardhjtan
richardhjtan merged commit 0100f37 into main Jul 17, 2026
3 checks passed
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.

2 participants