Skip to content

feat: ブログ連携機能を撤去(ADR-0022 / #519)#530

Merged
yusuke0610 merged 3 commits into
mainfrom
feat/remove-blog-integration
Jul 21, 2026
Merged

feat: ブログ連携機能を撤去(ADR-0022 / #519)#530
yusuke0610 merged 3 commits into
mainfrom
feat/remove-blog-integration

Conversation

@yusuke0610

@yusuke0610 yusuke0610 commented Jul 21, 2026

Copy link
Copy Markdown
Owner

概要

機能整理ロードマップ #517 のサブ issue #519ADR-0022#518 / PR #529)に従い、ブログ連携(Zenn / note 同期・記事一覧・投稿スコアリング)を全量撤去する。流儀は ADR-0008 と同じく「残さず消す」。

⚠️ マージ順序: 本 PR は ADR-0022 を起票する #529 のマージ後にマージしてください(ADR が先に Accepted で入る前提)。

撤去内容

backend

  • routers/blog/services/blog/repositories/blog.pymodels/blog.pyschemas/blog.py を削除、main.py/各 __init__.py の登録解除、messages.json の blog キー(error 6 / success 3)削除
  • context_builder._build_blog_context とブログ依存 import を削除。Agent の入力契約移行として prompt 2 本(agent_career_summary / agent_self_pr)と test 2 本(test_agent / test_agent_context_builder)の blog_context 前提を同一 PR で更新
  • drop マイグレーション 0049(子→親順で blog_article_tagsblog_articlesblog_accounts を削除。存在ガード付き。実 SQLite で base→head 適用を検証済み。downgrade は機能撤去のため no-op)
  • security テストの blog ケースを削除(IDOR/mass-assignment/rate-limit/SQLi/boundary/no-auth の攻撃クラスは resume/notification/github_link で担保継続、coverage 欠落なし)

web

  • BlogPagecomponents/blog/api/blog.tshooks/blog/・未使用の Zenn/Qiita/Note アイコンを削除、routes.tsx/SidebarLayout の導線と messages.ts の blog 文言削除
  • api/indexpathstypes から blog を除去、generated.ts を再生成(codegen-drift 対策)
  • E2E: 「別タブ遷移」検証を GitHub 連携(/github_link)へ張り替え(navigation / career-dirty-indicator / auth の 3 spec)

docs / rules

  • READMEapi.mddata-model.md の blog 記述を削除
  • .claude/rules(architecture/agent/database)を整合更新、layers.md の blog 教材例を github intelligence collector 例へ差し替え
  • pyproject の mutmut scope から削除済み scorer.py を除去、CLAUDE.md/skills の blog 例を更新

検証

  • make ci green(backend 643 passed / web 376 passed / ruff・pyright 0 / adr-index・tdd・env-keys OK / codegen-drift なし)
  • E2E 38 passed(ページ削除 + サイドバー変更のため必須)
  • 新規 drop migration は実 SQLite で base→head 適用を確認(本番 libSQL は smoke-backend が検証)

受け入れ条件

  • make ci green・E2E pass
  • grep -ri blog backend/app web/src で本番コードにブログ参照が残っていない(テスト・migration 履歴・既存 ADR は除く)

残す blog 参照(意図的)

既存 ADR(0006/0007/0009/0010)と migration 履歴のみ。当時の決定の記録として不変(ADR-0008 が 0004 を遡及編集しなかったのと同じ流儀)。

Closes #519

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 変更
    • ブログ連携(アカウント管理・記事同期・スコア)を終了し、関連画面や導線(サイドバーの /blog など)を削除しました。
    • キャリア要約・自己PRの参照情報をGitHub分析に限定しました。
    • GitHub連携機能は引き続き利用できます。
  • ドキュメント
    • README、API仕様、画面構成の説明をGitHub中心に更新しました。

経歴書へ還流せず投稿頻度スコアが逆効果になり得るブログ連携(Zenn/note 同期・
記事一覧・スコアリング)を全量撤去する。ADR-0008 の流儀(残さず消す)に倣う。

backend:
- routers/blog・services/blog・repositories/blog・models/blog・schemas/blog を削除
- main.py / 各 __init__.py の登録解除、messages.json の blog キー削除
- context_builder の _build_blog_context とブログ依存 import を削除。prompt
  (agent_career_summary / agent_self_pr)と test(test_agent /
  test_agent_context_builder)の blog_context 前提を同一 PR で更新
- drop マイグレーション 0049 を追加(子→親順で 3 テーブル削除。実 SQLite で
  base→head 適用を検証。downgrade は機能撤去のため no-op)
- security テストの blog ケースを削除(攻撃クラスは resume/notification/
  github_link で担保継続)

web:
- BlogPage・components/blog・api/blog・hooks/blog・未使用の Zenn/Qiita/Note
  アイコンを削除、routes/SidebarLayout の導線と messages.ts の blog 文言を削除
- api/index・paths・types から blog を除去、generated.ts を再生成(codegen-drift)
- E2E の「別タブ遷移」検証を GitHub 連携(/github_link)へ張り替え(38 pass)

docs / rules:
- README・api.md・data-model.md の blog 記述を削除
- .claude/rules(architecture/agent/database)を整合更新、layers.md の blog
  教材例を github intelligence collector 例へ差し替え
- pyproject の mutmut scope から削除済み scorer.py を除去、CLAUDE.md/skills の
  blog 例を更新

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation backend バックエンド web フロントエンド (web) test テスト追加・修正 agent DevForge Agent feature 新機能 labels Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yusuke0610, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 80183d43-e0b6-4c95-a2ae-f5583906e183

📥 Commits

Reviewing files that changed from the base of the PR and between 56cd5b0 and 46be309.

📒 Files selected for processing (1)
  • web/scripts/audit-check.mjs
📝 Walkthrough

Walkthrough

ブログ連携をバックエンド、フロントエンド、DB、エージェント参照コンテキスト、テスト、生成型、ドキュメントから削除し、GitHub連携中心の構成へ更新しています。

Changes

Blog integration removal

Layer / File(s) Summary
Backend and database surface removal
backend/app/..., backend/alembic_migrations/..., backend/tests/conftest.py, backend/pyproject.toml
ブログのテーブル、モデル、リポジトリ、APIルーター、スキーマ、メッセージ、関連エクスポートを削除し、GitHubルーターを登録します。
GitHub-only agent context
backend/app/services/agent/..., backend/app/prompts/..., backend/tests/test_agent*.py
エージェント参照コンテキストをGitHub分析のみに限定し、ブログコンテキスト生成とテストを削除します。
Frontend API and navigation removal
web/src/api/..., web/src/router/..., web/src/components/..., web/src/constants/...
ブログAPI型、パス、ページ、フック、サイドバー導線、メッセージを削除し、GitHub連携の導線と型へ更新します。
Security and end-to-end coverage
backend/tests/security/..., web/e2e/...
ブログ関連の認証・IDOR・SQLインジェクション・レート制限テストを削除し、GitHub連携を対象にE2E検証を更新します。
Documentation and development rules
.claude/..., README.md, docs/...
アーキテクチャ、DB設計、API一覧、README、レビュー規則からブログ連携の記述を削除します。

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related issues

  • yusuke0610/devforge#518 — ブログ連携のバックエンド、フロントエンド、DB、エージェントコンテキスト削除の目的が一致します。

Possibly related PRs

Suggested labels: ci

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Core blog code was removed, but the PR summary does not show the required TaskType deletion or the web errorCodes/errorMessages removals from #519. Remove the remaining blog TaskType and frontend error-code/message entries, then verify no backend/app or web/src blog references remain.
Out of Scope Changes check ⚠️ Warning The npm audit allowlist change in web/scripts/audit-check.mjs is unrelated to blog removal and falls outside #519. Move the advisory allowlist update to a separate security/audit PR, or justify it in the linked issue scope before merging.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main change: removing blog integration, and it matches the PR scope.
Docstring Coverage ✅ Passed Docstring coverage is 86.96% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/remove-blog-integration

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.

#519)

新規公開された js-yaml の advisory(YAML merge-key チェーンによる二次的 CPU
消費 / high)が npm audit ゲートで #530 の CI を落としていた。openapi-typescript
(dev) → @redocly/openapi-core 経由の推移的依存で、自前 backend の OpenAPI スキーマ
(信頼済み)を codegen する時だけ使う。本番バンドル非到達・攻撃者制御の YAML を
parse しないため到達不能。npm audit fix でも解消できないため、既存 esbuild 2 件と
同じく理由・見直し期限付きで allowlist に時限追加する。

(同内容の独立 PR #531 と重複するため、本コミットが入れば #531 はクローズ可能)

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

@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 `@web/scripts/audit-check.mjs`:
- Around line 27-35: Update the ALLOWLIST handling in the audit-check script,
including the GHSA-52cp-r559-cp3m entry, to store reviewBy as a machine-readable
expiry and validate it before allowing an advisory. Reject entries with missing
or malformed expiry values and fail closed when the expiry has passed; retain
allowance only while the expiry is valid.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0456d52a-a11a-4680-a0da-479de052dbaf

📥 Commits

Reviewing files that changed from the base of the PR and between b33792e and 56cd5b0.

📒 Files selected for processing (1)
  • web/scripts/audit-check.mjs

Comment thread web/scripts/audit-check.mjs
CodeRabbit 指摘(Major): allowlist は reviewBy を文字列で持つだけで期限を強制
しておらず、見直し忘れで advisory が恒久的に握り潰される恐れがあった。

- reviewBy を "YYYY-MM-DD (説明)" の先頭日付としてパースし、実行時 UTC 日付と比較
- 期限切れ・不正日付(YYYY-MM-DD で始まらない / 暦上あり得ない値)のエントリは
  fail-closed(CI を落とす)。allowlist は期限内のみ有効になる
- 既存 esbuild 2 件・js-yaml 1 件はいずれも reviewBy=2026-09-30(未来)のため現状 pass

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@yusuke0610
yusuke0610 merged commit 090daeb into main Jul 21, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent DevForge Agent backend バックエンド documentation Improvements or additions to documentation feature 新機能 test テスト追加・修正 web フロントエンド (web)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ブログ撤去 2/2] 撤去実装: backend / web / DB / codegen

1 participant