Repository navigation
LOCAL: gate only the fork's own lines on an upstream sync PR - #23
Conversation
A sync PR merges all of upstream into swaplabs/main, so the changed-code and React Doctor gates flagged upstream's own code (1052 files on the 2026-09-29 sync, for one upstream type assertion). For this repository's sync PRs (head `main` or `sync/upstream-*`), the static analysis job now sets ORCA_SYNC_PR_DIFF_BASE to where the PR meets the mirror `main`, and the diff-base resolver prefers it over the merge commit's first parent. Every other PR, and every other job, is unchanged; a failed lookup warns and gates every line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review complete. 🟡 1 medium 💬 Inline comments (1)
Reviewed commit: 62e1417 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62e1417475
ℹ️ 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".
…PRs into swaplabs/main Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review complete. No blocking issues — approved ✅; 1 nitpick below. 🧹 Nitpicks (1) — 🟢 1 low
Adds a sync-PR diff-base override to the CI changed-line gates via an Reviewed commit: 13b68e4 |
ELI5
A sync PR brings hundreds of upstream commits into the fork at once. The "changed code" quality gate treated every one of those upstream lines as ours, so it failed on upstream's own code and kept every sync PR red. This makes the gate on sync PRs look only at the lines the fork itself adds.
What Changed
static analysischecked 1,052 changed files. It failed on a type assertion inworktree-activation-default-agent-chat.test.ts:63, which came from upstream fix(native-chat): an empty workspace opens the default agent as a chat when chat is the default view stablyai/orca#23693 and had already passed upstream's CI. The fork can't fix that without diverging from upstream..github/workflows/pr.yml, thestatic analysisjob has a new step, run only for this repository's own sync PRs (headmainorsync/upstream-*, not from a fork). It fetches the mirrormainand setsORCA_SYNC_PR_DIFF_BASEto where the PR meets it, which is the upstream commit being merged.config/scripts/git-pull-request-diff-base.mjsprefers that base over the merge commit's first parent, so the changed-code and React Doctor gates see only the fork's lines: itsLOCAL:changes and the conflict resolutions.Why
pull_requestruns the resolver ignores the base argument and uses the merge commit's first parent. That is correct for normal PRs, and it's why passing a different argument can't fix this.Linked Issue
None. Fork-only; found on #22.
Visual Proof
N/A. CI only.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
git-pull-request-diff-base.test.mjsgains a case where the sync base wins over the first parent, and an empty value leaves today's behaviour.viteston the resolver plus every test that pins howpr.ymluses it: 6 files, 129 passed. That includescheck-root-directory-entries, which needsGIT_CONFIG_GLOBAL=/dev/nullon hosts that sign commits globally; it fails identically onswaplabs/mainwithout that.oxlintandoxfmtare clean.actionlint1.7.7 reports only syntax newer than itself (background/waitsteps,ubuntu-slim), all in upstream's existing file and none in the new step.Not verified until it runs: the step on a real sync PR. #22 will show it once rerun on a head that includes this change.
AI Disclosure
Written by Claude Opus 5.5 (Claude Code).
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.