Skip to content

Commit 52645db

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix-issue1472-1615-1616
# Conflicts: # src/CodeIndex/Mcp/McpToolHandlers.cs
2 parents b5be6d3 + bb8ba98 commit 52645db

31 files changed

Lines changed: 1298 additions & 95 deletions

.github/workflows/release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,63 @@ jobs:
268268
shell: pwsh
269269
run: Get-ChildItem publish -Filter *.pdb -Recurse | Remove-Item
270270

271+
- name: Authenticode sign Windows executable
272+
if: runner.os == 'Windows'
273+
shell: pwsh
274+
env:
275+
WIN_SIGNING_CERT_BASE64: ${{ secrets.WIN_SIGNING_CERT_BASE64 }}
276+
WIN_SIGNING_CERT_PASSWORD: ${{ secrets.WIN_SIGNING_CERT_PASSWORD }}
277+
run: |
278+
if ([string]::IsNullOrWhiteSpace($env:WIN_SIGNING_CERT_BASE64)) {
279+
throw "WIN_SIGNING_CERT_BASE64 secret is required to Authenticode-sign Windows release binaries."
280+
}
281+
if ([string]::IsNullOrWhiteSpace($env:WIN_SIGNING_CERT_PASSWORD)) {
282+
throw "WIN_SIGNING_CERT_PASSWORD secret is required to Authenticode-sign Windows release binaries."
283+
}
284+
285+
$exe = Join-Path (Resolve-Path publish) "cdidx.exe"
286+
if (-not (Test-Path -LiteralPath $exe)) {
287+
throw "Published Windows executable was not found: $exe"
288+
}
289+
290+
$pfxPath = Join-Path $env:RUNNER_TEMP "cdidx-signing.pfx"
291+
[IO.File]::WriteAllBytes($pfxPath, [Convert]::FromBase64String($env:WIN_SIGNING_CERT_BASE64))
292+
293+
$password = ConvertTo-SecureString $env:WIN_SIGNING_CERT_PASSWORD -AsPlainText -Force
294+
$cert = Import-PfxCertificate `
295+
-FilePath $pfxPath `
296+
-CertStoreLocation Cert:\CurrentUser\My `
297+
-Password $password `
298+
-Exportable:$false
299+
try {
300+
if (-not $cert.Thumbprint) {
301+
throw "Imported signing certificate did not expose a thumbprint."
302+
}
303+
304+
$signtool = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin" -Recurse -Filter signtool.exe |
305+
Where-Object { $_.FullName -match '\\x64\\signtool\.exe$' } |
306+
Sort-Object FullName -Descending |
307+
Select-Object -First 1
308+
if (-not $signtool) {
309+
throw "signtool.exe was not found in the Windows Kits installation."
310+
}
311+
312+
& $signtool.FullName sign /fd SHA256 /td SHA256 /tr http://timestamp.digicert.com /sha1 $cert.Thumbprint $exe
313+
if ($LASTEXITCODE -ne 0) {
314+
throw "signtool sign failed with exit code $LASTEXITCODE."
315+
}
316+
317+
& $signtool.FullName verify /pa /v $exe
318+
if ($LASTEXITCODE -ne 0) {
319+
throw "signtool verify failed with exit code $LASTEXITCODE."
320+
}
321+
} finally {
322+
if ($cert.Thumbprint) {
323+
Remove-Item -LiteralPath "Cert:\CurrentUser\My\$($cert.Thumbprint)" -Force -ErrorAction SilentlyContinue
324+
}
325+
Remove-Item -LiteralPath $pfxPath -Force -ErrorAction SilentlyContinue
326+
}
327+
271328
- name: Add license and trademark notices to publish output (Linux/macOS)
272329
if: runner.os != 'Windows'
273330
run: cp LICENSE LICENSES/FSL-1.1-ALv2.txt LICENSES/Apache-2.0.txt COMMERCIAL_LICENSE.md INTEGRATION_POLICY.md TRADEMARKS.md publish/ && cp -R LICENSES publish/

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,14 @@ the per-platform `CodeIndex-<rid>.tar.gz` / `.zip` binaries:
233233
| `sha256sums.txt` | SHA-256 of every release asset (including the SBOM). `install.sh` uses it to verify the downloaded tarball before placing anything under `$HOME/.local/bin/`. |
234234
| `cdidx.sbom.cdx.json` | CycloneDX 1.x JSON Software Bill of Materials covering every NuGet dependency (including the bundled `SQLitePCLRaw` native asset) so compliance reviewers (SOC2, FedRAMP-style) and scanners (Snyk, Trivy, Grype) can audit transitive dependencies without re-deriving them from `.deps.json`. |
235235

236+
Windows ZIP releases contain an Authenticode-signed `cdidx.exe`. After
237+
extracting the archive on Windows, verify the signature and timestamp before
238+
trusting the executable:
239+
240+
```powershell
241+
Get-AuthenticodeSignature .\cdidx.exe | Format-List Status,SignerCertificate,TimeStamperCertificate
242+
```
243+
236244
Quick check after downloading both files from the release page:
237245

238246
```bash
@@ -457,6 +465,14 @@ NuGet パッケージは .NET グローバルツールとして公開されて
457465
| `sha256sums.txt` | 各リリースアセット(SBOM を含む)の SHA-256。`install.sh``$HOME/.local/bin/` に何も書き込む前に tarball をこのファイルで検証します。 |
458466
| `cdidx.sbom.cdx.json` | CycloneDX 1.x JSON 形式の Software Bill of Materials。同梱の `SQLitePCLRaw` ネイティブアセットを含む全 NuGet 依存を列挙するため、SOC2 / FedRAMP 系のコンプライアンスレビューや Snyk / Trivy / Grype などのスキャナーが `.deps.json` から再構築せずに推移的依存を監査できます。 |
459467

468+
Windows ZIP release に含まれる `cdidx.exe` は Authenticode 署名済みです。
469+
Windows で archive を展開したあと、実行ファイルを信頼する前に署名と
470+
timestamp を確認してください。
471+
472+
```powershell
473+
Get-AuthenticodeSignature .\cdidx.exe | Format-List Status,SignerCertificate,TimeStamperCertificate
474+
```
475+
460476
リリースページから両ファイルをダウンロードしたあとの簡易チェック例:
461477

462478
```bash

USER_GUIDE.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,13 @@ sha256sum -c sha256sums.txt
450450
The GPG signature verifies the checksum manifest through the release signing
451451
key.
452452

453+
Windows release ZIPs also contain an Authenticode-signed `cdidx.exe`. After
454+
extracting the archive, verify that Windows trusts the signature and timestamp:
455+
456+
```powershell
457+
Get-AuthenticodeSignature .\cdidx.exe | Format-List Status,SignerCertificate,TimeStamperCertificate
458+
```
459+
453460
Release workflows also emit GitHub build provenance attestations for the
454461
published archives, SBOM, checksum manifest, and checksum signature. Verify
455462
that an artifact was produced by this repository's GitHub Actions release
@@ -633,6 +640,7 @@ cdidx ./myproject
633640
cdidx ./myproject --rebuild # full rebuild from scratch
634641
cdidx ./myproject --verbose # show per-file details
635642
cdidx ./myproject --duration-format seconds # show elapsed time as seconds
643+
cdidx ./myproject --notify=osc9 # terminal notification after long runs
636644
cdidx ./myproject --watch # stay running and reindex on file changes
637645
cdidx ./myproject --watch --debounce 200 # coalesce bursts within a 200 ms window
638646
```
@@ -678,7 +686,9 @@ Done.
678686

679687
During long-running indexing on an interactive terminal, `Indexing...` stays live as a spinner instead of dropping to a fixed line until the next 50-file progress update. Warnings still print immediately, but the spinner resumes right after each warning so the run does not look frozen. When stdout is redirected (for example `cdidx . > out.txt`), cdidx prints a single `Indexing...` line to stdout, keeps warnings on stderr, and emits only line-based progress updates to stdout.
680688

681-
Human output formats elapsed index time with unit labels by default: milliseconds under 1 second, seconds under 1 minute, minutes/seconds under 1 hour, and hours/minutes/seconds after that. Use `--duration-format seconds` for decimal seconds or `--duration-format hms` for the legacy `HH:MM:SS` display. JSON output continues to expose raw `elapsed_ms` for machine consumers.
689+
Human output uses invariant numeric formatting (`.` decimal separator and `,` thousands separators) regardless of the process locale, matching JSON's culture-independent contract. Elapsed index time uses unit labels by default: milliseconds under 1 second, seconds under 1 minute, minutes/seconds under 1 hour, and hours/minutes/seconds after that. Use `--duration-format seconds` for decimal seconds or `--duration-format hms` for the legacy `HH:MM:SS` display. JSON output continues to expose raw `elapsed_ms` for machine consumers.
690+
691+
For index runs that take at least five seconds, `--notify=<auto|bell|osc9|desktop|none>` controls a completion signal on stderr. `auto` rings the terminal bell only for interactive terminals and stays silent for redirected output; `desktop` currently maps to OSC 9 terminal notification text for terminals that support it. `CDIDX_NOTIFY` sets the same default, and `--quiet` suppresses completion notifications.
682692

683693
Machine-readable output also reports the post-run readiness bits directly:
684694

@@ -2323,6 +2333,7 @@ name-based tools では `exactName` を使い、`exact` は後方互換 client
23232333
| Search snippet lines | `8``--snippet-lines`、最大 `20`| CLI help と search runner |
23242334
| Max line width | `512``--max-line-width``0` で無効) | `LineWidthFormatter.DefaultMaxLineWidth` |
23252335
| Index max file size | `CDIDX_MAX_FILE_BYTES` 未設定時は `4MiB` | index runner help |
2336+
| Index completion notification | `auto`(interactive terminal は bell、redirected output は none)。`--notify` / `CDIDX_NOTIFY` で上書き | index runner help |
23262337
| Watch debounce | `500` ms(`--debounce`| index watch runner |
23272338
| Status stale-after hint | `24h``--stale-after` / `CDIDX_STALE_AFTER` / `.cdidxrc.json` で上書き | status runner |
23282339
| Color mode | `auto``--color` / `CLICOLOR_FORCE` / `NO_COLOR` / `CLICOLOR=0` で上書き | `ConsoleUi` |
@@ -2437,6 +2448,39 @@ runtime の管理方法とネットワーク条件に合わせて install channe
24372448
完全な比較、package maintainer guidance、winget / apt / rpm / Snap /
24382449
Flatpak などの予定チャネルは [DISTRIBUTION.md](DISTRIBUTION.md) を参照してください。
24392450

2451+
### リリースアセットの検証
2452+
2453+
GitHub releases は、すべての archive と SBOM asset を対象にした
2454+
`sha256sums.txt` と、detached GPG signature の `sha256sums.txt.asc`
2455+
公開します。download した release artifact を信頼する前に checksum manifest
2456+
を検証してください。
2457+
2458+
```bash
2459+
gpg --verify sha256sums.txt.asc sha256sums.txt
2460+
sha256sum -c sha256sums.txt
2461+
```
2462+
2463+
GPG signature は release signing key を通じて checksum manifest を検証します。
2464+
2465+
Windows release ZIP にも Authenticode 署名済みの `cdidx.exe` が含まれます。
2466+
archive を展開したあと、Windows が署名と timestamp を信頼していることを
2467+
確認してください。
2468+
2469+
```powershell
2470+
Get-AuthenticodeSignature .\cdidx.exe | Format-List Status,SignerCertificate,TimeStamperCertificate
2471+
```
2472+
2473+
release workflow は、公開された archive、SBOM、checksum manifest、checksum
2474+
signature に対する GitHub build provenance attestation も出力します。artifact が
2475+
この repository の GitHub Actions release workflow で生成されたことを検証できます。
2476+
2477+
```bash
2478+
gh attestation verify CodeIndex-linux-x64.tar.gz -R Widthdom/CodeIndex
2479+
```
2480+
2481+
GitHub attestation は、その artifact が repository workflow identity により
2482+
生成されたことを検証します。
2483+
24402484
### 方法A: ワンライナーインストール(.NET 不要)
24412485

24422486
コンテナ、CI、Linux/macOS 環境で .NET SDK なしで使えます。
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
category: fixed
3+
issues:
4+
- 1417
5+
affected:
6+
- src/CodeIndex/Mcp/McpServer.cs
7+
- src/CodeIndex/Mcp/McpToolHandlers.cs
8+
- tests/CodeIndex.Tests/McpServerTests.cs
9+
---
10+
11+
## English
12+
13+
- **MCP tool argument type mismatches now return JSON-RPC invalid params (#1417)** — wrong JSON types such as a string `limit` now produce `-32602` with structured parameter details instead of falling through to an internal/tool failure.
14+
15+
## 日本語
16+
17+
- **MCP ツール引数の型不一致が JSON-RPC invalid params を返すようになりました (#1417)** — 文字列の `limit` など誤った JSON 型は、internal/tool failure に落ちず `-32602` と構造化されたパラメータ詳細を返します。
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
category: fixed
3+
issues:
4+
- 1438
5+
affected:
6+
- src/CodeIndex/Indexer/References/ReferenceExtractor.Preparation.cs
7+
- src/CodeIndex/Indexer/References/ReferenceExtractor.TypeReferences.cs
8+
- tests/CodeIndex.Tests/ReferenceExtractorTests.cs
9+
---
10+
11+
## English
12+
13+
- **Python multi-line f-strings no longer emit references from literal text (#1438)** — triple-quoted f-string bodies are masked across physical lines while interpolation expressions still contribute real reference edges.
14+
15+
## 日本語
16+
17+
- **Python の複数行 f-string がリテラル本文から参照を出さなくなりました (#1438)** — 三重引用符の f-string 本文を物理行をまたいでマスクしつつ、補間式内の実参照は引き続き抽出します。
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
category: fixed
3+
issues:
4+
- 1469
5+
affected:
6+
- src/CodeIndex/Mcp/McpServer.cs
7+
- tests/CodeIndex.Tests/McpServerTests.cs
8+
---
9+
10+
## English
11+
12+
- **MCP startup logs no longer expose the full DB path by default (#1469)** — the startup banner now logs only a sanitized DB filename unless `CDIDX_DEBUG=unsafe` is set.
13+
14+
## 日本語
15+
16+
- **MCP 起動ログが既定で完全な DB パスを公開しないようになりました (#1469)** — 起動バナーは `CDIDX_DEBUG=unsafe` が設定されていない限り、サニタイズ済みの DB ファイル名だけを記録します。
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
category: fixed
3+
issues:
4+
- 1470
5+
affected:
6+
- src/CodeIndex/Mcp/McpServer.cs
7+
- tests/CodeIndex.Tests/McpServerTests.cs
8+
---
9+
10+
## English
11+
12+
- **MCP catch-all error responses now hide exception details by default (#1470)** — unexpected tool and loop failures return generic wire messages while preserving detailed diagnostics in stderr, with verbose responses limited to `CDIDX_DEBUG=unsafe`.
13+
14+
## 日本語
15+
16+
- **MCP catch-all エラー応答が既定で例外詳細を隠すようになりました (#1470)** — 予期しないツール/ループ失敗は wire 上では汎用メッセージを返し、詳細診断は stderr に残します。詳細応答は `CDIDX_DEBUG=unsafe` の場合だけ有効です。
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
category: fixed
3+
issues:
4+
- 1629
5+
affected:
6+
- src/CodeIndex/Cli/ConsoleUi.cs
7+
---
8+
9+
## English
10+
11+
- **Console width detection no longer hides unexpected failures (#1629)** — width probing now catches only documented console exceptions, records fallback use, honors `COLUMNS` after failed probing, and emits a one-time verbose trace.
12+
13+
## 日本語
14+
15+
- **console width 検出が想定外の失敗を隠さないようになりました (#1629)** — 幅取得は既知の console 例外だけを捕捉し、fallback 使用を記録し、失敗時に `COLUMNS` を優先し、verbose で一度だけ trace を出します。
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
category: fixed
3+
issues:
4+
- 1662
5+
affected:
6+
- src/CodeIndex/Cli/ConsoleUi.cs
7+
- src/CodeIndex/Cli/IndexCommandRunner.FullScan.cs
8+
- src/CodeIndex/Cli/IndexCommandRunner.Update.cs
9+
- USER_GUIDE.md
10+
---
11+
12+
## English
13+
14+
- **Human CLI index output now uses invariant numeric formatting (#1662)** — progress and index summaries consistently use culture-independent decimal and thousands separators to match JSON-facing expectations.
15+
16+
## 日本語
17+
18+
- **人間向け CLI index 出力が invariant な数値形式を使うようになりました (#1662)** — progress と index summary は JSON の期待と揃うよう、culture に依存しない小数点と桁区切りを一貫して使います。
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
category: added
3+
issues:
4+
- 1835
5+
affected:
6+
- src/CodeIndex/Cli/ConsoleUi.cs
7+
- src/CodeIndex/Cli/IndexCommandRunner.Parse.cs
8+
- src/CodeIndex/Cli/IndexCommandRunner.FullScan.cs
9+
- src/CodeIndex/Cli/IndexCommandRunner.Update.cs
10+
- src/CodeIndex/Cli/CliFlagSchema.cs
11+
- USER_GUIDE.md
12+
---
13+
14+
## English
15+
16+
- **Added long index completion notifications (#1835)**`cdidx index` now supports `--notify=<auto|bell|osc9|desktop|none>` plus `CDIDX_NOTIFY`, with quiet/json-safe suppression and a five-second threshold for human runs.
17+
18+
## 日本語
19+
20+
- **長い index 完了通知を追加しました (#1835)**`cdidx index``--notify=<auto|bell|osc9|desktop|none>``CDIDX_NOTIFY` に対応し、人間向け実行では5秒以上の run だけ通知し、quiet/json では抑制します。

0 commit comments

Comments
 (0)