Skip to content

docs: point docs at their sources instead of restating them - #8

Merged
musingfox merged 4 commits into
mainfrom
docs/audit-docs
Oct 1, 2026
Merged

musingfox merged 4 commits into
mainfrom
docs/audit-docs

Conversation

@musingfox

@musingfox musingfox commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

Doc audit follow-up, stacked on #7.

  • cpu-budget-10ms:
    • verify now runs the parse timing tests. With a 15 ms busy loop added to parseVideoPage, two tests failed, so the check does catch a slow parser.
    • The citation of a design-doc step outside the repo is replaced by Cloudflare's limits page.
    • The production cold-fetch peaks are recorded: 9 ms for a Facebook post and 8 ms for a large Instagram carousel.
  • The codemap moves from CLAUDE.md to a new ARCHITECTURE.md, and CLAUDE.md keeps one pointer to it.
  • CLAUDE.md no longer summarizes each spec. CodeRabbit's path instructions no longer restate the specs: its knowledge_base maps docs/spec/*.md onto the files each spec constrains with applyTo. Without applyTo, CodeRabbit applies a guideline file only to its own directory.
  • The bun.lock rule is shortened to one clause that names test/config.test.ts.

Test plan

  • bun run check passes on every commit.
  • Every spec's verify command passes.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 文件
    • 新增系統架構說明,整理請求流程、各部分職責、重要限制條件,以及快取與測試方式。
    • 更新效能文件,補充正式環境的 CPU 使用數據、超出預算時可能出現的錯誤,以及本機驗證結果的判讀方式。
    • 簡化專案與部署相關說明,並更新 Bun 版本與設定檔測試資訊。

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: musingfox/better-link/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 1048d8ee-ae7c-406c-b1ca-364087f04de2

📥 Commits

Reviewing files that changed from the base of the PR and between f8bbb5f and 7ab97a2.

📒 Files selected for processing (4)
  • .coderabbit.yaml
  • ARCHITECTURE.md
  • CLAUDE.md
  • docs/spec/cpu-budget-10ms.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

此變更更新 CodeRabbit 的檔案規則,新增架構文件,並修訂專案說明及 CPU 預算規格中的驗證、計時與超標資訊。

Changes

文件與審查規則

Layer / File(s) Summary
CodeRabbit 檔案規則
.coderabbit.yaml
README 路徑指示僅保留不得列出修復服務網域的要求。規格文件規則改為套用至 src/**/*.ts,其中 free-plan-bindings-only.md 另套用至 cloudflare.config.ts;原有路徑專屬指示及規則檔案清單已移除。
專案導覽與架構說明
CLAUDE.md, ARCHITECTURE.md
更新專案描述、Bun 版本與規格文件指示。新增架構文件,說明請求流程、模組職責、PostCache 注入方式,以及使用假快取、fetch spy 和 fixtures 的離線解析測試。
CPU 預算驗證說明
docs/spec/cpu-budget-10ms.md
新增篩選 CPU 相關測試的 verify 指令及正式環境計時紀錄。更新開發指令、本機 fixture 計時門檻,以及觀察 Cloudflare CPU 時間和超標狀態的方式。

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: claude

Merge Risk: ⚪ Minimal · up to 7ab97

This PR updates project guidance and CPU-budget documentation without changing Worker behavior. The concerns raised do not violate applicable project requirements, so no material merge risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to 7ab97

The change affects 3 systems.

Changed systems: ARCHITECTURE.md, CLAUDE.md, docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — ARCHITECTURE.md (service) was modified; 1 changed file maps to changed impact.
  • observed — CLAUDE.md (service) was modified; 1 changed file maps to changed impact.
  • observed — docs (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in ARCHITECTURE.md: 新增架構文件,說明 Worker 的轉換、分享頁面與媒體重新導向流程;列出主要模組及其職責,並記載 docs/spec/ 的不變條件、PostCache 快取注入方式,以及以假快取、fetch spy 和 fixtures 執行離線解析測試的設定。
    [code_block_low]
  • observed — Modified behavior in CLAUDE.md: 專案描述由列出平台별處理方式,改為概述 Worker 的連結轉換用途,並指向 README 的功能、端點及部署說明。
  • observed — Modified behavior in CLAUDE.md: 保留 lockfile 必須為版本 1、CI 執行命令及 Bun 版本的要求;補充 Workers Builds 預設使用 Bun 1.2.15、設定檔測試會檢查版本,以及使用 Bun 1.3 重新產生。CodeRabbit 說明改為要求在規格的 scope 新增路徑時同步更新其知識庫設定。
  • observed — Modified behavior in CLAUDE.md: 新增 ARCHITECTURE.md 的說明,指出該文件記錄模組、請求路由及測試替換 cache 與 fetch 的方式。
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 標題準確概括主要變更:將文件與規格來源建立關聯,並減少重複內容。
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

musingfox and others added 4 commits October 1, 2026 21:13
…ts sources

The spec said no runnable check existed, but the parser tests already time
the fixtures and fail above 10 ms, so verify now runs them. It also pointed at
a step of a design doc that lives outside the repo; name where Cloudflare
reports CPU overruns instead, and record the 8–9 ms cold-fetch peaks measured
with wrangler tail, which the 1–2 ms figure alone understated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The guide's summary of clean.ts had already missed the Threads xmt rule. The
codemap now names modules and points at the specs for their rules, and the
guide keeps one pointer to it and one to the README.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CLAUDE.md summarized each spec and CodeRabbit's path instructions restated
them again, so every spec change needed three edits. CodeRabbit applies
guideline files only to their own directory unless mapped with applyTo, which
is why the restatement existed; map docs/spec onto the files in each scope
instead. CLAUDE.md is a default guideline file and no longer needs listing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@musingfox
musingfox changed the base branch from build/cf-migration to main October 1, 2026 13:13
@musingfox
musingfox merged commit 73c4dd1 into main Oct 1, 2026
2 checks passed
@musingfox
musingfox deleted the docs/audit-docs branch October 1, 2026 13:21
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