Repository navigation
fix: edit transaction が履歴 Issue の note-only 更新を既存 readiness 欠陥だけで拒否しないようにする (#2922) - #2934
Conversation
…いようにする (#2922) CLOSED の履歴 Issue で、Notes for Reviewer 以外の H2 section が live と同一、かつ 実 contract_readiness_check.py の blocking 欠陥 multiset が live と完全一致する 更新に限り、pre-existing readiness 欠陥だけを理由にした拒否を行わない互換 lane を追加する。 needs_fix forwarding の拒否は live readback 後へ遅延し、_fetch_issue は state を取得する。 OPEN Issue、欠陥増加、subset 修復、note surface 外変更、title / relationship 同居は従来どおり拒否する。 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2934/ The preview will be removed when this PR is closed. |
_fetch_issue が title,body,updatedAt,state を要求するようになり、exact argv で 照合する既存 fake gh (test_skill_runtime_exec_anchor.py) が拒否して python-test-core が失敗していた。_fetch_issue は従来の --json title,body,updatedAt に戻し、state は互換 lane が実際に必要とする 場合のみ _fetch_issue_state (gh issue view --json state) で live readback する。 readback 失敗・不正・欠落は fail-closed で従来の拒否 code を維持する。 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
PR レビュー結果(impl-review-loop / iteration 1)判定: APPROVE(レビュー対象 head 根拠
Blockersなし Warnings(非ブロッキング)
verdict: APPROVE
reviewed_head_sha: 5df0b8d4cb29b0ba70c16b5e7e6369bd32588e97
blockers: []
warnings:
- "needs_fix + CLOSED + 本文不変は no_change(テスト固定済み)"
- "Notes 内の未閉じコードフェンスは未テスト"
- "live state は別 gh 呼び出しで取得(狭い reopen 競合、sha/updatedAt 照合は維持)" |
Findings1. [P1]
|
|
確認時点では、PR #2934 は Draft / OPEN、HEAD は 推奨アクションは Finding 2 の Option A を第一選択です。つまり #2922 の approved contract を維持し、 前回 run 自体も「未閉じ fence が未テスト」「state が別 gh call なので reopen race が理論上ある」と warning を残しており、今回の findings はその境界を merge blocker として具体化した形です。貼り付けたテキスト(1) 以下をそのまま既存 Claude Code に貼るのがよいです。 既に auto mode で起動済みの、この対話的 fresh Claude Code セッションをそのまま継続してください。新しい Claude Code セッションを起動し直さないでください。 対象 repository は 対象 implementation Issue は 既存 PR は 今回の operator-selected human context は次の PR conversation comment です。
この URL は current 目的は、current repository の canonical 実 merge、auto-merge、force push、履歴破壊、default branch への direct push、remote branch deletion、permission bypass は行わないでください。 1. 最初に fresh state を取得する現在の値を過去ログやこの prompt の SHA から固定せず、開始時に必ず fresh に取得してください。 current その後、current HEAD の current 既存 PR #2934 が qualified current candidate なら 2. この invocation に対する明示的 operator approvalこの invocation について、repository / GitHub の read-only 調査、current Skill / Agent / SSOT の読取り、root-owned entry transition、capability preflight、current-run issue-contract-review、landing disposition、既存 PR / branch / worktree の resume、Issue #2922 の canonical contract の最小更新、Allowed Paths の必要最小限の拡張、既存 PR 上の実装修正、test の追加・更新、Verification Commands 実行、focused regression、required CI 確認、implementation-worker / test-runner / pr-reviewer および current canonical workflow が必要とする SubAgent の利用、通常 commit、fast-forward push、PR body / metadata / scope marker の更新、controlled PR review comment の publish、REQUEST_CHANGES に対する bounded fix iteration、stale-head rereview、canonical update-branch、修正可能 CI failure の原因調査と修正・再実行、recurrent defect の重複 Issue 検索、および後述条件を満たす再発防止 Issue の起票を明示的に承認します。 routine な「修正してよいですか」「Issue body を更新してよいですか」「commit/push してよいですか」「PR を更新してよいですか」「SubAgent を使ってよいですか」という追加承認を取りに戻らず、current canonical workflow の terminal boundary まで自律的に進めてください。 この承認は Claude Code の permission mode を変更しません。 3. target comment の Finding 1 は merge blocker として処理する
実装修正前に、repository 内の既存 Markdown boundary authority を調査してください。特に current current repository に既に GFM/CommonMark-aware な shared primitive があり、edit-issue runtime / fake harness の import boundary を壊さず再利用できるなら、独自 fence parser を拡張するよりその SSOT を再利用する方を優先してください。既存 ただし shared module の top-level import が fake git repo / runtime boundary を壊す場合は、それを推測で無視しないでください。既存 harness を実際に走らせて確認し、current Allowed Paths / contract の範囲で最小解を選択してください。新しい parser framework や generic wrapper は作らないでください。 regression は最低でも、4 spaces indent の backtick/tilde sequence が fence opener として扱われないこと、4-backtick opener が3-backtick closerで閉じないこと、同種かつ opening 以上の長さの closer だけが閉じること、そして 特に、readiness defect multiset が偶然同じままでも Notes 後方の real H2 を変更した candidate が compat lane で拒否される end-to-end regression を入れてください。helper 単体だけの happy-path test で終わらせないでください。 4. target comment の Finding 2 は Option A を第一選択とするoperator recommendation として、まず Option A を採用してください。 すなわち、approved Issue #2922 の semantic contract を維持し、 初回実装でこれが ただし その contract repair では、semantic goal を変更せず、Option A を成立させるために必要な exact harness regression path を Allowed Paths と verification coverage に追加するだけに留めてください。不要な source path、schema、Skill、docs、generic hardening を scope に足さないでください。 Issue body を更新した場合は body SHA、VC command hashes、contract snapshot、scope marker 等の旧 evidence を stale とみなし、current-run contract review と routing を fresh にやり直してください。既存 PR body の Option A が current canonical evidence 上、本当に最小 scope では成立しないことが確認された場合に限り、fallback として Option B を許可します。その場合も PR description の prose だけで contract を上書きせず、current issue-refinement / controlled contract-update workflow を使って #2922 の authoritative contract を先に変更し、separate state readback を許容する条件、snapshot race の扱い、必要な regression test を明文化してから実装してください。 Option A が単に「既存 fake test を直す必要がある」という理由だけで Option B へ退避してはいけません。 5. implementation / test / review の SubAgent completion を必ず待つcurrent Skill が定める implementation-worker、test-runner、pr-reviewer を正規の call shape で使ってください。必要なら codebase-investigator 等、current canonical workflow が要求する SubAgent も使って構いません。 各 SubAgent には task、target Issue/PR、authority、Allowed Paths / fix_delta、constraints、参照 evidence、expected output を明示し、親会話の暗黙 context に依存させないでください。 SubAgent を background dispatch しただけで完了扱いにしないでください。必ずその task の terminal completion notification を join し、final structured result を取得してから downstream step へ進んでください。 implementation-worker の完了前に Step 2 へ進まない、test-runner の final result と current-head VC adjudication が成立する前に pr-reviewer を起動しない、pr-reviewer の final SubAgent の単なる 6. stale evidence を混ぜない現在知られている旧 APPROVE は head また、この prompt 作成時点では PR head が fix commit、Issue contract update、update-branch 等で HEAD / Issue body / VC binding のいずれかが変わったら、それ以前の test-runner result、review verdict、mergeability snapshot、terminal-gate evidence を current-head 成功証拠として合成しないでください。 修正後は fresh HEAD で Verification Commands、必要な focused regressions、required CI、pr-reviewer を再実行してください。main mergeだけの HEAD 変更でも exact-head review binding を省略しないでください。 7. verification の最低ラインIssue #2922 の live Verification Commands を canonical source とし、contract update が入った場合は更新後の command set を使ってください。 加えて今回の failure class を固定する focused regression として、Finding 1 の fence/H2 scope-escape reproduction、Finding 2 の single-snapshot current head に対する 「全 VC pass」だけで終端せず、current 8. external researchFinding 1 の semantics が repository の shared upstream semantics の確認が必要なら、CommonMark の current official spec と GitHub CLI の current official manual を一次資料として確認してください。blog や二次記事を authority にしないでください。 9. recurrent defect / 再発防止 Issue実装・調査・review 中に、#2922 の blocker を直すだけでは残る具体的で再現可能な recurrent root cause が確認された場合は、既存 Issue を検索してください。 特に、repository に canonical GFM boundary SSOT があるのに別 consumer が独自 fence/H2 parser を複製して同型 semantic drift を起こしている、または shared parser を利用できない runtime/import boundary が複数 consumer に同じ duplication を強制している、という事実が #2922 以外でも再現できるか確認してください。 同じ責務の既存 Issue があれば新規起票せず、その Issue を final report で示してください。既存 Issue がなく、#2922 では変更すべきでない別 path / consumer に同型 failure が具体的に残るなら、repository-native その Issue は具体的 repro、affected consumers、root cause、AC、Verification Commands、#2922 / PR #2934 との relation を持たせ、generic security hardening、新 approval layer、schema registry、wrapper 増設だけを目的にしないでください。 一方、今回の P1 を #2922 の Allowed Paths 内で共有 SSOT 再利用によって完全に解消でき、独立した残存 failure class が確認できないなら、形式的に follow-up Issue を作る必要はありません。 10. 停止境界通常の test failure、CI failure、REQUEST_CHANGES、stale head、BEHIND、contract snapshot の stale/missing advisory artifact、修正可能な PR body hygiene、既存 PR resume、bounded contract repair は停止理由にしないでください。 正当な停止候補は、current canonical router が explicit operator decision を織り込んだ後も返す genuine target comment の Finding 1 / 2 自体は、今回この prompt で修正・必要最小限の contract repair を明示承認しているため、それだけを理由に routine human approval へ戻らないでください。 11. terminal state最終目標は merge そのものではありません。current canonical current-head reviewer が APPROVE、blockers が空、current live mergeability と required CI が canonical terminal gate の条件を満たすまで bounded に修正・再検証してください。 終了時は、fresh PR # / URL、final HEAD SHA、final base/main SHA、Issue #2922 の final body SHA と contract update の有無、changed files、target comment Finding 1/2/3 の解消内容、Verification Commands 結果、追加 focused regressions、required CI、fresh reviewer verdict と reviewed_head_sha、Step 5 terminal route、再発防止 Issue の create/reuse/no-create 判断と根拠、残 blocker、そして merge / auto-merge を実行していないことを簡潔に報告してください。 まず current この形なら、P1 を単に fix_delta へ投げるのではなく、Issue contract の不整合も canonical workflow 内で先に解消し、その後 exact HEAD で review をやり直すところまで自律実行対象になります。 |
…ck から取得する (#2922) - _split_h2_sections を shared prose_boundary_policy の iter_markdown_blocks / parse_atx_heading_line に置換し、4 spaces indent の fence 風 line・closer 長さ・0-3 spaces indent の H2 による scope escape を解消 - _fetch_issue の --json を title,body,updatedAt,state にして別 request の _fetch_issue_state を削除 - regression test と anchor harness の許容 argv を追随 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
_only_notes_section_differs の捕捉対象に OSError を追加し、prose boundary SSOT が ディスク上に存在しない場合も例外を伝播させず互換 lane を failed_no_mutation で拒否する。 回帰 test を追加。 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Summary
Closes #2922 (本 PR のマージで Issue を完了します)
CLOSED の履歴 Issue に対する note-only 更新が、編集前から存在する readiness 欠陥だけを理由に
edit_issue_txn.pyで拒否される問題を解消します。needs_fix(resolution_evidenceなし)forwarding の拒否を live readback 後へ遅延します。live state は_fetch_issueの 1 回の readback(gh issue view --json title,body,updatedAt,state)からtitle/body/updatedAt/stateを同一 snapshot として取得します(別 request の state 取得は行いません。state の欠落・非文字列・readback 失敗は fail-closed で従来の拒否 code を維持)。human_judgment/input_or_runtime_errorは従来どおり即 fail-closed です。mutated_candidateで## Notes for Reviewer以外の H2 section が live と同一、実contract_readiness_check.py --mode staticの(rule_id, category, section, minimal_context)multiset が live と candidate で完全一致。expected_previous_body_sha256/ updatedAt 照合、guard / hygiene、post-edit readback は従来どおり実行し、ISSUE_EDIT_TXN_RESULT_V1の key / schema と成功時errors空は不変です。受け入れ条件の達成状況
test_preexisting_readiness_note_only_allowed(needs_fix forwarding 経由と candidate static readiness 経由の両方)。test_preexisting_readiness_worsened_rejected(新規欠陥、件数増加、subset 修復を拒否。line / fix_hint の差のみは許容)。test_preexisting_readiness_open_issue_unchanged(OPEN は子プロセス起動なし・mutation なしで従来どおり拒否)。test_preexisting_readiness_note_surface_only(各 H2 section の変更と hygiene autofix 由来の変更を拒否)。test_preexisting_readiness_sha_and_readback_preserved。test_preexisting_readiness_human_judgment_fail_closed。test_preexisting_readiness_title_or_relationship_rejected。test_preexisting_readiness_real_checker_integrationとtest_preexisting_readiness_checker_output_fail_closed。test_preexisting_readiness_result_schema_unchanged。.claude/skills/edit-issue/tests/配下 340 件が PASS。test_preexisting_readiness_single_snapshot_fetch_issueとscripts/agent-guards/tests/test_skill_runtime_exec_anchor.py(21 件)が PASS。test_preexisting_readiness_note_boundary_commonmark_fence_semantics(22 variant、判定 helper とrun_transactionの end-to-end の双方)が PASS。検証コマンド結果
uv run --locked pytest .claude/skills/edit-issue/tests/ -qは 340 passed。uv run --locked pytest scripts/agent-guards/tests/test_skill_runtime_exec_anchor.py -qは 21 passed。_split_h2_sectionsに戻すと 22 variant 中 10 件が失敗することを確認済みです。Allowed Paths 遵守
変更ファイルは次の 4 件のみで、Allowed Paths(Issue #2922 の contract 更新で
test_skill_runtime_exec_anchor.pyを追加済み)に収まっています。.claude/skills/edit-issue/scripts/edit_issue_txn.py.claude/skills/edit-issue/tests/test_edit_issue_txn.py.claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py(新規)scripts/agent-guards/tests/test_skill_runtime_exec_anchor.py(exact-argv の fake にstate付き argv を追加する最小追随のみ)Checks
uv run --locked pytest .claude/skills/edit-issue/tests/ -q: 340 passeduv run --locked ruff check .claude/skills/edit-issue: All checks passed.claude/agents/testsとimpl-review-loopの edit 関連 test: PASS.github/ci/python-test-plan.jsonは.claude/skills/edit-issue/tests/ディレクトリ target で新規 test file を既に網羅しているため、変更していません。Schema Change Applicability
ISSUE_EDIT_TXN_INPUT_V1/ISSUE_EDIT_TXN_RESULT_V1の key / schema は変更していません。Schema Consumer Inventory
N/A
reason: schema 変更がないため consumer の洗い出し対象はありません。
Safety Claim Matrix
test_preexisting_readiness_open_issue_unchangedtest_preexisting_readiness_worsened_rejectedほかtest_preexisting_readiness_checker_output_fail_closedNotes
prose_boundary_policy.py(iter_markdown_blocks()/parse_atx_heading_line())を再利用しています(4 spaces indent は fence ではない、closer は同種かつ opening 以上の長さ、0-3 spaces indent の H2 も H2)。SSOT を読み込めない場合(import 失敗・分割不整合・ファイル欠落)は fail-closed です(欠落時の回帰 testtest_preexisting_readiness_note_boundary_ssot_unavailable_fail_closedを追加)。PR fix: edit transaction が履歴 Issue の note-only 更新を既存 readiness 欠陥だけで拒否しないようにする (#2922) #2934 の OWNER review(https://github.com/squne121/loop-protocol/pull/2934#issuecomment-5992240562)の finding 1 の再現(4 spaces indent の fence 風 line と indent 付き H2 による Notes 後方 H2 の誤分類)を解消しました。test_needs_fix_forwarding_does_not_mutate_without_resolution_evidenceは拒否の遅延に合わせて readback の fake を追加しました。##判定を持つ別 consumer の扱いは本 PR の範囲外です。本 PR は Claude Code により作成されました。
🤖 Generated with Claude Code