Skip to content
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5990692
Merge pull request #920 from otomatty/main
otomatty May 20, 2026
6789010
feat(editor): ページアクションメニューに「PDFで出力」を追加
claude May 20, 2026
b964ce1
fix(pdf-export): read-only パスの改行潰れ・相対画像・コメント整合性 (PR #921 review)
claude May 20, 2026
bd64287
Merge pull request #921 from otomatty/claude/add-pdf-export-menu-CjdrZ
otomatty May 20, 2026
ad66af8
feat(editor): introduce PageActionHub and retire EditorRecommendation…
otomatty May 21, 2026
1ed56bf
refactor: decouple WikiLinkSuggestion from Editor context (#933)
otomatty May 23, 2026
7b28e4a
feat: Add WikiLinkInputBar component for ghost link creation (#934)
otomatty May 23, 2026
7e7bdf4
feat(editor): モバイル入力バーを visualViewport でキーボードに追従 (#927) (#935)
otomatty May 23, 2026
474fa9f
feat: add Cmd/Ctrl+K and Cmd/Ctrl+Shift+L editor shortcuts (issue #92…
otomatty May 23, 2026
296ec40
ci: introduce setup-toolchain composite action with retry logic (#938)
otomatty May 23, 2026
cb064f9
feat(editor): モバイル選択時のキーボード直上シートを追加 (#929) (#939)
otomatty May 23, 2026
f1e02a2
docs: add english-first public docs with ja pairs (#941)
otomatty May 23, 2026
163218a
feat(editor): インラインゴースト補完を追加 (#930) (#940)
otomatty May 23, 2026
d3441fd
feat(#931): Support Cmd/Ctrl+click and middle-click for wiki links (#…
otomatty May 24, 2026
a28c4e4
refactor: unify ghost link styling with orange-only design (#932) (#943)
otomatty May 24, 2026
afae915
feat(editor): redesign note page bottom input bar and action FAB (#944)
otomatty May 24, 2026
6f5b4ca
feat: normalize mermaid code blocks to dedicated mermaid nodes (#946)
otomatty May 24, 2026
78a50ba
feat: Add Wiki Compose P0 LangGraph infrastructure (#948) (#954)
otomatty May 24, 2026
6f83d60
fix(api): prevent Wiki Compose sessions stuck in running state (#955)
cursor[bot] May 24, 2026
779c1f5
feat: implement Wiki Compose research loop subgraph (#949) (#956)
otomatty May 24, 2026
94400b9
feat: wiki compose P2 — full orchestrator graph + split-screen UI (#9…
otomatty May 24, 2026
b554b86
fix(api): do not overwrite cancelled Wiki Compose sessions on run end…
cursor[bot] May 24, 2026
bda5585
fix(wiki-compose): hydrate UI from PATCH resume output (#960)
cursor[bot] May 24, 2026
6e11568
feat(editor): complete Wiki Compose P2 entry points and chat seed (#950)
cursoragent May 24, 2026
22dcc4b
fix(wiki-compose): keep one route so session URL update does not abor…
cursoragent May 24, 2026
80b66e0
chore(deps): bump the minor-and-patch group with 2 updates
dependabot[bot] May 25, 2026
17594a9
chore(deps): sync bun.lock with package.json changes
github-actions[bot] May 25, 2026
f86a7a3
chore(deps-dev): bump eslint-plugin-jsdoc from 62.9.0 to 63.0.0
dependabot[bot] May 25, 2026
3d934ba
chore(deps): sync bun.lock with package.json changes
github-actions[bot] May 25, 2026
e378a4b
fix(api): guard compose session cancel against completed race
cursoragent May 25, 2026
2e5b7c2
feat(editor): complete Wiki Compose P2 entry points and chat seed (#9…
otomatty May 25, 2026
790d71c
feat(api): wiki compose P3 BYOK execution backends (#951)
cursoragent May 25, 2026
2ed5b3d
fix(api): align Wiki Compose BYOK with provider models and web search…
cursoragent May 25, 2026
fd2d06c
feat(api): wiki compose P3 BYOK execution backends (#951) (#966)
otomatty May 25, 2026
30bab43
feat(api): connect ingest-planner graph to shared research loop (#952)
cursoragent May 25, 2026
e983d77
fix(api): apply approved research in ingest plan and guard thread own…
cursoragent May 25, 2026
8bc6eb9
feat(api): Wiki Compose P4 — Ingest への research subgraph 共有 (#952) (#…
otomatty May 25, 2026
8f0774b
Merge pull request #963 from otomatty/dependabot/npm_and_yarn/develop…
cursor[bot] May 25, 2026
c956c04
Merge pull request #964 from otomatty/dependabot/npm_and_yarn/develop…
cursor[bot] May 25, 2026
69fddd1
fix(wiki-compose): merge develop and resolve conflicts for PR #962
cursoragent May 25, 2026
59822c8
fix(api): merge develop and resolve conflicts for PR #967
cursoragent May 25, 2026
f6e0f59
fix(api): merge develop and resolve conflicts for PR #969
cursoragent May 25, 2026
2f07881
fix(api): format test and guard web search BYOK cross-provider keys
cursoragent May 25, 2026
37632db
fix(api): narrow web search BYOK candidate before credential lookup
cursoragent May 25, 2026
7d6bc9d
Merge pull request #962 from otomatty/cursor/critical-correctness-bug…
cursor[bot] May 25, 2026
8a11d38
Merge pull request #967 from otomatty/cursor/critical-correctness-bug…
cursor[bot] May 25, 2026
b68a91f
Merge pull request #969 from otomatty/cursor/critical-correctness-bug…
cursor[bot] May 25, 2026
92a044f
Merge remote-tracking branch 'origin/develop' into resolve-965
cursoragent May 25, 2026
49f0778
fix(api): merge develop and format composeSessions for PR #965
cursoragent May 25, 2026
5b873ac
feat(api): wiki compose P5 dynamic routing and maintenance graph (#953)
cursoragent May 25, 2026
e846cde
Merge pull request #965 from otomatty/cursor/critical-correctness-bug…
cursor[bot] May 25, 2026
4c90391
Merge branch 'develop' into cursor/wiki-compose-p5-dynamic-routing-7d9d
otomatty May 25, 2026
e22509c
fix(api): unblock wiki-maintenance BYOK and conflict-resolution HITL
cursoragent May 25, 2026
589c224
feat(api): wiki compose P5 dynamic routing and maintenance graph (#95…
otomatty May 25, 2026
7290f22
chore: merge develop into PR #971 and resolve conflicts
cursoragent May 25, 2026
71e2b62
Merge pull request #971 from otomatty/cursor/critical-correctness-bug…
cursor[bot] May 25, 2026
eeb934c
fix(api): address PR #972 review findings for release readiness (#974)
otomatty May 25, 2026
32ceace
fix(api): guard HITL checkpoints and align ingest plan_ingest BYOK mo…
cursoragent May 25, 2026
cfc4126
fix(api): add missing ingest state fields in planIngestModel test
otomatty May 25, 2026
c671d17
fix(api): guard HITL checkpoints and align ingest plan_ingest BYOK mo…
otomatty May 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 0 additions & 96 deletions .cursor/skills/delete-merged-branches/SKILL.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

- [ ] テストがすべてパスする
- [ ] Lint エラーがない
- [ ] 必要に応じてドキュメントを更新した
- [ ] 必要に応じてドキュメントを更新した(英語正本 + 該当する場合は `.ja.md` ペア)
- [ ] コミットメッセージが Conventional Commits に従っている

## スクリーンショット(UI 変更がある場合)
Expand Down
242 changes: 242 additions & 0 deletions .github/actions/setup-toolchain/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
# `setup-toolchain` action

リポジトリの CI ワークフローで繰り返し使われる「Node → Bun → bun install」を
1 つの composite action にまとめ、GitHub API の一過性失敗(典型:
`oven-sh/setup-bun@v2` が `api.github.com/repos/oven-sh/bun/git/refs/tags` で
401 を返す等)に自動でリトライをかける。Issue
[#937](https://github.com/otomatty/zedi/issues/937) で導入。

Composite action that bundles the repository's standard CI setup (Node +
Bun + `bun install`) and wraps the GitHub API-dependent steps with retry
semantics. Targets the transient `setup-bun` / `bun install` failures
captured in Issue [#937](https://github.com/otomatty/zedi/issues/937)
(e.g. one-shot 401 from `api.github.com`).

---

## ⚠️ `actions/checkout` は caller 側 / `actions/checkout` belongs to the caller

ローカル composite action の `action.yml` は **リポジトリが workspace に
checkout された後** でないと解決できない。本 action 内部に
`actions/checkout` を含めると chicken-and-egg になるので、caller が先に
`actions/checkout` を実行する必要がある。**checkout 自体も Issue #937 で
flake が観測されている**ため、caller 側でも `Wandalen/wretry.action@v3`
でラップすることを推奨する(後述のテンプレ参照)。

GitHub Actions resolves a local composite action by reading its `action.yml`
**from the workspace, which only exists after `actions/checkout`**. The
composite cannot bootstrap itself, so callers must check out first.
Because checkout itself has been observed to flake (see Issue #937),
callers should wrap `actions/checkout` with `Wandalen/wretry.action@v3`
(template below).

---

## ファイル構成 / Files

| ファイル / file | 役割 / role |
| --------------- | ------------------------------------------------------ |
| `action.yml` | composite action 定義 / composite action definition |
| `README.md` | 使用方法・引数の文書化 / usage and input documentation |

呼び出し元 / called from: `.github/workflows/ci.yml`,
`.github/workflows/deploy-dev.yml`, `.github/workflows/deploy-prod.yml`,
`.github/workflows/nightly-mutation.yml`.

---

## なぜ必要か / Why

CI の各ジョブは `${{ github.token }}` を使う JS アクション
(`actions/checkout` / `actions/setup-node` / `oven-sh/setup-bun`)を独立に
実行する。GitHub バックエンド側の一時的な 401 / 5xx でジョブごとに**ランダム
に 1 つだけ落ちる**事象が観測された(Issue #937、PR #936 の run 1b0dc51 /
c5694c1 を参照)。ワークフロー自身にはリトライ機構が無く、コードに問題が
無くても手動 re-run が必要になる。

本 composite action は内部で
[`Wandalen/wretry.action@v3`](https://github.com/Wandalen/wretry.action)
を使い、`setup-node` / `setup-bun` を `attempt_limit: 3` /
`attempt_delay: 5000ms` でラップする。`bun install` も shell レベルでの
リトライ(5s → 10s バックオフ、最大 3 回)を持つ。通常は 1 発で成功するため
オーバーヘッドは数秒以内に収まる想定。

Each CI job independently invokes JS actions (`actions/checkout` /
`actions/setup-node` / `oven-sh/setup-bun`) that authenticate against the
GitHub API with `${{ github.token }}`. When the GitHub backend returns a
transient 401 / 5xx, **a random single job per PR fails at setup**
(see Issue #937 — PR #936 runs 1b0dc51 / c5694c1). There is no built-in
retry, so contributors had to manually re-run unaffected code.

This action wraps `setup-node` / `setup-bun` with
[`Wandalen/wretry.action@v3`](https://github.com/Wandalen/wretry.action)
(`attempt_limit: 3`, `attempt_delay: 5000ms`) and adds shell-level retry
for `bun install` (5s → 10s backoff, up to 3 attempts). The happy path
still completes on the first attempt, so overhead in the steady state is
just a few seconds.

---

## 使用例 / Usage

### 1. 標準ジョブ / Standard job (root install)

ほとんどの CI ジョブはこのテンプレで置き換え可能。checkout / Node / Bun /
`bun install --frozen-lockfile` すべてがリトライ付きで実行される。

Most CI jobs can use this two-block template. Checkout / Node / Bun /
root `bun install --frozen-lockfile` all run with retry.

```yaml
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout (with retry)
uses: Wandalen/wretry.action@v3
with:
action: actions/checkout@v6.0.2
attempt_limit: 3
attempt_delay: 5000

- uses: ./.github/actions/setup-toolchain

- run: bun run lint
```

### 2. 履歴が必要なジョブ / Jobs that need full git history

PR のベースとの diff を取る `drizzle-migration-check` や `security` などは
checkout の `with:` で `fetch-depth: 0` を渡す。

Jobs that diff against the PR base (e.g. `drizzle-migration-check` /
`security`) pass `fetch-depth: 0` to the inner checkout:

```yaml
steps:
- name: Checkout (with retry)
uses: Wandalen/wretry.action@v3
with:
action: actions/checkout@v6.0.2
with: |
fetch-depth: 0
attempt_limit: 3
attempt_delay: 5000

- uses: ./.github/actions/setup-toolchain
```

### 3. Node のみのジョブ / Node-only jobs

`drizzle-migration-check` / `drizzle-schema-drift-check` のように Node
スクリプトだけ動かすジョブは `setup-bun: "false"` を渡せば Bun のセット
アップと `bun install` を丸ごとスキップできる。

Node-only jobs (e.g. `drizzle-migration-check` /
`drizzle-schema-drift-check`) can skip the Bun setup and the root install
entirely:

```yaml
steps:
- name: Checkout (with retry)
uses: Wandalen/wretry.action@v3
with:
action: actions/checkout@v6.0.2
attempt_limit: 3
attempt_delay: 5000

- uses: ./.github/actions/setup-toolchain
with:
setup-bun: "false"
```

### 4. ワークスペース個別 install / Workspace-only install

`server/mcp` のようにルートでは install せず特定ワークスペースだけ install
するジョブは `install-deps: "false"` を渡し、後段で個別に install する。

For jobs that skip the root install and instead install inside a specific
workspace (e.g. `server/mcp`):

```yaml
steps:
- name: Checkout (with retry)
uses: Wandalen/wretry.action@v3
with:
action: actions/checkout@v6.0.2
attempt_limit: 3
attempt_delay: 5000

- uses: ./.github/actions/setup-toolchain
with:
install-deps: "false"

- name: Install MCP dependencies
working-directory: server/mcp
run: bun install --frozen-lockfile
```

---

## 入力 / Inputs

| name | required | default | 説明 / description |
| -------------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `setup-bun` | no | `"true"` | `"false"` で Bun のセットアップと `bun install` を丸ごとスキップ。 / Set to `"false"` to skip Bun setup and the root install entirely. |
| `bun-version` | no | `"1.3"` | `oven-sh/setup-bun` に渡す Bun のバージョン指定子。 / Bun version spec forwarded to `oven-sh/setup-bun`. |
| `install-deps` | no | `"true"` | `"false"` でルートの `bun install --frozen-lockfile` をスキップ。`setup-bun: "false"` のときは実質無効。 / Set to `"false"` to skip the root `bun install --frozen-lockfile`. Implicitly disabled when `setup-bun: "false"`. |

`actions/checkout` の `fetch-depth` などは caller 側で `Wandalen/wretry.action`
の `with:` に渡す(上記サンプル参照)。`fetch-depth` などのパラメータは
本 composite action では扱わない。

`actions/checkout` arguments (`fetch-depth`, etc.) are passed by the caller
on the `Wandalen/wretry.action` block — they are not inputs of this
composite action (see samples above).

---

## リトライ仕様 / Retry semantics

| ステップ / step | リトライ実装 / retry mechanism | 試行回数 / attempts | 待機 / delay |
| ------------------------------- | --------------------------------------- | ------------------- | ------------------------------------------- |
| `actions/checkout@v6.0.2` | caller 側 / `Wandalen/wretry.action@v3` | 3 | 5000 ms |
| `actions/setup-node@v6` | `Wandalen/wretry.action@v3` | 3 | 5000 ms |
| `oven-sh/setup-bun@v2` | `Wandalen/wretry.action@v3` | 3 | 5000 ms |
| `bun install --frozen-lockfile` | shell 内ループ / inline shell loop | 3 | 5s → 10s(線形バックオフ / linear backoff) |

3 回全てが失敗した場合はステップ/ジョブを失敗させる。通常は 1 回目で成功
するためステップ時間はほぼ増えない。If all attempts fail, the step exits
non-zero — expected to be rare since the steady-state path succeeds on the
first try.

---

## 外部依存 / External dependencies

- [`Wandalen/wretry.action@v3`](https://github.com/Wandalen/wretry.action)
— `uses:` 形式のアクションをリトライ付きで実行する composite ラッパー。
Dependabot の `github-actions` ecosystem 対象(既存設定で自動更新)。
/ Composite wrapper that retries `uses:`-style actions. Tracked by the
repository's existing `github-actions` Dependabot configuration.

シェルレベルのコマンドリトライには既に `nick-fields/retry@v4` を使っているが
(`deploy-*.yml`)、本 action のターゲットは `uses:` の JS アクションなので
`wretry` のほうが適切。

`nick-fields/retry@v4` is already used elsewhere for shell-command retries
(`deploy-*.yml`), but it cannot wrap `uses:` invocations — hence `wretry`.

---

## 関連 / References

- Issue [#937](https://github.com/otomatty/zedi/issues/937) — 本 action の
導入経緯 / origin issue
- PR [#936](https://github.com/otomatty/zedi/pull/936) — 再現事象の出元 /
source of the observed flake
- [`oven-sh/setup-bun` README](https://github.com/oven-sh/setup-bun) —
`token` input は `${{ github.token }}` がデフォルト
- [`actions/runner#4295`](https://github.com/actions/runner/issues/4295)
— `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24` 関連の既知問題(Issue #937
Proposal B として今後再評価)
Loading
Loading