Skip to content

🔧 chore: release skill とリリース記録のレビュー指摘を反映#277

Merged
touyou merged 1 commit into
mainfrom
chore/release-skill-improvements
May 20, 2026
Merged

🔧 chore: release skill とリリース記録のレビュー指摘を反映#277
touyou merged 1 commit into
mainfrom
chore/release-skill-improvements

Conversation

@touyou
Copy link
Copy Markdown
Member

@touyou touyou commented May 20, 2026

Summary

PR #275 / PR #276 で受けたレビュー指摘を反映し、リリースで実際に起きたトラブル(NPM_TOKEN 関連)を skill のトラブルシューティングに統合します。

レビュー指摘への対応

Codex (P1) — タグ作成手順を SHA 明示型に修正

旧: git tag vX.Y.Z (HEAD にタグを打つ)
新:
```bash
RELEASE_SHA=$(git log --oneline | grep "release vX.Y.Z" | head -1 | awk '{print $1}')
git tag vX.Y.Z "$RELEASE_SHA"
git push origin vX.Y.Z
```

PR マージと tag 作成の間に main が進んだ場合、HEAD にタグを打つと無関係なコミットを含むタグになり、gh workflow run ... --ref vX.Y.Z で誤った内容が publish される危険がありました。

Copilot — CHANGELOG の PR/issue 番号

v1.0.3 の Added セクションで (#263) (#268) を参照していたが、これらは issue 番号で、実際の PR は #272(#272, closes #263) / (#272, closes #268) に修正。

Copilot — pnpm.overrides の記述を実態に合わせる

skill の旧記述は「pnpm 10+ では pnpm.overridespnpm-workspace.yaml に書く必要がある」と断定していたが、本リポジトリは pnpm 10.x で package.jsonpnpm.overrides 運用で動いている。実態に合わせて「本リポジトリは package.json 運用」と明記し、ローカル/CI の pnpm バージョン差で lockfile が書き換わる場合の注意に修正。

CodeRabbit — worktree 規約

.claude/worktrees/<name> は CLAUDE.md に記載されていない既存運用の慣例。skill 側で「worktree なしで chore/release-X.Y.Z ブランチを直接切る運用でも可」と緩和し、必須ではないことを明示。

リリース時に実体験した内容を追記

  • npm error code E404 ('pkg@X.Y.Z' is not in this registry) は 認証失敗を 404 として隠す npm registry の仕様。NPM_TOKEN の期限切れや権限不足を最初に疑う
  • npm error code EOTP (one-time password required) は トークン種別が 2FA バイパス非対応
    • Classic Token → Automation 型で発行
    • Granular Access Token → 作成時に 「Bypass 2FA when publishing」を有効

実際 v1.0.4 publish で E404 → EOTP の順で遭遇したので、次回の作業者が同じ罠を踏まないようチェックリスト化。

Test plan

  • skill 内のコードブロックが構文として成立しているか目視確認
  • CI green を確認
  • マージ後、gh workflow run "Publish Skills" を実行してスキル側もリリース

🤖 Generated with Claude Code

## SKILL.md
- **タグ作成手順を SHA 明示型に修正** (Codex P1)
  - 旧: `git tag vX.Y.Z`(HEAD に打つ。main が進むと誤タグ)
  - 新: `git log --oneline | grep release` でリリースコミット SHA を特定し
    `git tag vX.Y.Z $RELEASE_SHA` で明示。tag ref で publish workflow を回す
- **npm publish のトラブルシューティングを実体験で拡充**
  - `npm error code E404` は認証失敗を 404 で隠す npm 仕様(NPM_TOKEN 期限切れ等)
  - `npm error code EOTP` はトークン種別が 2FA バイパス非対応
    - Classic → Automation 型 or Granular → 「Bypass 2FA when publishing」
- **pnpm.overrides の記述を本リポジトリの実態に合わせる** (Copilot)
  - 旧: pnpm 10+ では pnpm-workspace.yaml に書く必要があると断定
  - 新: 本リポジトリは package.json の pnpm.overrides 運用。ローカル/CI の
    pnpm バージョン差で lockfile が書き換わる場合があると注意喚起
- **worktree 規約を緩和** (CodeRabbit)
  - `.claude/worktrees/<name>` は CLAUDE.md に記載されない既存運用の慣例。
    skill 側で「worktree なしでも可」と明示

## CHANGELOG.md
- v1.0.3 の参照を `(#263)` `(#268)` → `(#272, closes #263, #268)` に修正 (Copilot)
  - #263 / #268 は issue 番号、実 PR は #272 だった

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 20, 2026 01:51
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sparkle-design Ready Ready Preview, Comment May 20, 2026 1:52am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Review Change Stack

Walkthrough

リリース手順ドキュメント(.claude/skills/release-sparkle-design/SKILL.md)の worktree 運用、タグ・Release・npm publish 手順、および失敗時トラブルシューティングを更新し、CHANGELOG.md の Input 関連クレジット表記を修正。

Changes

リリース手順ドキュメント整備

Layer / File(s) Summary
worktree 運用方法の統一
.claude/skills/release-sparkle-design/SKILL.md
既存慣例として .claude/worktrees/<name> 配置を明記しつつ、chore/release-X.Y.Z ブランチで直進する選択肢も許容。
タグ・Release・npm publish 手順の更新
.claude/skills/release-sparkle-design/SKILL.md
リリースコミット SHA の必須特定、タグを SHA 明示で打つ方式、CHANGELOG から notes 生成して gh release create --notes-file で実行、npm 失敗時の E404/EOTP 対応(Classic/Granular トークン種別と 2FA bypass 条件)、pnpm.overrides を package.json に置く運用と lockfile 差分確認手順を追記。
CHANGELOG のクレジット表記更新
CHANGELOG.md
[1.0.3] セクションの Input 関連 named export および triggerProps 属性フォワード項目における PR/issue 参照番号を更新。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • goodpatch/sparkle-design#276: 本 PR と同じ .claude/skills/release-sparkle-design/SKILL.md リリース手順(worktree/タグ/Release・npm publish トラブルシューティング)の作成・構造化に直接重なる変更。

Poem

🐇✨ worktree の道 ともう一つ
SHA に タグを 打ちて
notes を CHANGELOG から 生み出し
E404 と EOTP に 備えよ
Release と npm の 円環完成 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed タイトルはリリーススキルとリリース記録のレビュー指摘反映という主要な変更内容を明確に示しており、プルリクエストの目的と合致している。
Description check ✅ Passed プルリクエストの説明は詳細で、レビュー指摘への具体的な対応内容、実装の背景理由、リリース時に実体験した課題への対処方法が明記されている。テストプランも記載されている。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/release-skill-improvements

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 @.claude/skills/release-sparkle-design/SKILL.md:
- Line 116: The sentence that asserts "workflow fails with npm error code E404
... is due to NPM_TOKEN expiration" must be changed to avoid definitive
attribution; update the text in SKILL.md so it advises to first check NPM_TOKEN
while also verifying package name and registry configuration (e.g., replace the
line mentioning "NPM_TOKEN の期限切れ(auth 失敗が 404 …)" with guidance like "まず
NPM_TOKEN を確認しつつ、name/registry の設定も確認してください" and remove the absolute claim that
E404 equals token expiry). Keep the mention of the npm registry behavior as a
possible cause but not the sole cause.
🪄 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: c02be0c2-8a53-4f0e-9a52-dcbe0b1c7629

📥 Commits

Reviewing files that changed from the base of the PR and between a531159 and 6cd77f7.

📒 Files selected for processing (2)
  • .claude/skills/release-sparkle-design/SKILL.md
  • CHANGELOG.md

```bash
gh workflow run "Publish to npm" --ref vX.Y.Z
```
- workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は **NPM_TOKEN の期限切れ**(auth 失敗が 404 として返る npm registry 仕様)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

E404 の原因を期限切れに断定しないでください。

npm error code E404 は認証失敗以外(レジストリ設定・パッケージ名不整合など)でも発生するため、期限切れ断定は誤誘導になり得ます。まず NPM_TOKEN を確認しつつ、name/registry も確認 の表現にしてください。

修正案
-  - workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は **NPM_TOKEN の期限切れ**(auth 失敗が 404 として返る npm registry 仕様)
+  - workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は、まず **NPM_TOKEN の期限切れ/権限不足** を確認(auth 失敗が 404 として返ることがある)。あわせて package 名・registry 設定も確認する
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は **NPM_TOKEN の期限切れ**(auth 失敗が 404 として返る npm registry 仕様)
- workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は、まず **NPM_TOKEN の期限切れ/権限不足** を確認(auth 失敗が 404 として返ることがある)。あわせて package 名・registry 設定も確認する
🤖 Prompt for 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.

In @.claude/skills/release-sparkle-design/SKILL.md at line 116, The sentence
that asserts "workflow fails with npm error code E404 ... is due to NPM_TOKEN
expiration" must be changed to avoid definitive attribution; update the text in
SKILL.md so it advises to first check NPM_TOKEN while also verifying package
name and registry configuration (e.g., replace the line mentioning "NPM_TOKEN
の期限切れ(auth 失敗が 404 …)" with guidance like "まず NPM_TOKEN を確認しつつ、name/registry
の設定も確認してください" and remove the absolute claim that E404 equals token expiry). Keep
the mention of the npm registry behavior as a possible cause but not the sole
cause.

@touyou touyou merged commit 4628fe3 into main May 20, 2026
8 checks passed
@touyou touyou deleted the chore/release-skill-improvements branch May 20, 2026 01:54
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

PR #275 / #276 で受けたレビュー指摘を反映し、リリース手順スキル(release-sparkle-design)の手順精度向上と、実際に遭遇した npm publish トラブル(NPM_TOKEN / 2FA 関連)のトラブルシューティング統合、ならびに CHANGELOG の参照番号修正を行う変更です。

Changes:

  • CHANGELOG の v1.0.3 Added セクションで、issue 番号参照を PR 番号(#272)+ closes issue に修正
  • リリーススキルで「タグを打つ SHA を明示する」手順へ更新し、GitHub Release notes 生成手順を調整
  • npm publish 失敗時(E404/EOTP)に関するトラブルシュートをチェックリスト化

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
CHANGELOG.md v1.0.3 の Added 記載を PR #272 + closes issue 形式に修正
.claude/skills/release-sparkle-design/SKILL.md タグ作成手順の改善、Release notes 作成例の更新、npm publish トラブルシュート追記

Comment on lines +99 to 101
- [ ] **リリースコミットの SHA `git log --oneline | grep release | head -1` で必ず特定**
- [ ] **タグはリリースコミットの SHA を明示して打つ**(HEAD に打つと main が進んだ場合に誤タグ → publish 漏れ・誤 publish の温床):
```bash
Comment on lines 106 to 111
- [ ] **GitHub Release 作成**:
CHANGELOG.md のセクションを `--notes` で直接渡すのが確実:
```bash
gh release create vX.Y.Z --title "vX.Y.Z" --notes "$(awk '/^## \[X\.Y\.Z\]/,/^## \[/' CHANGELOG.md | sed '$d')"
awk '/^## \[X\.Y\.Z\]/{flag=1;next} /^## \[/{flag=0} flag' CHANGELOG.md > /tmp/notes.md
gh release create vX.Y.Z --title "vX.Y.Z" --notes-file /tmp/notes.md
```
- `pnpm-lock.yaml` の整合性が崩れていないか確認(`pnpm install --frozen-lockfile` を試す)
- `pnpm.overrides` を package.json に書いていると pnpm 10+ では読まれない場合がある。`pnpm-workspace.yaml` 側の `overrides:` フィールドへの移行を検討
- `NPM_TOKEN` の有効期限切れも疑う(リポジトリ Secrets を確認)
- `pnpm.overrides` は本リポジトリでは `package.json` の `pnpm.overrides` に置く運用(CI が使う pnpm のバージョンで読まれることを確認済み)。ローカルの pnpm バージョンが大幅に違うと挙動差で lockfile が書き換わることがあるので、ローカルで pnpm install するときは lockfile の差分(特に `overrides:` セクション)を確認すること
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.

2 participants