Skip to content

fix(#728): quote HEAD^{commit} in deploy-pages.yml to resolve ShellCheck SC1083 - #730

Merged
squne121 merged 2 commits into
mainfrom
worktree-issue-728-actionlint-sc1083-head-commit-quote
Jun 7, 2026
Merged

squne121 merged 2 commits into
mainfrom
worktree-issue-728-actionlint-sc1083-head-commit-quote

Conversation

@squne121

@squne121 squne121 commented Jun 7, 2026 •

Copy link
Copy Markdown
Owner

要約

.github/workflows/deploy-pages.yml の 2 箇所で git rev-parse --verify の引数にダブルクォートを追加し、ShellCheck SC1083 警告を解消します。

変更内容

  • main deploy step(56 行目): HEAD^{commit} を "HEAD^{commit}" に修正
  • PR preview step(159 行目): HEAD^{commit} を "HEAD^{commit}" に修正

理由

ShellCheck の SC1083 警告は未クォートの { / } に対して発火します。これはシェルに特殊文字として解釈されることを防ぐため、引数をダブルクォートで囲む必要があります。

受け入れ条件

  • AC1: クォート済み "HEAD^{commit}" が 2 箇所存在する
  • AC2: 未クォート形 HEAD^{commit} が 0 件(negated 検証)

両 AC は検証完了・PASS です。

テスト

静的解析(rg による形検証)で確認済みです。.github/workflows/* の変更は人間承認が必須です。PR CI の actionlint ジョブが green になることで SC1083 解消を確認します。

本 PR のマージで Issue をクローズします。Closes #728

…eck SC1083

Quote the argument to git rev-parse --verify in two locations (main deploy
and PR preview steps) to prevent ShellCheck SC1083 warning about literal
braces.

Closes #728

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions

github-actions Bot commented Jun 7, 2026 •

Copy link
Copy Markdown
Contributor

Preview URL

Preview removed (PR #730 closed).

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

PR Review: #730 - PR #728 implementation verdict

Verification Summary

All mandatory gates cleared:

  1. Linked Issue Contract (#728): Confirmed from contract snapshot comment #issuecomment-4640888541

    • Scope: .github/workflows/deploy-pages.yml only (Allowed Paths confirmed)
    • AC1: Quoted "HEAD^{commit}" form present (baseline fail expected)
    • AC2: Unquoted form absent (negated verification, baseline fail expected)
    • Runtime Verification: not_applicable (static lint task)
  2. Diff Verification:

    - sha=$(git rev-parse --verify HEAD^{commit})
    + sha=$(git rev-parse --verify "HEAD^{commit}")

    Two locations (lines 56, 159 in diff context) ✓
    Allowed Paths compliance: ✓ (only .github/workflows/deploy-pages.yml modified)

  3. CI Status (gh pr checks 730):

    • actionlint: pass ✓ (SC1083 resolved)
    • all other checks: pass ✓
  4. AC Coverage:

    • AC1 verification: rg -q 'rev-parse --verify "HEAD\^\{commit\}"' ... → PASS
    • AC2 verification: ! rg -q 'rev-parse --verify HEAD\^\{commit\}' ... → PASS
  5. Merge Status:

    • mergeable: MERGEABLE ✓
    • mergeStateStatus: CLEAN ✓
    • head SHA: d422d2a ✓

Assessment

PR #730 satisfies all acceptance criteria from issue #728:

  • ShellCheck SC1083 warning eliminated (quotes added to prevent literal {/} interpretation)
  • Workflow logic unchanged (set -euo pipefail, validation regex, deploy procedure preserved)
  • File scoping enforced (only deploy-pages.yml touched)

Note: This is a self-authored PR. Verdict recorded as comment per policy.

LOOP_VERDICT:
  verdict: APPROVE
  blockers: []
  mergeable: MERGEABLE
  mergeStateStatus: CLEAN
  reviewed_head_sha: d422d2a8790c2c80e7deb43d4f8e1ba60d0a681a

@squne121

squne121 commented Jun 7, 2026

Copy link
Copy Markdown
Owner Author

結論

内容面は APPROVE でよいです。
PR #730 は Issue #728 の契約どおり、.github/workflows/deploy-pages.yml の2箇所だけを HEAD^{commit} → "HEAD^{commit}" に変更しており、スコープ逸脱は見当たりません。差分も +2 -2、変更ファイル1件のみです。([GitHub]1)

ただし、PR がまだ Draft 状態なので、実運用上は Ready for review に変更 → 人間承認 → merge の順にしてください。Issue #728 自体も .github/workflows/* の変更は人間承認必須と明記しています。([GitHub]1)

契約充足レビュー

Issue #728 の目的は、deploy-pages.yml 内の2箇所の git rev-parse --verify HEAD^{commit} をクォートして、actionlint / ShellCheck SC1083 を解消することです。Allowed Paths は .github/workflows/deploy-pages.yml のみ、AC は「クォート済み」「未クォート残存なし」「actionlint PASS」です。([GitHub]2)

PR #730 の実差分は、main deploy step と PR preview step の2箇所で以下の同一変更です。([GitHub]1)

- sha=$(git rev-parse --verify HEAD^{commit})
+ sha=$(git rev-parse --verify "HEAD^{commit}")

これは ShellCheck SC1083 の修正として妥当です。ShellCheck 公式は、リテラルな {} はクォートした方が明確で誤りにくいと説明しています。また Git 公式の git rev-parse 文書も、Git の revision syntax は「raw syntax」であり、shell や UI では特殊文字保護のため追加クォートが必要になる場合があると明記しています。([ShellCheck]3)

CI / 実行結果

ci workflow は PR #730 の synchronize で Status Success、typecheck / lint / test / build / e2e / python-test / actionlint が実行されています。([GitHub]4)
actionlint job も succeeded しており、Issue #728 の AC3 は満たしています。([GitHub]5)
deploy-pages workflow も Status Success で、deploy-pr が実行されています。([GitHub]6)
PRコメント上でも preview URL の live assets verified が出ています。([GitHub]7)

敵対的指摘

ブロッカーなし。
このPRで修正すべき内容は、Issue #728 の範囲では完了しています。

非ブロッカー 1: Draft 状態のままではマージ運用に進めない。
これはコード品質の問題ではありませんが、マージ前手順として Ready for review 化が必要です。PR ページ上も Draft と表示されています。([GitHub]1)

非ブロッカー 2: Node.js 20 Actions deprecation warning は別Issue化すべき。
PR #730 の CI では成功している一方、deploy-pages と Check Japanese Content に Node.js 20 action の deprecation warning が出ています。GitHub は 2026-06-16 から runner の JavaScript actions を Node 24 デフォルトへ移行し、Node 20 は 2026年秋に削除予定と告知しています。これは #728 のスコープ外ですが、2026-06-07 時点で期限が近いので、別Issueで actions/github-script@v7 や check-japanese 側の actions 更新を追跡した方がよいです。([GitHub]6)

非ブロッカー 3: 検証コマンドのAC2は十分だが、将来の再利用にはやや脆い。
rg -n "verify HEAD\^\{commit\}" は今回の未クォート残存検出には有効です。ただし将来、空白や変数代入形式が変わると検出漏れがあり得ます。今後の類似Issueでは、git rev-parse --verify 行全体を対象にして "HEAD^{commit}" 以外を禁止する検査にした方が堅いです。今回PRのブロッカーではありません。

推奨レビューコメント

Verdict: APPROVE

Issue #728 の契約に対して、PR #730 は適切に充足しています。

確認結果:
- Allowed Paths は `.github/workflows/deploy-pages.yml` のみで遵守
- `git rev-parse --verify HEAD^{commit}` の2箇所が `"HEAD^{commit}"` にクォート化済み
- ShellCheck SC1083 の修正方針として妥当
- `ci` / `actionlint` / `deploy-pages` は成功
- workflow ロジック、deploy ロジック、SHA検証ロジックには不要な変更なし

ブロッカーなし。

マージ前の運用条件:
- Draft を Ready for review に変更
- `.github/workflows/*` 変更のため、人間承認後に merge

非ブロッカー:
- CI上に Node.js 20 actions deprecation warning が出ているため、別Issueで Node 24 対応を追跡することを推奨する。

最終判断: Ready for review 化と人間承認が済めば merge 可。

@squne121
squne121 marked this pull request as ready for review June 7, 2026 00:41
@squne121
squne121 merged commit e166681 into main Jun 7, 2026
19 checks passed
@squne121
squne121 deleted the worktree-issue-728-actionlint-sc1083-head-commit-quote branch June 7, 2026 00:46
@squne121

squne121 commented Jun 7, 2026

Copy link
Copy Markdown
Owner Author

post-merge-cleanup: 完了 (2026-06-07T09:50Z)

実施内容

  • worktree .claude/worktrees/issue-728-actionlint-sc1083-head-commit-quote を削除
  • local branch worktree-issue-728-actionlint-sc1083-head-commit-quote を force-delete(squash-merge により -d は拒否されるが、固有 commit d422d2a の deploy-pages.yml クォート化は merge commit e166681 で main に取り込み済みのため安全)
  • local main を e166681(origin/main)に同期
  • superseded PR: なし

follow-up(dedupe 結果)

Node.js 20 → Node 24 移行の follow-up は本セッションで既に #731(OPEN) として起票済みのため新規起票せず(reused_open)。先行 closed として #553 / #270 も存在。

FOLLOW_UP_MATERIALIZATION_RESULT_V1:
  schema_version: 1
  materialized_by: post-merge-cleanup
  follow_up_issues:
    - request_dedupe_key: "follow-up:squne121/loop-protocol:pr/730:node-js-20-actions-deprecation"
      status: reused_open
      issue:
        number: 731
        url: "https://github.com/squne121/loop-protocol/issues/731"
      reason: "本セッションで先行起票済み(#731 OPEN)。重複起票回避。"
  note_only_observations:
    - dedupe_key: "post-merge:pre-existing-worktree-changes"
      source_url: "https://github.com/squne121/loop-protocol/pull/730"
      source_note_id: "cleanup"
      summary: "main worktree に cleanup 対象外の pre-existing 変更(D tests/fixtures/agent-session-manifest/temp-invalid-no-markers.md, ?? artifacts/)が残存。別作業 #725 の WIP は branch issue-725-timeout-neutral / commit 05081ca に保全済みでデータ損失なし。"

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.

実装: deploy-pages.yml の actionlint(SC1083) 失敗を HEAD^{commit} クォート化で解消する

1 participant