From b14428079d18d0e81c310ed421f784ff59773f3b Mon Sep 17 00:00:00 2001 From: "yk-lab (k.yamada)" Date: Tue, 23 Jun 2026 01:07:35 +0900 Subject: [PATCH 1/2] =?UTF-8?q?ci:=20Codecov=20PR=20=E3=82=B3=E3=83=A1?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=82=92=E6=9C=89=E5=8A=B9=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - workflows/ci.yml: pull-requests: write 権限を追加 - codecov.yml: comment レイアウトを標準値に調整し require_changes=false で表示確認 --- .github/workflows/ci.yml | 1 + codecov.yml | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6866dda..92338f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ on: permissions: contents: read id-token: write # Codecov OIDC (tokenless upload) + pull-requests: write # Codecov PR comments concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/codecov.yml b/codecov.yml index f00124d..ef25efb 100644 --- a/codecov.yml +++ b/codecov.yml @@ -12,5 +12,7 @@ coverage: informational: true comment: - layout: "condensed_header, diff, flags" - require_changes: true + layout: "header, diff, flags, files" + require_changes: false + require_base: true + require_head: true From fbdc61a06dd32c8bbcaf7740dda2c0c6d8b3b0e3 Mon Sep 17 00:00:00 2001 From: "yk-lab (k.yamada)" Date: Tue, 23 Jun 2026 01:07:39 +0900 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20TODO.md=20=E3=81=AE=E3=83=90?= =?UTF-8?q?=E3=83=83=E3=82=AF=E3=83=AD=E3=82=B0=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Issue #8 を reopen し進行中として反映 - #37〜#45 の新規 Issue を追加 --- TODO.md | 99 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 42 deletions(-) diff --git a/TODO.md b/TODO.md index 4d89635..b16c3e1 100644 --- a/TODO.md +++ b/TODO.md @@ -1,64 +1,79 @@ # 残タスク / Backlog -要求仕様書(`要求仕様書.md`)・企画書(`企画書.md`)と実装の差分。 -分類は **マイルストーン(リリース単位)× 優先度ラベル(`P0..P3`)** の2軸。進捗トラッカーは -GitHub の各マイルストーンページ。`(FR/NFR/§)` は要求仕様書の参照。 +`要求仕様書.md`・`企画書.md` と現コードベースの差分を整理。 +分類は **マイルストーン(リリース単位)× 優先度(`P0..P3`)**。`(FR/NFR/§)` は要求仕様書の参照。 -実装済み: FR-1〜FR-10 と主要 NFR。未達は主に「仕様で必須のテスト(§10)」と「リリース運用(M3/M4)」。 +**現状**: FR-1〜FR-10 と主要 NFR は実装・テスト済み。CI(`ci.yml` / `self-test.yml`)も green。 +残りは **リリース運用(M3/M4)**、セキュリティ強化系 CI、将来拡張・任意機能。 --- -## マイルストーン `v1.0.0`(要求仕様書 §11 DoD・期日 2026-09-15) +## マイルストーン `v1.0.0`(要求仕様書 §11 DoD) -### Issue 化済み(詳細は各 Issue / 進捗は milestone を参照) +### 実装・テスト済み(Done) -| # | 概要 | 優先度 | 参照 | -|---|---|---|---| -| [#1](https://github.com/yk-lab/setup-task/issues/1) | `[security]` `repo-token` を `core.setSecret` で秘匿 | `P1: high` | NFR-1 | -| [#2](https://github.com/yk-lab/setup-task/issues/2) | `[test]` `withRetry` のユニットテスト | `P1: high` | §10.1 | -| [#3](https://github.com/yk-lab/setup-task/issues/3) | `[test]` `fetchJson` content-type ガードのテスト | `P1: high` | §10.1 / 企画 §1.1-3 | -| [#4](https://github.com/yk-lab/setup-task/issues/4) | `[test]` checksum 改ざん注入の self-test | `P1: high` | §10.3 | -| [#5](https://github.com/yk-lab/setup-task/issues/5) | `[test]` cache-hit 経路の self-test | `P2: medium` | §10.2 | -| [#7](https://github.com/yk-lab/setup-task/issues/7) | `[bug]` レンジ指定時に tool-cache より先に GitHub 解決する | `P2: medium` | §6.1 / NFR-3 / Codex | +| 参照 | 内容 | 実装箇所 | +|---|---|---| +| FR-1 | バージョン解決(exact / range / latest, `v` 正規化, prerelease 除外) | `src/version.ts` | +| FR-2 | プラットフォーム判定 + `architecture` 上書き | `src/platform.ts` | +| FR-3 | 認証付き DL + content-type ガード | `src/download.ts` / `src/github.ts` | +| FR-4 | 指数バックオフ + 恒久エラー即 fail | `src/download.ts` / `src/errors.ts` | +| FR-5 | SHA256 検証(既定 ON, BSD `*name` 形式対応) | `src/checksum.ts` | +| FR-6〜FR-9 | 展開 / chmod / tool-cache / PATH / outputs | `src/main.ts` / `src/install.ts` | +| FR-10 | `arduino/setup-task` 互換 inputs | `action.yml` | +| NFR-1 | `repo-token` の `core.setSecret` マスク | `src/main.ts` | +| NFR-3 | exact 指定時の一覧取得スキップ + cache 優先 | `src/version.ts` / `src/main.ts` | +| §10.1 | ユニットテスト(version / platform / github / download / checksum) | `tests/*.test.ts` | +| §10.2 | cache-hit 経路の self-test | `.github/workflows/self-test.yml` | +| §10.3 | checksum 改ざん検出テスト | `tests/checksum*.test.ts` | -### 未 Issue 化(リリース運用 / M3・M4) +### 未対応・進行中 -- **リリース自動化 + `v1` ムービングタグ + Marketplace 公開**(`release`) - **dist はリリース時にビルドしてタグに commit する方式に変更**(main は source のみ・#22 は不要)。 - `v*` タグ push → `pnpm install --frozen-lockfile` → `pnpm run build` → dist を tag に commit → - `v1` を追従 → Release 発行 → Marketplace 掲載。⚠️ WF からタグを push/移動するため、 - **タグ保護 ruleset の bypass にリリース WF の identity を追加**する必要あり。DoD §11 必須。 -- ~~ローカルコードを push / remote 設定~~ — 完了済み。 +| # | 概要 | 優先度 | 参照 | 備考 | +|---|---|---|---|---| +| [#9](https://github.com/yk-lab/setup-task/issues/9) | `[chore]` lefthook で pre-push に `pnpm run all` を仕込む | `P3: low` | `ci` `chore` | stale dist / 未 lint コミット防止 | +| [#23](https://github.com/yk-lab/setup-task/issues/23) | `[ci]` ワークフロー静的解析(`actionlint` / `zizmor`)を CI に追加 | `P3: low` | `security` `ci` | 既存 WF のセキュリティ lint | + +### 未対応・進行中(リリース運用 / M3・M4) + +| # | 概要 | 優先度 | ラベル | 備考 | +|---|---|---|---|---| +| [#37](https://github.com/yk-lab/setup-task/issues/37) | `[release]` リリース自動化 + `v1` ムービングタグ + Marketplace 公開 | `P1: high` | `release` | **release-please + `JasonEtco/build-and-tag-action`(パターン A)** で実装。詳細は Issue 内コメント参照 | +| [#38](https://github.com/yk-lab/setup-task/issues/38) | `[docs]` README に arduino/setup-task からの移行ガイドを追加 | `P2: medium` | `documentation` | §11 DoD「代表ワークフローが通ることを保証」に対応 | --- -## マイルストーン `Backlog`(任意 / 将来・仕様上 optional) +## マイルストーン `Backlog`(将来 / optional) -### Issue 化済み +### 未対応・進行中 -| # | 概要 | 優先度 | ラベル | -|---|---|---|---| -| [#8](https://github.com/yk-lab/setup-task/issues/8) | `[ci]` Codecov でカバレッジを PR 表示(ネイティブ機能は個人アカウント不可) | `P3: low` | `ci` `test` | -| [#9](https://github.com/yk-lab/setup-task/issues/9) | `[chore]` lefthook で pre-push に `pnpm run all`(stale dist 防止) | `P3: low` | `chore` `ci` | +| # | 概要 | 優先度 | ラベル | 備考 | +|---|---|---|---|---| +| [#8](https://github.com/yk-lab/setup-task/issues/8) | `[ci]` Codecov でカバレッジを PR 表示 | `P3: low` | `ci` `test` | reopen。`pull-requests: write` 追加 + `codecov.yml` 調整済み。PR コメント表示を確認 | +| [#39](https://github.com/yk-lab/setup-task/issues/39) | `[enhancement]` ジョブサマリに導入結果を出力(NFR-5) | `P3: low` | `enhancement` | +| [#40](https://github.com/yk-lab/setup-task/issues/40) | `[enhancement]` リトライ回数・間隔を input 化(FR-4) | `P3: low` | `enhancement` | +| [#41](https://github.com/yk-lab/setup-task/issues/41) | `[test]` platform.test.ts を §9 全 os/arch 組合せに拡張 | `P3: low` | `test` | +| [#42](https://github.com/yk-lab/setup-task/issues/42) | `[security]` ダウンロード先ホスト/リダイレクト先を検証(NFR-1) | `P2: medium` | `security` | +| [#43](https://github.com/yk-lab/setup-task/issues/43) | `[chore]` checksum 改ざんテストの重複ファイルを統合 | `P3: low` | `chore` `test` | +| [#44](https://github.com/yk-lab/setup-task/issues/44) | `[enhancement]` フォールバックソースをサポート(FR-11) | `P3: low` | `enhancement` | +| [#45](https://github.com/yk-lab/setup-task/issues/45) | `[chore]` Biome 導入を評価 | `P3: low` | `chore` | ### 未 Issue 化 -- **フォールバックソース(FR-11)** — npm `@go-task/cli` 等の代替取得元。v1 必須ではない。 -- **ジョブサマリ出力(NFR-5・任意)** — `core.summary` に解決版/取得元/cache/検証結果を記録。 -- **リトライ回数の input 化(FR-4「必要なら」)** — `DEFAULT_RETRIES`/`DEFAULT_RETRY_BASE_MS`(`src/constants.ts`)を input 化。 -- **`platform.test.ts` を §9 全 os/arch 組合せに拡張(§10.1)** — riscv64 は PR #6 で対応済み。残りの全組合せ網羅 + 各 OS の非対応 arch 拒否は未。 -- **ダウンロード先ホスト/リダイレクト検証(NFR-1)** — 取得 URL を go-task 公式に固定し、リダイレクト先を検証。 -- **Biome 評価(見送り中)** — フォーマッタ不在を埋める余地のみ。現状 ESLint は痛んでおらず優先度低。 +なし --- -## 参考: 実装済みで確認済みの要求 +## 備考: 既に解決した Issue + +v1.0.0 実装中に作成・解決済みの Issue(参考)。 -- FR-1 バージョン解決(exact/range/latest, `v` 正規化, prerelease 除外)— `src/version.ts` -- FR-2 プラットフォーム判定 + `architecture` 上書き — `src/platform.ts` -- FR-3 認証付き DL + content-type ガード — `src/download.ts` / `src/github.ts` -- FR-4 指数バックオフ + 恒久エラー即 fail — `src/download.ts` / `src/errors.ts` -- FR-5 SHA256 検証(既定 ON, BSD `*name` 形式対応)— `src/checksum.ts` -- FR-6〜FR-9 展開 / chmod / tool-cache / PATH / outputs — `src/main.ts` / `src/install.ts` -- FR-10 inputs(`arduino/setup-task` 互換)— `action.yml` -- NFR-3 exact 指定時の一覧取得スキップ — `src/version.ts` +| # | 概要 | 解決 PR(推定) | +|---|---|---| +| [#1](https://github.com/yk-lab/setup-task/issues/1) | `[security]` `repo-token` を `core.setSecret` で秘匿 | #24 | +| [#2](https://github.com/yk-lab/setup-task/issues/2) | `[test]` `withRetry` のユニットテスト | #25 | +| [#3](https://github.com/yk-lab/setup-task/issues/3) | `[test]` `fetchJson` content-type ガードのテスト | #26 | +| [#4](https://github.com/yk-lab/setup-task/issues/4) | `[test]` checksum 改ざん注入の self-test | #27 | +| [#5](https://github.com/yk-lab/setup-task/issues/5) | `[test]` cache-hit 経路の self-test | #29 | +| [#7](https://github.com/yk-lab/setup-task/issues/7) | `[bug]` レンジ指定時に tool-cache より先に GitHub 解決する | #30 | +| [#22](https://github.com/yk-lab/setup-task/issues/22) | dist/ freshness 管理 | #36(main から dist/ を外し、リリース時ビルド方式へ) |