Skip to content

docs: suppress MD040 on unlabeled VC fixture - #1107

Merged
squne121 merged 3 commits into
mainfrom
worktree-issue-1103-issue-scoped-pr-lint-docs-baseline
Jun 21, 2026
Merged

squne121 merged 3 commits into
mainfrom
worktree-issue-1103-issue-scoped-pr-lint-docs-baseline

Conversation

@squne121

@squne121 squne121 commented Jun 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

tests/fixtures/issue-body/vc_unlabeled_fence.md の unlabeled fence は intentional negative VC fixture として維持しつつ、pnpm run lint:docs を false blocker にしないよう fixture-local な markdownlint 抑止を追加しました。

受け入れ条件の達成状況

  • AC1: pnpm run lint:docs は成功しました。
  • AC2: fixture intent comment を追加しました。
  • AC3: markdownlint-disable-next-line MD040 を追加しました。
  • AC4: intent comment と MD040 抑止の直後に unlabeled opening fence が残っています。
  • AC5: 変更ファイルは tests/fixtures/issue-body/vc_unlabeled_fence.md のみです。
  • AC6: pnpm typecheck は成功しました。
  • AC7: pnpm lint は成功しました。
  • AC8: pnpm test は成功しました。
  • AC9: pnpm build は成功しました。

Checks

  • ドキュメント lint の確認として pnpm run lint:docs は成功しました。
  • 型検査として pnpm typecheck は成功しました。
  • リポジトリ lint として pnpm lint は成功しました。
  • テスト実行として pnpm test は成功しました。
  • ビルド確認として pnpm build は成功しました。
  • 変更ファイルは tests/fixtures/issue-body/vc_unlabeled_fence.md のみです。

検証コマンド結果

  • pnpm run lint:docs は PASS でした。
  • pnpm typecheck は PASS でした。
  • pnpm lint は PASS でした。
  • pnpm test は PASS でした。
  • pnpm build は PASS でした。

Schema Change Applicability

  • decision: not_schema_change
  • reason: fixture comment の局所追加のみで、schema・型・契約キーの変更はありません。

Schema Consumer Inventory

該当なしです。schema change ではないため、consumer inventory を更新する対象はありません。

Safety Claim Matrix

N/A reason: safety-sensitive path の変更ではなく、fixture-local な docs lint baseline 修正だけです。

Allowed Paths 遵守

  • 許可された変更先は tests/fixtures/issue-body/vc_unlabeled_fence.md のみです。
  • 実際の変更も tests/fixtures/issue-body/vc_unlabeled_fence.md のみに収まっています。

Notes

Keep the fixture intentionally non-canonical by preserving the unlabeled fence and adding fixture-local markdownlint guidance.

Verification:
- pnpm run lint:docs
- pnpm typecheck
- pnpm lint
- pnpm test
- pnpm build
@github-actions

github-actions Bot commented Jun 21, 2026 •

Copy link
Copy Markdown
Contributor

Preview URL

✅ verified live assets: https://squne121.github.io/loop-protocol/pr-1107/

The preview will be removed when this PR is closed.

Copy link
Copy Markdown
Owner Author
head_sha: "2534a78e1f045ab3b9de5fd2363acd5991250b20"
TEST_VERDICT:
  result: PASS
  mergeable: MERGEABLE
  merge_state_status: BEHIND
  branch_behind_main: true
  baseline_only: false
  verification_commands_pass: 9
  verification_commands_fail: 0
  verification_skipped_count: 0
  runtime_ac_results:
    - ac: AC1
      command: "pnpm run lint:docs"
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: "clean checkout baseline pass"
    - ac: AC2
      command: "rg -n \"Intentional negative VC fixture\" tests/fixtures/issue-body/vc_unlabeled_fence.md"
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: "fixture intent comment present"
    - ac: AC3
      command: "rg -n \"markdownlint-disable-next-line MD040\" tests/fixtures/issue-body/vc_unlabeled_fence.md"
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: "local MD040 suppression present"
    - ac: AC4
      command: "sed -n \"13,22p\" tests/fixtures/issue-body/vc_unlabeled_fence.md"
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: "intent comment and suppression precede unlabeled fence"
    - ac: AC5
      command: "git diff --name-only origin/main...HEAD"
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: "diff limited to tests/fixtures/issue-body/vc_unlabeled_fence.md"
    - ac: AC6
      command: "pnpm typecheck"
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: "TypeScript: No errors found"
    - ac: AC7
      command: "pnpm lint"
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: "eslint passed"
    - ac: AC8
      command: "pnpm test"
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: "69 test files, 922 tests passed"
    - ac: AC9
      command: "pnpm build"
      exit_code: 0
      status: pass
      fallback_detected: false
      artifact_present: not_required
      human_review_required: false
      stop_condition_triggered: false
      notes: "tsc and vite build passed"

検証結果レポート

Issue #1103: 実装: issue-scoped PR を既存 lint:docs baseline で止めない

AC 確認コマンド 実行結果(要約) exit code 判定
AC1 pnpm run lint:docs main 相当の baseline で clean pass 0 PASS
AC2 rg -n "Intentional negative VC fixture" tests/fixtures/issue-body/vc_unlabeled_fence.md fixture intent comment present 0 PASS
AC3 rg -n "markdownlint-disable-next-line MD040" tests/fixtures/issue-body/vc_unlabeled_fence.md local MD040 suppression present 0 PASS
AC4 sed -n '13,22p' tests/fixtures/issue-body/vc_unlabeled_fence.md intent comment + suppression の直後に unlabeled fence を確認 0 PASS
AC5 git diff --name-only origin/main...HEAD 変更は tests/fixtures/issue-body/vc_unlabeled_fence.md のみ 0 PASS
AC6 pnpm typecheck TypeScript: No errors found 0 PASS
AC7 pnpm lint eslint passed 0 PASS
AC8 pnpm test 69 files / 922 tests passed 0 PASS
AC9 pnpm build tsc + vite build pass 0 PASS

総合判定

  • 全 AC PASS: YES
  • FAIL した AC: なし
  • SKIP した AC: なし
  • human_review_required: NO

補足

  • mergeable=MERGEABLE
  • merge_state_status=BEHIND
  • branch_behind_main=true
  • BEHIND は FAIL として扱っていません
  • baseline_only=false

@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.

Verdict: APPROVE

Mergeability

  • mergeable=MERGEABLE, merge_state_status=BEHIND
  • Draft PR ですが blocker ではありません。required_auto_actions が解消されるまでは merge_ready: false です。

Evidence Check

  • TEST_VERDICT_MACHINE は reviewed head 2534a78e1f045ab3b9de5fd2363acd5991250b20 に一致し、verification_commands_pass=9, fail=0, skipped=0 でした。
  • CI_VERDICT_SUMMARY_V1 は同じ head に対して status=all_pass で、required/pass 系 check は完了済みでした。
  • 変更ファイルは tests/fixtures/issue-body/vc_unlabeled_fence.md のみで、linked issue #1103 の Allowed Paths に一致しています。
  • PR summary と TEST_VERDICT の内容から、unlabeled fence を維持したまま fixture-local な markdownlint-disable-next-line MD040 を追加して pnpm run lint:docs baseline を復旧する AC は満たされています。

Blockers

  • なし

Non-blockers

  • PR body に canonical section ## 受け入れ条件の達成状況 / ## 検証コマンド結果 / ## Allowed Paths 遵守 がなく、update_pr_body_hygiene が必要です。
  • mergeable=MERGEABLE かつ merge_state_status=BEHIND のため、update_branch が必要です。

LOOP_VERDICT_V2

verdict: APPROVE
reviewed_head_sha: "2534a78e1f045ab3b9de5fd2363acd5991250b20"
merge_ready: false
mergeability:
  mergeable: "MERGEABLE"
  merge_state_status: "BEHIND"
blockers: []
required_auto_actions:
  - kind: update_pr_body_hygiene
    executor: implementation-worker
    skill: open-pr.update_pr
    blocking_merge_ready: true
    mechanical: true
  - kind: update_branch
    executor: implementation-worker
    skill: implement-issue.update_branch
    blocking_merge_ready: true
    mechanical: true
    expected_head_sha: "2534a78e1f045ab3b9de5fd2363acd5991250b20"
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
  status: ok
allowed_paths_gate_source: review_subagent

@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.

Verdict: REQUEST_CHANGES

Mergeability

  • mergeable=MERGEABLE, merge_state_status=BEHIND
  • update_pr_body_hygiene は解消済みです。PR body には ## 受け入れ条件の達成状況 / ## 検証コマンド結果 / ## Allowed Paths 遵守 が揃っており、placeholder も見当たりません。

Evidence Check

  • TEST_VERDICT_MACHINE は reviewed head 2534a78e1f045ab3b9de5fd2363acd5991250b20 に一致し、verification_commands_pass=9, fail=0, skipped=0 でした。
  • Changed files は tests/fixtures/issue-body/vc_unlabeled_fence.md のみで、linked issue #1103 の Allowed Paths に一致しています。
  • gh pr view --json files と git diff --name-only origin/main...2534a78e1f045ab3b9de5fd2363acd5991250b20 の両方で変更先は 1 ファイルに限定されていました。
  • ただし deterministic CI gate として再実行した CI_VERDICT_SUMMARY_V1 は同じ head に対して status=failed / failed_checks=["PR Body Japanese Check"] を返しました。

Blockers

  • CI_VERDICT_SUMMARY_V1 が status=failed のため、validator-first 運用では APPROVE にできません。update_pr_body_hygiene は解消済みですが、現時点では CI blocker が残っています。

Non-blockers

  • mergeable=MERGEABLE かつ merge_state_status=BEHIND のため、mechanical action として update_branch は引き続き必要です。

LOOP_VERDICT_V2

verdict: REQUEST_CHANGES
reviewed_head_sha: "2534a78e1f045ab3b9de5fd2363acd5991250b20"
merge_ready: false
mergeability:
  mergeable: "MERGEABLE"
  merge_state_status: "BEHIND"
blockers:
  - "CI_VERDICT_SUMMARY_V1 returned status=failed with failed_checks=[\"PR Body Japanese Check\"] for head 2534a78e1f045ab3b9de5fd2363acd5991250b20."
required_auto_actions:
  - kind: update_branch
    executor: implementation-worker
    skill: implement-issue.update_branch
    blocking_merge_ready: true
    mechanical: true
    expected_head_sha: "2534a78e1f045ab3b9de5fd2363acd5991250b20"
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
  status: ok
allowed_paths_gate_source: review_subagent

@squne121

Copy link
Copy Markdown
Owner Author

status: pass
summary:
issue_number: 1103
pr_number: 1107
head_sha: 9e75933
verification_commands_total: 9
verification_commands_passed: 9
verification_commands_failed: 0
verification_commands_skipped: 0
result_note: Step 2 rerun on the updated PR head SHA; all AC/VC passed.
branch_behind_main: false
runtime_ac_results:

  • ac: AC1
    verdict: pass
    evidence: pnpm run lint:docs
  • ac: AC2
    verdict: pass
    evidence: rg -n "Intentional negative VC fixture" tests/fixtures/issue-body/vc_unlabeled_fence.md
  • ac: AC3
    verdict: pass
    evidence: rg -n "markdownlint-disable-next-line MD040" tests/fixtures/issue-body/vc_unlabeled_fence.md
  • ac: AC4
    verdict: pass
    evidence: sed -n '13,22p' tests/fixtures/issue-body/vc_unlabeled_fence.md
  • ac: AC5
    verdict: pass
    evidence: git diff --name-only origin/main...HEAD
  • ac: AC6
    verdict: pass
    evidence: pnpm typecheck
  • ac: AC7
    verdict: pass
    evidence: pnpm lint
  • ac: AC8
    verdict: pass
    evidence: pnpm test
  • ac: AC9
    verdict: pass
    evidence: pnpm build

@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.

LOOP_VERDICT_V2

verdict: APPROVE
reviewed_head_sha: "9e7593362cddc1076131250b8b66a36356baae43"
merge_ready: true
mergeability:
  mergeable: MERGEABLE
  merge_state_status: CLEAN
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
  status: ok
allowed_paths_gate_source: review_subagent

@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.

LOOP_VERDICT_V2

verdict: APPROVE
reviewed_head_sha: "9e7593362cddc1076131250b8b66a36356baae43"
merge_ready: true
mergeability:
  mergeable: MERGEABLE
  merge_state_status: UNSTABLE
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
  status: ok
allowed_paths_gate_source: review_subagent

@squne121

Copy link
Copy Markdown
Owner Author

結論

PR #1107 の差分自体は APPROVE 相当です。#1103 の契約どおり、tests/fixtures/issue-body/vc_unlabeled_fence.md だけに 2 行を追加し、unlabeled fence は ``` のまま維持されています。これは「MD040 を通すために bash を付けて fixture の意味を壊す」最悪パターンを避けています。

ただし、マージ手順上はまだ draft=true なので、このまま merge-ready 扱いにするのは不整合です。PR メタデータ上は open / mergeable=true ですが draft=true です。
レビューとしては REQUEST_CHANGES ではなく、APPROVE + ready for review 化の手順指摘でよいです。

確認した事実

#1103 は「issue-scoped PR が差分外の docs lint baseline failure で止まらないようにし、vc_unlabeled_fence.md の intentional negative fixture を保ったまま fixture-local な MD040 抑止で pnpm run lint:docs を green に戻す」ことが目的です。AC も、コメント追加、markdownlint-disable-next-line MD040 追加、unlabeled opening fence 維持、変更ファイル限定、各検証コマンド pass を求めています。

関連元の PR #1102 では、pnpm run lint:docs が既存 baseline の tests/fixtures/issue-body/vc_unlabeled_fence.md:15 / MD040/fenced-code-language で失敗しており、#1102 の Allowed Paths 外なので未修正、と明示されていました。したがって #1103 / #1107 として分離した判断は妥当です。

現 PR の変更後ファイルでは、intent コメント、markdownlint-disable-next-line MD040、unlabeled fence が連続して配置されています。これは #1103 の AC2〜AC4 に一致します。

変更ファイルは tests/fixtures/issue-body/vc_unlabeled_fence.md のみです。compare 上も 2 additions / 0 deletions で、Allowed Paths に収まっています。

CI については、current head 9e7593362cddc1076131250b8b66a36356baae43 に対して agent-session-manifest、Check Japanese Content、check-hook-integrity、deploy-pages、ci が completed/success です。PR Body Japanese Check も success へ戻っています。

技術調査ベースの評価

markdownlint の MD040 は「fenced code block に language が指定されていない」場合に発火し、通常修正は ```bash や ```text のように言語指定を追加することです。([GitHub]1)
しかし、この repo の VC grammar は canonical format として ```bash を要求し、unlabeled fences を non-canonical error として扱う設計です。vc_contract_syntax.py の docstring でも「unlabeled fences are rejected」と明記され、parser も unlabeled_fence を static error として追加します。

そのため、この fixture で ``` を ```bash に変えるのは lint green にはなりますが、negative fixture の存在意義を破壊します。PR #1107 はそこを避け、markdownlint の HTML comment による局所抑止を使っています。markdownlint は <!-- markdownlint-disable-next-line MD001 MD005 --> 形式で次行だけ特定 rule を無効化できます。([GitHub]2)

また、.markdownlintignore に逃がす案は不適切です。markdownlint-cli2 公式 README は .markdownlintignore をサポートしないと明記しています。cli2 で ignore するなら config の ignores / gitignore を使う筋ですが、#1103 は config-level remediation を Out of Scope にしています。([GitHub]3) ([GitHub]3)
repo 側でも lint:md は markdownlint-cli2 を直接実行し、lint:docs は lint:md && lint:prose です。
.markdownlint-cli2.yaml では tests/** は ignore されておらず、MD040 は明示的に有効です。

敵対的レビュー

Blocker: なし

差分の方向性、スコープ、lint 抑止の粒度、fixture 意図の維持はいずれも妥当です。markdownlint-disable-next-line MD040 は対象行にだけ効くため、repo 全体の docs lint policy を弱めていません。([GitHub]2)

Process blocker: draft 状態のまま merge-ready と呼ばない

PR metadata は draft: true です。内部レビューコメント上で merge_ready=true が出ていても、GitHub PR としては ready for review 化が未完了です。マージ前に mark ready for review が必要です。

Non-blocker: negative fixture 維持の検証をもう一段強くできる

現 AC4 は「unlabeled fence が残っている」ことを sed で確認していますが、より堅くするなら VC parser が今も unlabeled_fence を返すことまで検証するとよいです。今回の差分では parser 仕様上問題ないですが、将来の parser 側変更で fixture が死んでも sed だけでは検知が弱いです。

追加するならこの程度で十分です。

python - <<'PY'
from pathlib import Path
import sys

repo = Path(".").resolve()
sys.path.insert(0, str(repo / ".claude/skills/issue-contract-review/scripts"))

from vc_contract_syntax import parse_verification_commands_section

body = Path("tests/fixtures/issue-body/vc_unlabeled_fence.md").read_text(encoding="utf-8")
vc = body.split("## Verification Commands", 1)[1].split("## Allowed Paths", 1)[0]
result = parse_verification_commands_section(vc)

assert result.has_unlabeled_fence
assert any(error.kind == "unlabeled_fence" for error in result.errors)
PY

Non-blocker: preview URL はこの PR の証跡として弱い

PR comment には Pages preview が出ていますが、今回の変更は runtime surface ではなく fixture-local docs lint baseline 修正です。deploy-pages が success なのは確認できますが、レビュー証跡の主軸は lint:docs / parser 意図 / allowed paths で十分です。
なお、こちらの環境では preview URL の画面内容までは直接検証していません。

投稿するならこのレビュー文

## Verdict: APPROVE with process note

PR #1107 の差分自体は APPROVE です。

確認事項:
- #1103 の目的どおり、`tests/fixtures/issue-body/vc_unlabeled_fence.md` の intentional negative VC fixture を維持したまま、fixture-local に `markdownlint-disable-next-line MD040` を追加している。
- opening fence は ` ``` ` のままであり、` ```bash ` に変えて fixture の意味を壊していない。
- 変更ファイルは `tests/fixtures/issue-body/vc_unlabeled_fence.md` のみ。
- current head `9e7593362cddc1076131250b8b66a36356baae43` の workflow runs は success。
- 以前の `PR Body Japanese Check` failure は current head では解消済み。

Blockers:
- なし。

Process note:
- PR metadata 上はまだ draft=true なので、マージ前に ready for review へ遷移すること。
- Pages preview は runtime 証跡としては不要。今回の主証跡は `pnpm run lint:docs`、allowed paths、unlabeled fence 維持で足りる。

Optional hardening:
- 将来の regression 防止として、`parse_verification_commands_section()` がこの fixture から `unlabeled_fence` を返すことを直接確認する AC / test を追加してもよい。

実務判断としては、ready for review 化 → 最終 CI green 確認 → merge でよいです。

@squne121
squne121 marked this pull request as ready for review June 21, 2026 13:12
@squne121

Copy link
Copy Markdown
Owner Author

PR #1101 で issue #1086 は解決済みのため、こちらは superseded としてクローズします。

@squne121 squne121 closed this Jun 21, 2026
@squne121 squne121 reopened this Jun 21, 2026
@squne121
squne121 merged commit 83ef23e into main Jun 21, 2026
37 checks passed
@squne121
squne121 deleted the worktree-issue-1103-issue-scoped-pr-lint-docs-baseline branch June 21, 2026 13:37
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.

実装: issue-scoped PR を既存 lint:docs baseline で止めない

1 participant