Skip to content

集約ハッシュの説明を実際の選別後ファイル集合に合わせる#101

Merged
TwoSquirrels merged 2 commits into
mainfrom
docs/hash-file-set
Jul 15, 2026
Merged

集約ハッシュの説明を実際の選別後ファイル集合に合わせる#101
TwoSquirrels merged 2 commits into
mainfrom
docs/hash-file-set

Conversation

@TwoSquirrels

Copy link
Copy Markdown
Owner

Closes #83

概要

集約ハッシュの実装 (hash::aggregate) は fs::source::walk_sources の選別後 — 隠しファイル・C++ ソース以外の拡張子・バイナリを除外し、拡張子なしのヘッダーは含む — のソースファイルを対象にしているが、spec の tags.json 節と hash.rs 自身のコメントは「path 以下の全ファイル」と説明していた。文書とコメントを実装に合わせる。

  • docs/spec.*hash フィールドの説明を選別後の集合に修正し、選別が識別子抽出の走査対象と共通であることを明記
  • docs/spec.* の「ライブラリの変更検知」節に、README やバイナリ資産などバンドルに影響しないファイルの変更では検知しないという帰結を追記
  • src/library/hash.rs のモジュール・関数コメントも同様に修正 (コードの動作変更なし)

fmt --check・clippy pedantic・test 通過済み。

🤖 Generated with Claude Code

実装は walk_sources の選別 (隠しファイル・C++ ソース以外の拡張子・
バイナリを除外) 後のソースファイルを対象にしており、spec と hash.rs
のコメントの「全ファイル」という記述と食い違っていた。変更検知の節
にも、選別外のファイルでは検知しないという帰結を書き足す。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 402531ff-a138-4da4-bff2-a2bbed4aca45

📥 Commits

Reviewing files that changed from the base of the PR and between 6c2abac and c429483.

📒 Files selected for processing (2)
  • docs/spec.ja.md
  • docs/spec.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/spec.md
  • docs/spec.ja.md

📝 Walkthrough

Summary by CodeRabbit

  • ドキュメント
    • ライブラリ変更検知は更新日時ではなくファイル内容に基づくことを、集約ハッシュの前提として明確化しました。
    • tags.json の設定に従って選別された“ソースファイル”のみを検証対象とし、READMEやバイナリ等の除外対象は検知しない仕様を追記しました。
    • tags.json のハッシュ対象範囲(隠しファイル/非C-C++拡張/バイナリ除外、拡張なしヘッダーの扱い)と、std がハッシュを持たない点を明記しました。

Walkthrough

ライブラリ集約ハッシュの対象を全ファイルから選別済みソースファイルへ明確化し、選別条件と変更検知の範囲を日本語・英語仕様書およびコードコメントに反映した。

Changes

ライブラリハッシュ仕様

Layer / File(s) Summary
集約ハッシュ対象範囲の明確化
src/library/hash.rs, docs/spec.md, docs/spec.ja.md
集約ハッシュが source::walk_sources で選別されたソースファイルを対象とし、隠しファイル・非C/C++拡張子・バイナリを除外し、拡張子なしヘッダーを含むことを明記した。READMEなど選別外ファイルの変更は検知対象外であり、stdhash を持たない点も維持した。

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Poem

うさぎが跳ねて、仕様を整え
ソースの範囲を月夜に照らす
READMEは静かに眠り
ハッシュは内容を追いかける
ぴょん、と誤検知も消えました

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed タイトルは、集約ハッシュの説明を実際の選別後ファイル集合に合わせる変更を端的に示しています。
Description check ✅ Passed 説明は、仕様とコメントを実装に合わせるという変更内容と整合しています。
Linked Issues check ✅ Passed Issue #83 の要件どおり、選別後のソースファイル集合に合わせて spec と hash.rs の説明を修正しています。
Out of Scope Changes check ✅ Passed 変更は仕様・コメント修正に限定されており、リンクされた目的から外れる内容は見当たりません。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@TwoSquirrels

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/spec.md`:
- Line 133: docs/spec.md の 133-133 と docs/spec.ja.md の 133-133
を、src/fs/source.rs の walk_sources が選択する条件に合わせ、拡張子なしの全パス、.c を含む許可拡張子、NUL
バイトによる簡易バイナリ判定を正確に記述してください。docs/spec.md の 68-68 と docs/spec.ja.md の 68-68
は、「バンドルに影響しないファイル」ではなく、walk_sources の選別で除外されたファイルの変更のみが検知対象外となるよう修正してください。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8d385acc-d61d-4fe4-ba9e-79c92621858e

📥 Commits

Reviewing files that changed from the base of the PR and between d3abbac and 6c2abac.

📒 Files selected for processing (3)
  • docs/spec.ja.md
  • docs/spec.md
  • src/library/hash.rs

Comment thread docs/spec.md Outdated
「C++ ソース以外の拡張子を除く」は .c 等の C 由来拡張子を含む実装
より狭く、拡張子なしはヘッダーに限らず全ファイルが対象で、バイナリ
判定は NUL バイトの簡易判定 (レビュー指摘)。変更検知節の「バンドル
に影響しない」という言い方も、選別外という事実ベースの表現に直す。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@TwoSquirrels
TwoSquirrels merged commit e0029b8 into main Jul 15, 2026
10 checks passed
@TwoSquirrels
TwoSquirrels deleted the docs/hash-file-set branch July 15, 2026 16:17
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.

spec の「path 以下の全ファイルからハッシュ」という記述が、実際の選別後ファイル集合と食い違う

1 participant