Skip to content

[不合併] develop rebase 到 v1.4.255 的 CI 驗證 - #157

Closed
audichuang wants to merge 544 commits into
ci-base/v1.4.255from
rebase/v1.4.255
Closed

audichuang wants to merge 544 commits into
ci-base/v1.4.255from
rebase/v1.4.255

Conversation

@audichuang

Copy link
Copy Markdown
Owner

不合併:這個 PR 只用來讓 Fork CI 驗證 develop rebase 到 v1.4.255 的結果(base 是 ci-base/v1.4.255)。驗證過後由 auto-rebase 用 lease 推到 develop。

使用者手動要求接手:前一次 run-476 在 2026-11-10 05:19 停在 2/520 後死掉,lock 沒 PR;本次刪掉舊 lock,從新的 develop(含 #153–#156、v1.4.254-fork.3)重做。

- develop = v1.4.254 + fork commits(tip bf3ec59725)
+ develop = v1.4.255 + 539 個 fork commit + 1 個修正 commit

MANUAL:衝突與解法

做法:每個停點以舊 develop 上同一個 commit 的檔案為準,套上 v1.4.254→v1.4.255 的上游差異(merge-file),合不了的手解。直接三方合併只有 5 個檔真衝突,都是上游 stablyai#39069(Git Graph commit actions):

  • panel/panel-content.tsx:fork 的 sourceControlHistorySlots 與上游新的 onOpenGitGraph 都保留。
  • sync/git-history-panel.tsx:參數同時收 onOpenGitGraph 與 fork slots;header 仍是 slots.headerActions ?? <GitGraphOpenButton onOpen={onOpenGitGraph}>。
  • sync/git-history-graph-svg.tsx:上游改成 path 物件陣列 + paths.map(GraphPath),fork 抽出的 GitHistoryGraphNodeMarker 保留。
  • lib/git-graph-tab.ts:上游 openGitGraph(worktreeId, resolveTargetGroupId?) 新簽章,開頭仍是 fork 的接管 seam。
  • sync/git-history-commit-context-menu.tsx:上游已有 children slot(Git Graph: commit actions (checkout, cherry-pick, revert) stablyai/orca#39069),採上游,fork 只留 w-64;fork 選單項目改出現在上游 slot 的位置(最上方)。
  • 上游 test: remove 95 low-value renderer tests stablyai/orca#39859 刪了 95 個低價值測試,remap-open-editor-tabs-for-path-change.test.ts 採上游刪除、保留 fork 新增的測試。
  • orcad migration path(上游 Organize SSH and managed-server modules by concrete owner stablyai/orca#39937 搬到 src/main/persistence/...):最終 develop 在這裡已無 fork 改動,一律採上游新位置。

用到的筆記條目

額外 commit

  • a9a5ed5 fix(rebase): follow v1.4.255's Git Graph commit menu slot and onOpenGitGraph prop

上游基準

upstream-red:v1.4.255 tc、lint、daemon-protocol-crossing 全綠。

Merge Danger

Door: two-way(develop 由 lease 推,backup 分支保留舊 develop)

Blast Radius: Git Graph 右鍵選單順序(fork 項目移到最上方)

audichuang and others added 30 commits November 10, 2026 08:35
Started through a symlinked path, the driver's entry check failed, main never ran and node exited 0, so git took ours as a clean merge and dropped the fork's side; the check now compares real paths. A driver that cannot start (node missing from a GUI client's PATH) exited 127 with ours unmarked; it now falls back to git merge-file markers, and the driver records node's absolute path at install. Appending to an info/attributes without a final newline no longer joins two lines. mergeLocaleJson returns { merged, conflicts } and keeps its recursion internal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p prototype-named keys

Codex round 1 reproduced four ways the driver could lose a side or fail to run:
- Reinstalling truncated the shared copy in place, so a merge in another worktree could run an empty script that exits 0; the copy now lands under a temp name and is renamed over it.
- Keys named toString, constructor or __proto__ were taken as inherited and dropped; lookups use own keys and merged objects have no prototype.
- A checkout path with an apostrophe broke the stored driver command; both paths are shell-quoted.
- git rev-parse --path-format=absolute needs git 2.31; the common dir is made absolute with cd and pwd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…driver failure

Codex round 2 reproduced two more ways the install could leave ours unmarked:
- A core.autocrlf clone turned the .sh installer into CRLF and bash refused it. The installer is now fork-merge-driver-install.mjs, which upstream's .gitattributes already pins to LF with every config/scripts .mjs.
- Git expands %A inside the stored command, so a checkout path holding one sent node to a missing file. Literal % in both paths is written as %%.

The driver now reports its own conflict as exit 2, and the stored command line-merges with markers on any other non-zero exit (node missing, a crash, unparsable JSON), replacing the 127-only branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run from another worktree (an upstream checkout, say), the installer copied the driver from that checkout's config/scripts, where it does not exist. It now copies the driver that sits next to itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…prints FAILED but lands

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… run in the notes

- Auto-rebase opens its PR right after the rebase so step 2 heartbeats, keeps the PR and
  rebase/* lock until the release ends (a run dying mid-release is resumed from a
  develop-moved marker), and retires a verified or needs-human lock once a newer upstream
  release lands instead of skipping every later release in silence.
- Every run writes resolution-history.md on fork-canary-notes; consumed entries move there
  instead of being deleted, and "fork-only" entries are applied by the next rebase.
- precheck: a GitHub API failure or an odd release tag skips quietly instead of alerting.
- fork-notes.sh: a push that landed despite a client error is a success, not exit 2.
- pty-connection-test-environment.test.ts: count timer firings only after restore.
- FORK.md: the PR dmg build skips the hardened runtime and team-id check too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The precheck let a new run start every hour while step 7 released from a verified PR
the user had pushed; a develop-moved comment now applies the 6 h stale rule, and the
canary treats it as in flight. Network failures in the precheck skip quietly, resumed
releases take vOLD and used entries from the PR body, and annotated tags compare ^{}.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code review of #77:
- SKILL.md: "第 N 步" always names a `## N.` section, items are "第 N 點"; the jumps
  to section 8 say so, and the develop-moved comment carries the literal sha.
- precheck: API or network failures stay quiet until they last 6 h, then alert once a
  day; markers are read with the same jq startswith as the canary precheck.
- FORK.md: the next run releases a verified head the user already pushed.
- pty-connection-test-environment.test.ts: 50 ms timers so the timeout half still
  checks something when restore is slow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…{tip}

Second /code-review pass on #78: the precheck's why-comment fits one line and its
stamp is named for what it holds; skills say PR markers go first in a comment, the
canary braces every ${tip}, and the develop-moved sentence no longer stacks asides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
precheck.test.sh runs precheck.sh against fake git, gh and alert script in a temp
HOME, one case per lock state plus the 6 h down alert; a broken precheck otherwise
stops the hourly rebase in silence. The precheck parses dates with BSD or GNU date
so the test also runs in Linux CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uto-move rule

The auto-rebase skill already lets a notes fix that touches only fork-owned test files
pass on a green test instead of a revert-goes-red proof; FORK.md, which the skill names
as its rule source, still demanded the proof for every fix commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… conditions

Review of 94ba892: the exemption now names the entry type and the 守它的測試 field as the
notes write them, defines the files as test files absent at vNEW, keeps timing as the
reason rather than a condition, and says every other fix commit follows the rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…obs on docs

Docs went straight to develop so they would not wait 15-25 min for CI, which left no PR
record and needed a rebase-lock exception. Now every change opens a PR. fork-pr.yml's new
scope job classifies the changed paths with upstream's isDocsOnlyPath (plus FORK.md, never
.claude/skills); the heavy jobs run only on `full`, and verify accepts skipped jobs only
when scope succeeded and said `docs`. An empty path list or a failed scope runs everything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… inputs

Gate review of #80: a docs-only PR skipped `pnpm lint`'s README link check, so a broken
link would turn every later PR red, and docs/site's package.json (read by the test-runner
check) counted as docs. The scope job now runs the link check itself, fork-pr-scope keeps
CI, build, agent and docs/site paths full even if upstream's docs list grows, and FORK.md
says a failed scope job blocks the PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oves

/code-review of #80: scope tests keep only paths the fork's full-scope guard rejects
(docs/site) plus the skills rule; the skip rule lives in the scope script and the gate
checker only; the heavy jobs drop a draft check scope already applies; the
isDocsOnlyPath pin says why it imports; FORK.md's local-check line follows the scope job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rge may be released

The user chose no branch protection: the auto-rebase force-pushes develop with a lease.
A docs-only PR's merge commit ran no build, so FORK.md's Release rule now releases it only
when its first parent passed the full checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of #81: walk the first-parent chain past consecutive docs-only merges, name what
counts (a feat merge whose run built, or the auto-rebase head), say how to tell a docs run,
and keep the fork-check-full sentence's subject explicit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rebases

/code-review of #81: a docs-only merge is one whose PR's scope job said docs (no invented
job names); the vouching ancestor must be releasable by the full rule, and if it is not,
neither is the docs merge. The direct-push exception names the user's own rebases too,
which are also why develop stays unprotected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream stablyai#33428 makes refreshGitStatusForWorktree require ownerHostId so a
same-path twin on another host never gets this copy's transport. Resolve the
copy once, as useGitStatusPolling does, and pass its host, connection and
transport; the test pins that all three reach the refresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eck ratchet

v1.4.241 adds check:e2e-typecheck-ratchet with an empty baseline. The `in`
check could not narrow the page.evaluate union, so barBox stayed possibly
undefined; test the value instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v1.4.241 rebuilt buildTabStripLayoutKey; its fork lookup by the tab's own repo
had no test, so a revert to relativePath would stop folder tabs re-rendering
when their repo status changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v1.4.241 auto-rebase met four new upstream checks one fork-check round
at a time: fork-lint-run stopped at the first failing step and make stopped
fork-check-lint at the first failing check. Both now run everything and list
the failures. The canary also runs upstream's lint steps in the merged tree
(report-only), so new ratchets show up a day before the release.

Also lists the folder git-status layout-key test in the seam groups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ly on static checks

Auto-rebase run 121 (v1.4.241) ended its turn to await a background
fork-check; Orca judged the idle run completed and closed its terminal,
killing the job. Both pipeline skills now wait in the foreground in
sub-10-minute calls (config/scripts/fork-wait-for-job.sh, gh-wait -t,
codex-companion wait), and Claude reviewers run as `claude -p` children,
since the Agent tool only runs in the background.

The auto-rebase's local gate is now `make -k fork-check-static` plus the
seams; the full unit suite, e2e, wire and mobile run once on Fork CI
(Linux) instead of again on a loaded macOS host with upstream-only reds.
Blind review starts as soon as the head is pushed, alongside CI. Lint
failures are checked against vNEW and fixed by cherry-picking upstream's
own fix. Step 7 disables upstream workflows again after main moves, since
GitHub registers new ones only from the default branch. The canary skill
diagnoses the new lint section of its report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Fresh exit-file names per run and an absolute path to the wait script;
  a stale .exit ended the wait at once, and the base worktree has no fork
  scripts.
- Auto-rebase: launch reviewers, wait for CI, then wait for reviewers; A/B
  prompts state MAIN is read-only (claude -p runs without permission asks);
  repro a fork e2e by its spec, not make; the step 8 notice no longer
  mentions local e2e.
- Canary: the foreground-wait rule covers every long command; lint
  failures are attributed from the files they name instead of a second
  worktree that cleanup never removed; canary-last.json gains lintFailures.
- fork-lint-run reports a missing exit code as 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Bash tool's default timeout is two minutes, so a nine-minute wait
without `timeout: 600000` is moved to the background: the run-121 death
again. Both skills now say so, and say how to tell a killed job from a
slow one.

Also: a cherry-picked upstream lint fix is proven by its lint step turning
red (FORK.md's gate and step 6 agree), its translations go in a separate
commit so the patch-id still matches upstream, exclusions never override
the CI gate, the post-release workflow disable is retried and never blocks
the release, and claude -p reviewers are told not to background work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nition

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v1.4.241 took 2h40m and nobody could say where without rebuilding the
timeline by hand. Each run now records its phase durations next to the
previous run's, so a slow phase shows up in the notes instead of in the
user's patience.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_STEPS

Upstream v1.4.242 (stablyai#33817) replaced the `pnpm lint` && chain with
`node config/scripts/run-lint.mjs`, so parsing package.json's lint
script found a single step and reported every EXCLUDED entry as stale.
fork-lint-run now reads LINT_STEPS and resolveLintCommands from
run-lint.mjs (pinned in fork-upstream-api.txt), runs package scripts by
name and run-lint's bare commands through `pnpm exec`, and keeps the
failure message format fork-canary.sh parses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream v1.4.242 (stablyai#14812) folds Windows separator and drive spellings
in every absolute-path match for external file changes. The fork's
folder-scoped diff tabs match by absolute path too, so both the watch
batch index and getOpenFilesForExternalFileChange compare through the
same path keys now, with a fork test for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re 寫回原檔

還原 5aefd81。資料夾工作區的 Paste & Restore 一律以資料夾為根,剪貼簿只帶 clipcode-root 的 basename,所以 repo 包含資料夾時複製根也必須是資料夾;三種情況的斷言改為寫死路徑。同時記錄資料夾外檔案會被略過的已接受風險。
跨主機的 lineage 子 worktree 會進到資料夾的 Source Control 面板,
路徑字串在不同主機間碰巧重疊時,複製根會誤用資料夾路徑,
導致 0 個檔案或還原到錯誤主機。比對前先確認兩邊的檔案系統擁有者相同。
依使用者決定改跟上游 stablyai#38831 的 placement 模型(R3):
- hydration 不再保留 gitWorktreeId;舊版存下的 folder 分頁 relativePath 是 repo 相對時,改寫成 folder 相對,在 folder 根目錄外的改成絕對路徑,讀的才是同一個檔
- 拿掉 session/layout 的寫入與 schema 欄位、讀檔 owner、分頁列的 scoped git status、orcad 遷移欄位,這些上游檔案還原成 v1.4.254
- 刪掉沒有 production importer 的 folder-file-git-owner、active-open-file-repo-path、open-file-link-split 與只守這些死碼的測試(R5),以及 controller-types 的 editorWorktreeId(R15)
- folder 解析根目錄的邏輯搬到 folder-tab-relative-path.ts,chat quote 與 hydration 共用
- EditorPanel.fork 的 fixture 改成上游 Source Control 實際產生的 repo 擁有分頁
- 跨版本 tripwire 拿掉已不存在的 gitWorktreeId 例子(R4 不再成立)
resolveDefaultAgentForWorktreeNewTab、agentsOfferedForLaunch、agentChoiceMayOpenAsChat 的 cwd 分支已沒有 production 呼叫者會傳(R6),host-chat-program.ts 與 agent-tab-shortcuts.ts 還原成 v1.4.254;folder-repo-launch-chat-route.test.ts 只留走得到 production 的 sourceControlLaunchAppliesAgentArgs 例子。
right-sidebar-activity-visibility.ts 用的是上游的 isFolderWorkspace 判斷,inFolderWorkspace 沒有讀者(R7);兩個檔案還原成 v1.4.254,刪掉 right-sidebar-activity-visibility.fork.test.ts。
- fork-seam-tests.txt 移除已刪的測試與已和上游相同的 workspace-layout-fact-locations,重新分組
- FORK.md 改寫 folder 分頁的偏離說明、刪掉 withFolderFileGitOwner 那條、更新帶 fork 修改的上游測試清單(R14),範本改指向現有的測試,phase F 段落只剩 R3
上游的絕對路徑分頁(relativePath === filePath,例如 terminal 連結開的)靠這個相等決定 placeAbsoluteTab;hydration 只改舊 git-owner 層存下的 repo 相對路徑,絕對路徑分頁保持原樣,測試補上這個例子。FORK.md 的說明改成「不是偏離」。
舊 git-owner 層存下的 folder 分頁帶 gitWorktreeId 且 relativePath 是 repo 相對;schema 暫時讀進這個欄位當標記(不進公開型別、不寫回),hydration 只對有標記的分頁改寫:找得到根目錄用 folder 相對,找不到(runtime 主機的 folder 目錄還沒載入)用絕對路徑。沒標記的上游分頁原樣通過。
@audichuang

Copy link
Copy Markdown
Owner Author

本機閘門開始(RUN=20261110T002931Z,手動接手)

@audichuang

Copy link
Copy Markdown
Owner Author

盲審開始(head e2c28d2);本機 static 42 步綠、seams 86 檔 485 例綠

@audichuang

Copy link
Copy Markdown
Owner Author

盲審結果

審查者 第 1 輪 第 2 輪
A 衝突忠實度 ACCEPTABLE(6 條 NON-BLOCKING) —
B 上游 API 漂移 ACCEPTABLE(4 條 NON-BLOCKING) —
C 測試與 seam ACCEPTABLE(7 條 NON-BLOCKING) —
Codex NOT ACCEPTABLE(1 BLOCKING) ACCEPTABLE

確認為真並修正

  • Codex BLOCKING:git-graph-tab.ts:127 fork 接管 openGitGraph 的 seam 沒有測試會紅 → d961e47 新增 git-graph-tab.fork.test.ts 並加入 seam 清單;拿掉四行 seam:AssertionError: expected "vi.fn()" to be called with arguments: [ 'repo-1::/work/app' ]。
  • C 發現 3:a9a5ed51c5 把選單寬度改成 w-64(舊 develop 與 v1.4.255 都是 w-56)→ 41c5ced 改回,檔案與 v1.4.255 相同。
  • CI 紅 fork-check tests (7/18):fork-detached-agent.test.ts 的 fixture 被 refactor: organize agent hook installation and server owners stablyai/orca#39969 搬家 → ad407ff。

mutation 證明(解過或修過的 hunk):hunk 掃描 19 個:guarded 8(redBy 為證)、skipped 2(pnpm tc)、crash-only 6(用到它的 hunk 是 guarded)、survived 3 → git-graph-tab.ts:127 已補測試;context-menu 寬度已改回上游(無 fork hunk);git-history-graph-svg.tsx 節點圓點只在實機 UI 看得到(上游同樣沒有測試,C 判既有缺口)。main-sync-fs-baseline.txt 改回 → check:main-sync-fs-ratchet 紅;fork-detached-agent.test.ts 改回 → Cannot find module。

NON-BLOCKING 留待

  • 上游 v1.4.255 的「Cmd/Ctrl-click 在分割視窗開 Git Graph」與 Git Graph 分頁的 checkout/cherry-pick/revert 在 fork 版到不了(Git Graph 整個保留 fork 版的同一類刻意偏離)。
  • fork commit 選單項目移到上游 {children} slot 的位置(最上方)。
  • 既有缺口:use-saved-source-control-action-start.ts 的 initialCwd 轉發、單一 commit 選單的 Copy Full Source 沒有單元測試。
  • 中間 32 個 commit 單獨不過 tc(最終 head 過)。

@audichuang

Copy link
Copy Markdown
Owner Author

develop 已用 lease 從 bf3ec59 推到 41c5ced(舊 develop 備份在 backup/develop-v1.4.254-20261110T002931Z)。接著發版。

@audichuang

Copy link
Copy Markdown
Owner Author

發版開始 v1.4.255-fork.1

@audichuang

Copy link
Copy Markdown
Owner Author

v1.4.255-fork.1 已發佈(develop/main = 41c5ced,release run 42734843385 綠,tap 1.4.255-fork.1)。

@audichuang audichuang closed this Nov 10, 2026
@audichuang
audichuang deleted the rebase/v1.4.255 branch November 10, 2026 01:30
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