GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs: ADR-0010 MiniSearch 採用見送りを記録 (#203) by ymnao · Pull Request #223 · ymnao/scripta

Conversation

@ymnao

@ymnao ymnao commented Jun 24, 2026

Copy link
Copy Markdown
Owner

概要

Issue #203 (全文検索エンジンに MiniSearch 採用を検討) の評価結果として、MiniSearch を採用しない判断を ADR-0010 に記録する。docs のみの追加で、コード変更なし。

関連 Issue

Closes #203

移行 Stage

  • Stage 3: 全文検索(ripgrep sidecar)

Stage 3 で確立済みの「旧 Rust ロジックを純 JS で 1:1 移植」方針に対する正式評価。docs/migration-plan.md 将来検討枠「数万ファイル規模で純 JS が遅くなった場合は ripgrep sidecar / napi-rs を検討」の判断材料を ADR で確定する位置付け。

変更内容

  • docs/adr/0010-minisearch-rejection.md を新規作成
    • Status: Rejected / Date: 2026-06-24
    • 判断の核 4 点:
      1. MiniSearch には char offset / line number を返す API が無い(公式 SearchResult は id / score / terms / queryTerms / match(term × field)のみ)
      2. SearchPanel の grep UX (matchStart/matchEnd 付き位置 highlight) を直接置換できない
      3. 既存 e2e (e2e/search.spec.ts:182-230) で emoji / サロゲートペア位置精度がピン留めされ、UX 変更は機能 regression リスク
      4. 数百〜数千ファイル想定で brute-force walk は十分高速、index 永続化 / worker thread 等の運用コストが UX 向上に見合わない
    • 代替案 3 件比較 (完全置換 / hybrid / 維持) で「自前 line-level scan 維持」を採用
    • 将来検討枠: workspace 万単位ユーザー出現時の再評価候補 (Orama / FlexSearch / ripgrep sidecar / napi-rs / MiniSearch tokenize 拡張) を記載
    • 関連 ADR: ADR-0005(自前実装の前例)/ ADR-0009(e2e position ピン留め)

動作確認

  • ADR ファイル形式は docs/adr/template.md および既存 ADR-0005 / 0009 と整合
  • Biome v1.x は markdown 対象外のため format/lint 不要(biome check で These paths were provided but ignored を確認)
  • コード変更なし → typecheck / test / build / e2e は CI に委譲(ローカル実行不要)

スクリーンショット

なし(docs のみ)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ymnao added 2 commits June 24, 2026 19:02
@ymnao
docs: ADR-0010 MiniSearch 採用見送りを記録 (#203)
c8ac67d
Issue #203 (全文検索エンジンに MiniSearch 採用を検討) の評価結果として、
MiniSearch を採用しない判断を ADR に記録する。

判断の核:
- MiniSearch には char offset / line number を返す API がなく、
  SearchPanel の grep UX (matchStart/matchEnd 付き位置 highlight) を
  直接実現できない
- 既存 e2e (e2e/search.spec.ts:182-230) で emoji・サロゲートペアでの
  位置精度がピン留めされており、UX 変更は機能 regression リスク
- 数百〜数千ファイル想定 (migration-plan.md Stage 3) で brute-force walk
  は十分高速、ranking-based UX への変更は scripta の grep 用途と方向違い
- index 永続化 / worker thread 等の運用コストが得られる改善に見合わない

代替案 3 件 (完全置換 / hybrid / 維持) を Pros/Cons 比較し、
「自前 line-level scan 維持」を採用。

将来 workspace が万単位に育ったユーザーが現れた場合の再評価候補
(MiniSearch tokenize 拡張 / Orama / FlexSearch / ripgrep sidecar /
napi-rs) は将来検討枠として記載。
@ymnao
chore: codeql-skip stub workflow を追加し docs-only PR の必須 check を成立させる
fe76fa9
branch protection で必須化している "Analyze (javascript-typescript)" は
codeql.yml の paths-ignore (**/*.md, docs/**, .github/ISSUE_TEMPLATE/**)
で skip される PR (本 PR #223 のような docs-only) では永遠に pending →
BLOCKED になる (GitHub 仕様: paths-ignore で skip された必須 check は
"neutral" でも "skipped pass" でもなく、check 自体が未生成扱い)。

GitHub 公式推奨パターンの「逆 paths filter で stub workflow を作り、
同名の check を success として生成する」を codeql-skip.yml として追加。
codeql.yml の paths-ignore と完全に補完する paths filter で trigger され、
同名 check Analyze (javascript-typescript) を即 success にする。

code + docs 混在 PR では codeql.yml と本 workflow の両方 trigger される
(paths-ignore は「全ファイルが該当」のみ skip、paths は「1 つでも該当」で
trigger のため) が、stub は数秒で完了するため実害なし。

参考: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/troubleshooting-required-status-checks#handling-skipped-but-required-checks
@ymnao
ymnao merged commit 5331c66 into main Jun 24, 2026
10 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ymnao
ymnao deleted the docs/minisearch-adr branch June 24, 2026 10:25
@ymnao ymnao mentioned this pull request Jun 24, 2026
chore: v0.5.0 リリース準備 #224
Merged
2 of 3 tasks
ymnao added a commit that referenced this pull request Jun 24, 2026
@ymnao
chore: v0.5.0 リリース準備 (#224)
6126d37
- `CHANGELOG.md` に v0.5.0 セクションを追加
  - Added: #202 → #221 (バックリンクパネル)
  - Fixed: #220 → #222 (タブ切替 undo 履歴消失)
  - Security: #204 → #210 (Electron Tier 1 補完), #205 → #218 (CI スキャン 3 件),
    #223 (codeql-skip stub), #201 (undici 9 件)
  - Internal: #203 → #223 (ADR-0010 MiniSearch Rejected)
  - Dependencies: #199 + #211-#217 → #219 (Dependabot 8 件集約)
- `package.json` の `version` を `0.4.0` → `0.5.0`
- HANDOFF の規約通り、本 commit では `pnpm <script>` を呼ばない
  (lockfile / node_modules には触れない)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

chore: 全文検索エンジンに MiniSearch (BM25+ / index 永続化) 採用を検討

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@ymnao
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.