Skip to content

fix(contract): endpoint 対応表の引用符なしのキーも読む - #83

Merged
hitalin merged 1 commit into
mainfrom
fix/contract-endpoint-unquoted-keys
Oct 13, 2026
Merged

hitalin merged 1 commit into
mainfrom
fix/contract-endpoint-unquoted-keys

Conversation

@hitalin

@hitalin hitalin commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

なぜ

notedeck の endpoint 対応表は、識別子として書けるキー (meta / i / emojis / stats など) の引用符を biome が外している。同期スクリプトは引用符つきのキーしか読んでいなかったため、これらの 14 件がスナップショットから落ちていた。その結果、これらを呼ぶ配布物が「表に無い endpoint」と誤判定され、known-gaps で warning に降格していた。

notedeck 側の表には最初から載っていて、Mk:api でも許可される (notedeck-dev/notedeck#1250 のコメント参照)。

変更

  • 同期スクリプトが引用符なしのキーも読む。読めない行があれば、黙って落とさず失敗する
  • 前回と同じ notedeck のコミット (25a2567f) からスナップショットを取り直した。差分は落ちていた endpoint 14 件の追加だけ (437 件で notedeck の表と一致)
  • known-gaps の 4 件は誤検知だったので消し、設計ドキュメントの記述を直した

確認

pnpm contract:verify: 148 件中、合格 148 / 不合格 0。known-gaps による降格は 0 件。残る警告 9 件は今回とは無関係 (meta.permissions が Misskey の scope 形式で書かれている件)。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Corrected endpoint coverage in the service contract, including routes for metadata, identity, emojis, and statistics.
    • Contract synchronization now recognizes both quoted and unquoted endpoint keys, and reports entries it cannot parse instead of silently skipping them.
  • Documentation
    • Updated the known-gaps notes to reflect the corrected endpoint coverage.

notedeck の MISSKEY_ENDPOINT_RULES は biome が識別子として書けるキー
(meta / i / emojis / stats …) の引用符を外している。同期スクリプトは
引用符つきのキーしか読まず 14 件を落としていたため、それらを呼ぶ配布物が
「表に無い endpoint」と誤判定されていた (notedeck#1250)。

- 引用符なしのキーも読み、読めない行があれば黙って落とさず失敗する
- 同じ notedeck のコミット (25a2567f) からスナップショットを取り直す
- known-gaps の 4 件は誤検知だったので消す

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

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ed447cf4-4c50-456b-9775-a456102835e9
📥 Commits

Reviewing files that changed from the base of the PR and between 0efc8ea and 305343a.

📒 Files selected for processing (4)
  • docs/design/contract-check.md
  • scripts/contract/known-gaps.json
  • scripts/contract/notedeck-contract.json
  • scripts/sync-notedeck-contract.mjs

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

📝 Walkthrough

The endpoint parser now reads quoted keys and unquoted identifiers, and fails on unparseable nonblank lines. The contract adds endpoint mappings, while the known-gap list and contract-check documentation are updated.

Changes: Endpoint contract synchronization

Layer / File(s) Summary
Parse endpoint entries
scripts/sync-notedeck-contract.mjs
parseEndpoints now accepts quoted keys and unquoted identifiers. It skips blank lines and throws an error for an unparseable nonblank line.
Update endpoint contract records
scripts/contract/notedeck-contract.json, scripts/contract/known-gaps.json, docs/design/contract-check.md
The contract adds mappings for announcements, drive, emoji, emojis, endpoint, endpoints, i, meta, notes, ping, retention, stats, test, and users. The known-gap entries for meta, i, emojis, and stats are removed. The documentation describes those entries as parser false positives.

Priority: ➖ Normal

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 30534

The endpoint contract matches all 437 entries in the pinned NoteDeck source, so no actionable merge risk remains in these changes.

Pre-merge checks · Passed 5
Passed Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: the contract synchronization script now reads unquoted keys in the endpoint mapping.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (3 skipped: 3 …
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
misstore 305343a Oct 13 2026, 11:48 AM

@hitalin
hitalin merged commit 3c9da14 into main Oct 13, 2026
5 checks passed
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