Skip to content

ci(fork): fork 專用 PR 檢查,只顧 macOS arm64 - #4

Merged
audichuang merged 4 commits into
developfrom
ci/fork-github-runners
Oct 18, 2026
Merged

audichuang merged 4 commits into
developfrom
ci/fork-github-runners

Conversation

@audichuang

@audichuang audichuang commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1
Prod 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​140 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​137

ELI5

這個 fork 只會裝在一台 Apple Silicon 的 MacBook 上,其他電腦都用上游的版本。所以 PR 檢查不需要跑 Windows、WSL、Linux 打包、mobile 那一大套,只要確認 fork 的改動沒壞,而且 Mac arm64 能打包出來。這個 PR 新增 fork 專用的 fork-pr.yml;上游的 workflow 一個字都不改,只在 GitHub 上把它們停用。

What Changed

  • 之前:PR 檢查用的是上游的 pr.yml,有 18 個 job,一次約 96 分鐘機器時間。而且上游 ci: move PR analysis and Linux unit tests to Blacksmith stablyai/orca#29362 把它搬到 Blacksmith runner,fork 沒有裝 Blacksmith,所以 PR feat(source-control): Commits 區加全螢幕 Git Graph 檢視 #2 的檢查一直卡在排隊、從來沒開始。
  • 之後:PR 只跑 fork-pr.yml,全部用 GitHub 內建的機器(public repo 免費、不限分鐘)。它有 4 個 job:
    • fork-check and changed tests:跑 make fork-check,內容是型別檢查、fork 有改到的上游測試、fork 新增或修改的測試、changed-code 品質檢查;接著跑這個 PR 改動會影響到的測試(vitest --changed <base>)。
    • fork cross-version wire compatibility:檢查新舊版本之間的通訊相容性。fork 的桌面 client 會連到跑上游 release 的遠端主機,所以這項保留。
    • fork macOS arm64 build:在 macos-15(Apple Silicon)上跑和 Mac 本機 make build 一樣的步驟,不簽章,確認打包不會壞。
    • Fork PR checks passed:總結 job,也是合併前要看的閘門。前面任何一個沒有成功,它就失敗。draft PR 不會啟動任何 job。
  • 新增 make fork-ci-disable-upstream:把 fork 上除了 fork-pr.yml 以外的 workflow 全部停用。rebase 帶進上游新的 workflow 時,重跑一次就好。
  • 為了通過 repo 自己的 CI 規範測試,有兩處改到上游檔案,各在清單開頭加 1 行:ci-closed-pr-caches.yml 的清理清單,以及 ci-closed-pr-cancellation.test.mjs 的預期清單。這是因為規範要求每個 PR workflow 的 concurrency key 都要登記到清理流程裡。
  • FORK.md 的合併閘門改成以這個總結 job 為準。

Why

  • 為什麼不直接刪減 pr.yml 的 job:pr.yml 有 1500 多行,上游很常改,每次 rebase 幾乎都會衝突。停用它而不改檔案,rebase 時就不會在這裡衝突。
  • 為什麼不裝 Blacksmith:它免費額度每月只有 3,000 分鐘,又要授權第三方存取 repo。
  • 這個 PR 前一版的做法,是把 pr.yml 裡的 runner 換回 GitHub 內建的。但停用 pr.yml 之後那些改動就用不到了,只會多出衝突點,所以撤掉了。

Linked Issue

N/A(fork 內部 CI 設定)

Visual Proof

N/A:只改 CI 設定。這個 PR 自己的檢查就是用 fork-pr.yml 跑的,可以直接證明它有效。

Testing

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • config/scripts/ 的 workflow 規範測試:343 個檔案通過。包括 draft PR 不啟動 job、每個 concurrency key 都有登記給清理流程、清理清單的順序。只有 workflow-ref-reachability 和 pr-auxiliary-preflight-admission 這 2 個沒過,它們在沒改過的 develop 上本來就會失敗。

  • 最終驗證是這個 PR 自己的「Fork PR checks passed」能通過。

AI Disclosure

由 Claude(Opus)實作。

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)(交給這個 PR 的 CI)

… arm64 打包),上游 workflow 改在 GitHub 停用而不改檔
@audichuang
audichuang force-pushed the ci/fork-github-runners branch from acdb1de to da87776 Compare October 18, 2026 12:05
@audichuang audichuang changed the title ci(fork): PR 檢查改回 GitHub 內建 runner ci(fork): fork 專用 PR 檢查,只顧 macOS arm64 Oct 18, 2026
@audichuang
audichuang merged commit b9aa0b8 into develop Oct 18, 2026
12 of 13 checks passed
@audichuang
audichuang deleted the ci/fork-github-runners branch October 19, 2026 02:49
audichuang pushed a commit that referenced this pull request Oct 21, 2026
…p ones (stablyai#31096)

* feat(ci): ratchet raw repo connectionId host reads; one drop-in resolver

Codex review 6 class fix (#4/#6/#7): host decisions read off a repo row's
legacy connectionId miss rows that name SSH only as executionHostId.

- getRepoRoutingConnectionId (shared/execution-host.ts): drop-in for a raw
  repo.connectionId routing check that also finds executionHostId-only SSH.
- check-repo-host-read-ratchet: per-file count of raw repo connectionId
  reads in src/main, src/shared, src/cli; counts may only shrink.
- Migrated 66 cheap reads: runtime GitHub/GitLab commands, PR/MR head ref
  fetches, preserved-branch cleanup, ref queries, base-ref IPC, worktree
  preparation, trash sweep, scan cache TTL, usage metadata.

* fix(ipc): PR base IPC routes executionHostId-only SSH rows; ratchet is a stated lower bound

Review follow-up (Opus on stablyai#31096):
- worktrees:resolvePrBase decided git/gh routing on the raw connectionId while
  its head-ref fetches already used the resolver; one resolved connectionId
  now drives all of it (test fails on main).
- getRepoRoutingConnectionId's contract is stated exactly: never local when the
  raw field is set; on a contradictory ssh row executionHostId wins.
- The ratchet regex no longer matches report.connectionId; header and docs
  say it is a lower bound.
- Regression tests for a runtime GitHub and GitLab command site.

* test(ci): pin the repo host-read ratchet step to the static phase

* fix(ci): repo host-read ratchet skips verbatim field copies into projected rows

A copy of connectionId into a projected row decides nothing; migrating it to
the resolver would change what the projection publishes. The sidebar feed
catalog's copy (added after the baseline) and two older projections no longer
count; baseline pruned to 91.
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