Skip to content

docs: 仕様書の集約 export コマンドと鮮度チェック CI を追加 (#6906) - #6961

Open
ttokoro20240902 wants to merge 2 commits into
docs/spec-readme-colocationfrom
docs/spec-static-site
Open

ttokoro20240902 wants to merge 2 commits into
docs/spec-readme-colocationfrom
docs/spec-static-site

Conversation

@ttokoro20240902

Copy link
Copy Markdown
Contributor

概要(Overview・Refs Issue)

Refs #6906(Phase B / 戦略資料 §8.2)。#6909(Phase A)にスタックした PR(base = docs/spec-readme-colocation)。全 README.html を集約・出力する基盤と、顧客提出向けフィルタ、鮮度維持の CI を実装します。

未レビューのまま base(未保護ブランチ)へ手動マージされた旧 #6910 を巻き戻し、レビューを受けるため再提出したものです。内容は旧 #6910 と同一。

  • eccube:docs:export コマンド(--filter=all|customer)+ DocsExportService。全 README.html を出力先へ集約し、--filter=customer で data-customer="true" の章だけを残す。
  • 鮮度維持 CI(docs-check): アプリ起動不要の軽量チェッカー .github/bin/check-readme-docs.php。

静的サイト化・本番公開先(サブドメイン/doc4 との統合を含む)は未確定のため、本 PR には含めず Issue #6906 で検討します。顧客提出 PDF は出力 HTML のブラウザ印刷で派生。

方針(Policy)

  • 責務分離: HTML 走査・section フィルタは DocsExportService に集約し、コマンドは薄い入口に(Skill command 準拠)。
  • section フィルタは自己完結 HTML の整形・UTF-8 を保持(DOMDocument の数値実体参照化を避け、開始タグの属性のみで判定=本文が属性名に言及しても誤判定しない)。
  • 各 README.html は自己完結 HTML なので、ローカル閲覧・配布はビルド不要でそのまま開ける。静的サイト化の要否・本番公開先・doc4 との統合方針は Issue [4.4] コード近接の人間向け仕様ドキュメント(README.html)と静的サイト/PDF 化 — 実装設計 #6906 で継続検討(この PR はコマンドと鮮度 CI まで)。

テスト(Test)

  • PHPUnit 6 件(DocsExportServiceTest): customer フィルタで dev 章除去・customer 章保持、構造保持、文字化け防止、除外ディレクトリ、未知フィルタ例外、本文が属性名に言及しても除去。
  • QA: php-cs-fixer / rector(dry-run 差分なし)/ phpstan level 6 / phpunit すべて通過。
  • bin/console eccube:docs:export --filter=customer を end-to-end 実行し、出力・dev 章除去・文字化けなし・整形保持を確認。
  • docs-check CI がグリーン(section 属性・リンク・ポータル列挙)。

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 027cbdac-ae6d-4368-81b3-28c8ead63213

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/spec-static-site
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@ttokoro20240902 ttokoro20240902 added this to the 4.4.0 milestone Jul 29, 2026
@codecov

codecov Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.44%. Comparing base (a409400) to head (27aac6f).

Additional details and impacted files
@@                       Coverage Diff                       @@
##           docs/spec-readme-colocation    #6961      +/-   ##
===============================================================
+ Coverage                        78.42%   78.44%   +0.01%     
===============================================================
  Files                              651      652       +1     
  Lines                            31384    31408      +24     
===============================================================
+ Hits                             24614    24639      +25     
+ Misses                            6770     6769       -1     
Flag Coverage Δ
Unit 78.44% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

ttokoro20240902 and others added 2 commits October 1, 2026 17:19
base の docs/spec-readme-colocation (#6909) が作り直された結果, 本ブランチは
2026-07-30 時点の 4.4 の上に取り残されていた (esbuild 移行前で gulpfile.js と
html/bundle 783 件を抱え, base との差分が 1,196 ファイル / -26,066 行,
README の add/add 衝突 30 件)。現在の base から作り直し, 本 PR 固有の変更だけを
載せ直す。旧先端は 77915d7。

- src/Eccube/Service/Docs/DocsExportService.php: 全 README.html の集約と
  data-customer フィルタ
- src/Eccube/Command/DocsExportCommand.php: eccube:docs:export
- .github/bin/check-readme-docs.php + .github/workflows/docs-check.yml: 鮮度チェック
- .github/PULL_REQUEST_TEMPLATE.md: README 更新漏れのチェック項目

AGENTS.md と .gitignore への追記は #6909 側に既に取り込まれているため触らない。
鮮度チェッカーは作り直した base の README 構成でも合格することを実行して確認した。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- 終了コードを Command::SUCCESS / FAILURE にする(4.4 は Rector で定数へ統一済み)
- help を #[AsCommand] 属性へ移し, #[Autowire(param: ...)] を使う(4.4 の Rector 規則)
- docs-check の actions/checkout の固定 SHA を他の workflow と揃える
- Command の README に eccube:docs:export を載せる

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ttokoro20240902

Copy link
Copy Markdown
Contributor Author

base(#6909)を 4.4 へ rebase したのにあわせて、本 PR も新しい base の上へ載せ直しました(旧 #6910 と同じ内容 + 4.4 への追従)。

4.4 で変わった規約に合わせた点:

  • 終了コードを Command::SUCCESS / FAILURE に(4.4 は Rector で定数へ統一済み)
  • help を #[AsCommand] 属性へ移し、#[Autowire(param: 'kernel.project_dir')] を使う(4.4 の Rector 規則)
  • docs-check.yml の actions/checkout の固定 SHA を他の workflow と揃える
  • Command README の代表コマンド表に eccube:docs:export を載せる(旧 docs: 仕様書の集約 export コマンドと鮮度チェック CI を追加 (#6906) #6910 にはあり、再提出時に抜けていた行)

検証(ローカル Docker): PHPStan(src 全体)・PHPUnit(DocsExportServiceTest 6 tests)・cs-fixer・Rector すべて通過。check-readme-docs.php に合格し、eccube:docs:export --filter=customer が README.html 28 ファイルを出力。

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.

1 participant