Skip to content

chore: upstream/dev の 116 commit を取り込む - #315

Merged
terisuke merged 117 commits into
devfrom
chore/upstream-merge-20260901
Sep 1, 2026
Merged

terisuke merged 117 commits into
devfrom
chore/upstream-merge-20260901

Conversation

@terisuke

@terisuke terisuke commented Sep 1, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #316

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

(upstream 追随。fork 側のコードは書き換えていない)

What does this PR do?

upstream/dev (anomalyco/opencode) の 116 commit を fork に merge する。rebase はしない — fork は 222 commit ahead なので、rebase すると独自コミット全部を書き換えることになる。

衝突は 1 ファイル 3 hunk だけだった: packages/opencode/test/cli/run/run-process.test.ts。

  • hunk 1・2 は、upstream が足した llm.text("recovered") と、fork が足した CI タイムアウト耐性 process.env.CI ? 45_000 : 30_000 がぶつかった。どちらも必要なので両方残した — upstream は「midstream error のあとに復帰メッセージが来る」ことを検証していて、fork は CI ランナーが遅いときの flake を防いでいる。目的が違うので片方を捨てる理由がない
  • hunk 3 は fork 固有テスト keeps fork subagents non-interactive when the parent permission asks。upstream に無いので fork 側を残した

packages/guardrails(fork 独自の 93 ファイル)は upstream に存在しないので衝突ゼロだった。これは偶然ではなく、packages/guardrails/README.md が「managed/ と profile/ の資産を優先し core を深く触らない」と決めている結果。実際 fork が packages/core に入れている変更は 11 ファイルしかない。

355 files changed, 9962 insertions(+), 4349 deletions(-)

How did you verify your code works?

$ git rev-list --left-right --count upstream/dev...HEAD
0	223

$ bun install
exit 0

$ bun turbo typecheck
Tasks:    30 successful, 30 total
exit 0

lint は merge 前後で比較した(同一ツール oxlint 1.60.0、同一起動):

tree warnings errors
pre-merge cc03aa4f83 4417 29
merged ac3b576ec9 5119 1

error は 29 → 1 に減っている。残る 1 件は packages/session-ui/src/v2/components/prompt-input/index.tsx:163 の Tailwind arbitrary value content-['\200B'](ゼロ幅スペース)を oxlint が JS の 8 進エスケープと誤読するもの。この merge が持ち込んだものではない: 当該ファイルの sha256 が base と merged で一致(c3055dec4d61703c9e3ca9f0083bcb52396f05a50f796244c38a9282beaab71a)していて、merge はこのパスに触っていない。無関係な修正を混ぜたくないので直していない。

CI は 12/12 green。

Screenshots / recordings

UI 変更なし。

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

実環境貫通(C11 / Track B B1)

  • この変更が触れた境界のうち、実環境を 1 本通した
    • 通した境界: 実 CI ランナー(GitHub Actions、upstream 由来の workflow 変更を含む)
    • 実行したコマンド / 操作: gh pr checks 315、および手元で bun install / bun turbo typecheck / bun run lint
    • 生出力(要点): 12/12 checks pass(typecheck 2m16s / unit linux-smoke 1m12s / e2e linux 7m14s / storybook build / nix-eval / gitleaks / h5-admission ほか)。手元は typecheck 30 successful, 30 total exit 0

未知の依存・API(C16 / Track B B4)

  • 該当なし(初出の依存・API を使っていない)

merge が持ち込む workflow は .github/workflows/unlock.yml 1 本のみで、削除はゼロ。使っている action はすべて既出かつ SHA pin 済み(actions/checkout@f43a0e5 / actions/setup-node@49933ea / aws-actions/configure-aws-credentials@7474bc4)。fork 側は vars.AWS_DEPLOY_ROLE_ARN 未設定なので実質不活性。

完了条件の形式(Track B B2)

  • F2 失敗モードの再現(是正)
  • F3 両側照合(二重管理)

F2: merge 前 cc03aa4f83 で lint が 29 errors だった。merge 後は 1 error。同一ツール・同一起動での実測値を上に貼っている。「悪化させない」という受入基準に対して、実際には改善している。

F3: .github/workflows/ を触るので「この merge が既存ガードを弱めていないか」を両側照合した。判定式は workflow の削除数と gitleaks / h5-admission / permissions 行の削除数がいずれも 0 であること。実測 GREEN = workflows deleted=0 guard-lines removed=0。片側を壊す確認として h5-admission.yml を削除する使い捨てコミットを注入すると workflows deleted=1 guard-lines removed=8 になり判定が red に転ぶことを実測した(probe は git reset --hard HEAD~1 で撤去済み、tracked 差分 0)。つまりこの判定式は load-bearing で、飾りではない。


H5 markers

本 PR は upstream merge であり新しいガードを導入しないが、.github/workflows/ を触るため構造トリガに該当する。したがって「この merge が既存ガードを弱めていないか」を実検査し、その結果を陰性証跡として記載する。N/A では埋めない。

H5-guard: yes

H5-NEGATIVE: 「merge が CI ガードを弱めていないか」を検査した。判定式は .github/workflows/ からの削除数と、gitleaks / h5-admission / permissions 行の削除数がいずれも 0 であること。GREEN(実際の merge cc03aa4..HEAD)= workflows deleted=0 guard-lines removed=0。falsification として h5-admission.yml を削除する使い捨てコミットを注入すると workflows deleted=1 guard-lines removed=8 となり検査が red に転ぶことを実測した(判定式は load-bearing)。probe コミットは git reset --hard HEAD~1 で撤去済みで、作業ツリーの tracked 差分は 0。

H5-LEDGER: 本 PR は装置を増やさないため新規配線は無い。既存配線が保全されていることを実測した: packages/guardrails/ は merge による差分ゼロ、scripts/h5-admission-check.sh も unchanged で、その LEDGER_PATH="${H5_LEDGER_PATH:-$HOME/.claude/hooks/ledger/guard-ledger.jsonl}"(17 行目)が維持されている。したがって guard 発火は従来どおり guard-ledger.jsonl へ届く。

H5-RETIRE: 本 merge が新規に持ち込む装置は upstream 由来の .github/workflows/unlock.yml 1 本のみ。廃止条件 — fork 側で vars.AWS_DEPLOY_ROLE_ARN が未設定である限り本 workflow は role assume に失敗して機能しない。次回の upstream 同期時点でも未設定かつ発火ゼロであれば fork では不要と判断して削除する。90 日発火ゼロで退役 issue を起票する共通様式にも従う。

H5-SUBTRACTION: N/A

H5-PAIR: N/A

H5-E2E: git rev-list --left-right --count upstream/dev...HEAD && bun turbo typecheck && bun run lint
H5-E2E-OUT: 0 223(左が 0 = upstream 追随完了) / Tasks: 30 successful, 30 total exit 0 / Found 5119 warnings and 1 error.(pre-merge base は同一ツール oxlint 1.60.0 で Found 4417 warnings and 29 errors. — error は 29 から 1 へ減少しており悪化なし)

opencode-agent Bot and others added 30 commits August 21, 2026 02:35
opencode and others added 16 commits August 28, 2026 04:10
anomalyco/opencode dev の 116 commit を fork へ取り込む。

衝突は事前実測どおり packages/opencode/test/cli/run/run-process.test.ts の
3 hunk のみ。解決方針も事前に確定していたとおり:
- upstream の `llm.text("recovered")` と fork の CI タイムアウト耐性
  (process.env.CI ? 45_000 : 30_000) は両取り
- fork 固有テスト "keeps fork subagents non-interactive when the parent
  permission asks" は fork 側を維持

packages/guardrails(fork 独自 93 ファイル)は upstream に存在せず衝突なし。

## 検証状況(未完了・引き継ぎ)
- bun install: exit 0
- bun turbo typecheck: 30/30 successful, exit 0
- bun run lint: 5,119 warnings / 1 error, exit 1 — **未解決**
- PR: 未作成

ネットワーク断のため作業を中断し、チェックポイントとして保存する。
**PR-ready ではない。** lint の 1 error が未解決。

委任契約: aidd-governance design/ops/handover/2026-09-01-opencode-upstream-merge-codex.md

Agent-Lane: codex
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

The following comment was made by an LLM, it may be inaccurate:

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot closed this Sep 1, 2026
@terisuke terisuke reopened this Sep 1, 2026
@terisuke
terisuke merged commit 7ac3edd into dev Sep 1, 2026
27 of 29 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.

fork が upstream/dev から 116 commit 遅れている