Skip to content

実装: create_issue_txn.py の sub-issue-readback retry 固定 + implementation Issue 標準ラベル自動付与(#61 統合) #79

Closed

Description

@squne121

Parent Issue

#40

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: 40
goal_ref: "create_issue_txn.py の parent readback(sub-issue-readback stage)の 1 回 retry を共通 helper として明文化・テスト固定し、あわせて implementation 種別 Issue 起票時の標準ラベル自動付与(#61 統合)を同一 PR で実装する"
change_kind: mixed
allowed_paths:
  - .claude/skills/create-issue/scripts/create_issue_txn.py
  - .claude/skills/create-issue/SKILL.md
  - .claude/skills/create-issue/tests/**
  - .claude/skills/create-issue/references/*.md
acceptance_criteria_count: 11
verification_kind: deterministic

Parent Goal Ref

Issue #40(GitHub マイルストーン運用スキル統合, parent)の child issue 起票フローでは、create_issue_txn.py が (a) sub-issue 登録後の parent readback 一時不整合を partial_failure として返し手動確認が必要、(b) スクリプト経由起票時にテンプレートの標準ラベルが付与されず issue-contract-review の state_label check が手動介入を要する、という 2 つの運用負荷を抱える。本 Issue は両者を create_issue_txn.py への統合変更として決定論的に固定する。

Current Validated Scope

issue-refinement-loop Step 1 調査(2026-05-20)および gemini github_research 委譲調査で以下を確認済み:

Remaining Parent Gaps

本 Issue では扱わず、必要であれば #40 配下の別 child issue として起票する:

Background

retry(#79)

create_issue_txn.py は child issue 作成後に GitHub Sub-issues API で parent issue へ sub-issue 登録し、gh api repos/{owner}/{repo}/issues/{child}/parent 相当の readback で親子関係を確認する。POST 成功直後に parent readback が期待値を返さない eventual-consistency 由来の false alarm が発生し、partial_failure stage = sub-issue-readback になる。観測例: #76 / #78(いずれも後続確認で parent = #40 を確認済み、実データは正常登録)。

label(#61 統合)

create-issue skill の .github/ISSUE_TEMPLATE/implementation.yml には標準ラベル 4 種(enhancement / phase/implementation / state/queued / agent/implementer)が定義されているが、スクリプト経由(create_issue_txn.py)の起票ではテンプレの labels が自動適用されない。PR #58 で Issue #39 がラベル未付与で起票され、issue-contract-review の state_label check で blocked となり手動ラベル付与が必要になった。

Outcome

.claude/skills/create-issue/scripts/create_issue_txn.py が、(1) parent readback(sub-issue-readback stage)で初回確認に失敗した場合、定数定義の bounded retry(合計待機 2 秒以下)を共通 helper 経由で行い、retry 期間内に確認できれば success / dedupe、全試行失敗時のみ partial_failure stage = sub-issue-readback を返す。retry helper は新規作成経路と dedupe reconcile 経路で共有され、sleep_fn 注入で実時間 sleep なしに単体テストできる。(2) issue_kind: implementation を検出した起票で標準ラベル 4 種を自動付与し、implementation 以外の種別では付与しない。挙動は .claude/skills/create-issue/tests/ 配下の単体テストで固定される。

In Scope

  • parent readback 専用の bounded retry helper(例: _readback_parent_issue_with_retry)を新設し、既存 2 経路のインライン retry を置換する
  • retry 試行回数・待機遅延を module-level 定数として定義する
  • helper は sleep_fn を引数注入でき、新規作成経路と dedupe reconcile 経路の双方が同じ helper / 定数を使う
  • issue_kind: implementation 検出時に標準ラベル 4 種(state/queued / phase/implementation / agent/implementer / enhancement)を自動付与するロジックを create_issue_txn.py に追加する
  • .claude/skills/create-issue/SKILL.md に sub-issue-readback retry の成功 / 失敗条件を明記する
  • .claude/skills/create-issue/references/ 配下の関連 doc に標準ラベル自動付与挙動を記載する
  • .claude/skills/create-issue/tests/ 配下に retry / ラベル自動付与の単体テストを追加する

Out of Scope

  • sub-issue-register(sub-issue 登録 POST)自体の再試行
  • dependency-readback / label-readback stage の retry policy 変更
  • GitHub API rate limit / secondary rate limit 全般の retry policy
  • gh CLI から REST / Octokit client への置換
  • create_issue_txn.py 全体のリファクタ
  • create-issue skill の入力契約変更
  • 既存 Issue のラベル一括修正
  • research / parent / bug-report 種別の独自ラベル運用
  • gh label create による未定義ラベルの新規作成

Allowed Paths

  • .claude/skills/create-issue/scripts/create_issue_txn.py
  • .claude/skills/create-issue/SKILL.md
  • .claude/skills/create-issue/tests/**
  • .claude/skills/create-issue/references/*.md

Acceptance Criteria

  • AC1: create_issue_txn.py に parent readback 専用の bounded retry helper が存在し、retry 遅延が module-level 定数(tuple 等)で定義されている。helper は「初回確認 + 2 回以上の追加確認」を行う。
  • AC2: parent readback が「初回 false → 後続 true」になるケースで、transaction が partial_failure ではなく success または dedupe を返す単体テストが存在する。
  • AC3: parent readback が全試行 false のケースで、transaction が partial_failure かつ failure_stage == "sub-issue-readback" を返す単体テストが存在する。
  • AC4: retry helper は sleep_fn を注入でき、単体テストでは fake sleep を渡し実時間 time.sleep を呼ばないことを検証する。
  • AC5: 新規 Issue 作成経路と dedupe reconcile 経路の双方が、同一の retry helper(または同一の retry 定数)を参照している。
  • AC6: .claude/skills/create-issue/SKILL.md の Partial-failure Recovery または sub-issue 登録手順に、retry 成功時は正常終了・全試行失敗時のみ partial_failure stage = sub-issue-readback とする条件が明記されている。
  • AC7: uv run pytest .claude/skills/create-issue/tests/ で retry 関連の追加単体テストが PASS する。
  • AC8: create_issue_txn.py に issue_kind: implementation を判定し標準ラベル 4 種(state/queued / phase/implementation / agent/implementer / enhancement)を自動付与するコードパスが存在する。
  • AC9: 標準ラベル自動付与は issue_kind == "implementation" のときのみ発動し、research / parent / bug-report 種別では発動しないことが、コードの条件分岐で保証されている。
  • AC10: implementation 種別ではラベル 4 種が付与され、非 implementation 種別では自動付与されないことを検証する単体テストが存在する。
  • AC11: .claude/skills/create-issue/references/ 配下の doc に標準ラベル自動付与挙動が記載されている。

Verification Commands

# AC1: parent readback 専用 retry helper と retry 遅延定数が存在する
grep -nE '_readback_parent_issue_with_retry|_PARENT_READBACK_RETRY' .claude/skills/create-issue/scripts/create_issue_txn.py

# AC5: 新規作成経路と dedupe reconcile 経路の双方が同一 helper / 定数を参照する(2 件以上)
grep -cE '_readback_parent_issue_with_retry|_PARENT_READBACK_RETRY' .claude/skills/create-issue/scripts/create_issue_txn.py

# AC6: SKILL.md に sub-issue-readback retry 契約(成功/全試行失敗条件)が明記されている
grep -nE 'bounded retry|全試行|retry 成功' .claude/skills/create-issue/SKILL.md

# AC8: implementation 種別判定 + 標準ラベル自動付与ロジックが存在する
grep -nE 'issue_kind|state/queued|phase/implementation|agent/implementer' .claude/skills/create-issue/scripts/create_issue_txn.py

# AC9: ラベル自動付与が implementation 種別の条件分岐内にのみある
grep -nE 'implementation' .claude/skills/create-issue/scripts/create_issue_txn.py

# AC11: references 配下の doc にラベル自動付与挙動が記載されている
grep -rnE 'state/queued|標準ラベル|ラベル自動付与' .claude/skills/create-issue/references/

# AC2: transient-false-then-true で success/dedupe を返す単体テストが存在する
# AC3: 全試行 false で partial_failure / failure_stage sub-issue-readback を返す単体テストが存在する
# AC4: 単体テストが sleep_fn に fake sleep を注入し実時間 sleep を呼ばない
# AC7: retry 関連の追加単体テストが PASS する
# AC10: implementation/非implementation でラベル付与有無を検証する単体テストが存在する
test -d .claude/skills/create-issue/tests/
find .claude/skills/create-issue/tests/ -maxdepth 1 -name 'test_*.py' -print
uv run pytest .claude/skills/create-issue/tests/ -v

# Standard gates
pnpm typecheck
pnpm lint
pnpm test
pnpm build

Suggested Test Cases

  • test_parent_readback_retry_succeeds_after_transient_false: _readback_parent_issue 相当を False, True の順に返すよう monkeypatch、sleep_fn に fake function。status が success / dedupe、failure_stage is None。
  • test_parent_readback_retry_fails_after_bounded_attempts: readback 全試行 False。status == "partial_failure"、failure_stage == "sub-issue-readback"。
  • test_parent_readback_retry_uses_fake_sleep_not_time_sleep: fake sleep の呼び出し回数・delay 値を検証、実時間 time.sleep を呼ばない。
  • test_implementation_kind_auto_assigns_standard_labels: issue_kind: implementation の body-file で起票経路を実行し、gh issue create 相当の argv に 4 ラベルが含まれる。
  • test_non_implementation_kind_skips_label_autoassign: issue_kind: research 等では標準ラベル自動付与が発動しない。

Stop Conditions

Required Skills

(Required Skills Guard 規則に従い空欄)

Delivery Rule

Notes

Refs #40, #57, #61, #76, #78

Activity

  1. added
    enhancement
    state/queued
    on May 19, 2026
  2. squne121 commented on May 20, 2026

    @squne121
    OwnerAuthor

    you asked

    message time: 2026-05-20 20:03:06

    #79
    このissueの内容について敵対的レビューして。
    issue起票の自動化について配布物の実装を調査し、このissueの高品質化してほしい。


    chatgpt response

    対象Issueの本文とコメントを確認し、同時に「AIエージェント向けIssue起票自動化」の既存実装・配布物を調べます。そのうえで、Issueの不足点を敵対的に洗い出し、すぐ貼れる改善版Issue案まで作ります。

    Issue本文は取得できました。現状は「現象→対策」の筋は通っていますが、実装契約としては retry 条件・観測点・テスト対象がまだ曖昧で、AIエージェントに渡すと過剰実装または grep だけ通す実装に流れやすいです。

    既存実装も確認しました。重要なのは、create_issue_txn.py にはすでに parent/dependency readback の「1回だけ2秒待つ retry」が存在します。つまりIssue #79は「retryを追加する」ではなく、「sub-issue-readback retryを共通化・明文化・テストで固定する」Issueに改めた方が正確です。

    GitHub上のIssue本文はまだ更新していません。以下はレビュー結果と、#79にそのまま貼れる改訂案です。

    結論

    #79は 方向性は正しい ですが、このままAIエージェントに渡すには不十分です。最大の問題は、既存の create_issue_txn.py にはすでに sub-issue-readback の retry が1回実装されているため、Issueのゴールが「retryを追加する」になっている点です。実態に合わせるなら、目的は 既存の散在した readback retry を、sub-issue-readback 専用の bounded semantic retry として明文化・共通化・単体テストで固定すること です。現在の実装では、parent readback が失敗した場合に sleep_fn(2.0) 後にもう一度 _readback_parent_issue を呼んでいます。

    また、#79のAC1は grep -E 'retry|sleep|time\.sleep|attempt' で検証する形になっていますが、既存コードには post-create race detection 用の attempt / sleep や dependency readback retry も存在するため、目的の sub-issue-readback retry が実装されていなくてもACを通過し得ます。

    敵対的レビュー

    深刻度 問題 影響 修正方針
    Blocker 既存実装にすでに retry があるのに、Issueが「追加する」と書いている 実装者が重複実装する、または現状維持でACだけ通す 「既存 retry を専用 helper 化し、回数・遅延・成功条件をテストで固定」に変更
    Blocker Machine-Readable Contract に parent_issue がない create-issue skill の implementation 契約と不整合 parent_issue: 40 または none を明記
    High AC1/AC2 が grep 中心で、意味的検証になっていない time.sleep を置くだけの低品質実装を許す pytestで「1回目失敗→2回目成功」「全試行失敗→partial_failure」を検証
    High sub-issue-readback と dependency-readback の重複 retry 構造を見落としている 同じ失敗パターンを別々に増築し、保守性が落ちる 今回は parent readback のみに限定しつつ、helper命名で将来拡張可能にする
    High #61と同一ファイルを触るが、Delivery Ruleが弱い 並行PRで衝突する Depends on #61 merge または「#61と同一PRに統合」を明記
    Medium GitHub APIの rate limit retry と consistency retry が混ざる余地がある secondary rate limit対応まで勝手に拡張される Out of Scopeに「rate limit / 5xx / command failure retry は扱わない」と明記
    Medium 200ms × 3回が根拠不足 GitHub側の実挙動に対して短すぎる可能性 例ではなく「合計2秒以下」「fake sleepでテスト」とする
    Medium testsディレクトリがAllowed Pathsに入っていない AC4を満たすにはAllowed Paths違反になる .claude/skills/create-issue/tests/** を追加

    GitHubの公式REST APIでは、Issue作成は通知を発生させ、短時間に作成しすぎると secondary rate limiting の対象になり得ると明記されています。さらに、Issue作成には Issues write 権限が必要です。(GitHub Docs) Sub-issue APIについては、Add sub-issue が POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues で sub_issue_id を要求し、成功時は 201 Created を返します。(GitHub Docs) 一方で、Get parent issue は読み取り用の別エンドポイントとして存在します。(GitHub Docs) したがって今回の問題は「POST自体の再試行」ではなく、POST成功後のGET readbackが一時的に期待値を返さない場合の semantic retry として扱うべきです。

    GitHub REST APIのベストプラクティスは、並行リクエストを避けること、mutative request の間に少なくとも1秒待つこと、rate limit errorでは retry-after や x-ratelimit-reset を尊重することを求めています。(GitHub Docs) これは #79 の Out of Scope を強化する根拠になります。今回のIssueで rate limit 全般に踏み込むと、設計対象が readback consistency からAPIクライアント全体の再試行ポリシーに膨張します。

    既存の配布物実装としては、actions/github-script が参考になります。このActionは pre-authenticated Octokit client を渡し、API呼び出しの retry 回数を retries オプションで設定できますが、デフォルトではリクエストはretryされません。さらにデフォルトの retry exempt status code に 404 が含まれます。(GitHub) そのため、GitHub App / GitHub Actions型の汎用retryを真似るより、今回のような「GET parent が期待する親Issue番号を返すまで待つ」専用の semantic polling が妥当です。

    #79の改訂タイトル案

    実装: create_issue_txn.py の sub-issue-readback を bounded semantic retry と単体テストで固定する
    

    #79 差し替え本文案

    ## Parent Issue
    
    #40
    
    ## Machine-Readable Contract
    
    ```yaml
    contract_schema_version: v1
    issue_kind: implementation
    parent_issue: 40
    goal_ref: "create_issue_txn.py の sub-issue-readback で GitHub Sub-issues API の POST 成功直後に parent GET が一時的に期待値を返さないケースを bounded semantic retry で吸収し、false partial_failure を減らす"
    change_kind: code
    allowed_paths:
      - .claude/skills/create-issue/scripts/create_issue_txn.py
      - .claude/skills/create-issue/SKILL.md
      - .claude/skills/create-issue/tests/**
    verification_kind: deterministic

    Parent Goal Ref

    Issue #40 の child issue 起票フローにおいて、create_issue_txn.py が sub-issue 登録後の readback 一時不整合を partial_failure として返し、main thread / SubAgent 側で手動確認が必要になっている。

    観測例:

    Current Validated Scope

    • 対象は create_issue_txn.py の sub-issue-readback 判定のみ
    • 既存コードには parent readback 失敗時に sleep_fn(2.0) 後に1回だけ再確認する処理がある
    • 今回はこの処理を専用 helper / 定数 / テストで明文化し、偶然の sleep ではなく検証可能な contract にする

    Remaining Parent Gaps

    • dependency readback retry の体系化
    • label readback retry の体系化
    • GitHub API rate limit / secondary rate limit 全般の retry policy
    • create-issue transaction 全体の API client 化

    これらは本Issueでは扱わない。

    Background

    create_issue_txn.py は child issue 作成後に GitHub Sub-issues API で parent issue へ sub-issue 登録し、その後 GET /repos/{owner}/{repo}/issues/{child}/parent 相当の readback で親子関係を確認する。

    観測上、POST自体は成功しているにもかかわらず、直後の parent readback が期待する parent issue number を返さず、partial_failure stage = sub-issue-readback になることがある。

    この失敗は安全側の false alarm だが、AIエージェント運用では毎回 main thread / SubAgent が手動で gh api repos/.../issues/<child>/parent を確認する必要があり、認知負荷と中断が蓄積する。

    Outcome

    .claude/skills/create-issue/scripts/create_issue_txn.py の sub-issue-readback が、初回 readback で期待する parent issue number を確認できない場合に bounded semantic retry を行い、retry期間内に parent が確認できた場合は success、全試行で確認できない場合のみ partial_failure stage = sub-issue-readback を返す。挙動は単体テストで固定される。

    In Scope

    • sub-issue-readback 専用の bounded retry helper 追加または既存処理の helper 化
    • retry 回数・待機間隔を定数化
    • sleep_fn 注入を使い、単体テストで実時間sleepを発生させない
    • create_issue_txn.py の新規Issue作成経路と dedupe reconcile 経路の両方で同じ parent readback retry contract を使う
    • .claude/skills/create-issue/SKILL.md に sub-issue-readback retry の成功条件・失敗条件を明記
    • .claude/skills/create-issue/tests/ 配下に単体テストを追加

    Out of Scope

    Allowed Paths

    • .claude/skills/create-issue/scripts/create_issue_txn.py
    • .claude/skills/create-issue/SKILL.md
    • .claude/skills/create-issue/tests/**

    Acceptance Criteria

    • AC1: create_issue_txn.py に sub-issue-readback 専用の bounded retry contract が存在する。少なくとも「初回確認 + 2回以上の追加確認」を行い、待機時間は定数で定義されている
    • AC2: parent readback が「1回目 false、2回目または後続 true」になるケースで、transaction が partial_failure ではなく success または dedupe を返す単体テストが存在する
    • AC3: parent readback が全試行 false のケースで、transaction が partial_failure かつ failure_stage == "sub-issue-readback" を返す単体テストが存在する
    • AC4: retry helper は sleep_fn を注入でき、単体テストでは実時間 time.sleep を呼ばない
    • AC5: 新規Issue作成経路と dedupe reconcile 経路の両方が同じ retry helper または同じ定数を使う
    • AC6: .claude/skills/create-issue/SKILL.md の Partial-failure Recovery または sub-issue 登録手順に、retry成功時は正常終了し、全試行失敗時のみ partial_failure とする条件が明記されている
    • AC7: uv run pytest .claude/skills/create-issue/tests/ または同等のテストコマンドで追加テストがPASSする

    Verification Commands

    # AC1 / AC5: retry helper or constants are present
    grep -nE 'sub.*readback.*retry|parent.*readback.*retry|READBACK|PARENT|delay|attempt' \
      .claude/skills/create-issue/scripts/create_issue_txn.py
    
    # AC2 / AC3 / AC4 / AC7: deterministic unit tests
    test -d .claude/skills/create-issue/tests/
    find .claude/skills/create-issue/tests/ -name 'test_*.py' -maxdepth 1 -print
    uv run pytest .claude/skills/create-issue/tests/
    
    # AC6: SKILL.md documents the contract
    grep -nE 'sub-issue-readback|retry|partial_failure|parent read-back' \
      .claude/skills/create-issue/SKILL.md
    
    # Standard gates
    pnpm typecheck
    pnpm lint
    pnpm test
    pnpm build

    Suggested Test Cases

    • test_parent_readback_retry_succeeds_after_transient_false

      • _readback_parent_issue 相当を False, True で返すように monkeypatch
      • sleep_fn に fake function を渡す
      • status が success または dedupe
      • failure_stage is None
    • test_parent_readback_retry_fails_after_bounded_attempts

      • readback を全て False にする
      • status == "partial_failure"
      • failure_stage == "sub-issue-readback"
    • test_parent_readback_retry_uses_fake_sleep_not_time_sleep

      • fake sleep の呼び出し回数と delay 値を検証
      • 実時間 sleep を呼ばない

    Stop Conditions

    1. sub-issue-register POST 自体の retry が必要だと判明した場合は停止し、別Issueへ分割する
    2. GitHub API rate limit / secondary rate limit 全般の retry policy が必要だと判明した場合は停止し、別Issueへ分割する
    3. dependency-readback / label-readback に同様の retry policy を入れたくなった場合は停止し、別Issueへ分割する
    4. create_issue_txn.py 全体のAPI client化・大規模リファクタが必要になった場合は停止する
    5. create-issue skill の入力契約変更が必要になった場合は停止する
    6. 実装: create-issue skill で起票時に implementation Issue 標準ラベル (state/queued + phase/implementation + agent/implementer + enhancement) を自動付与する #61 と同一箇所の変更競合が発生した場合は、#61のmerge後にrebaseするか、同一PRへ統合する判断を人間に戻す
    7. retry待機時間の合計が2秒を超える設計にしたい場合は、人間判断へ戻す
    8. 単体テストが実GitHub APIに依存しそうになった場合は停止する

    Required Skills

    • Python subprocess testing
    • pytest monkeypatch
    • GitHub Issues / Sub-issues API semantics

    Delivery Rule

    Notes

    • 既存実装には parent readback 失敗時の1回retryがすでに存在するため、単純な「retry追加」ではなく「retry contract の固定」が目的
    • grep だけでは既存の unrelated sleep / attempt に反応するため、ACの主判定は pytest とする
    • GitHub REST API best practice 上、rate limit retry は別設計対象とし、本Issueでは扱わない
    
    ## 実装方針の補足
    
    実装は大きくしない方がいいです。推奨は次の形です。
    
    ```python
    _PARENT_READBACK_RETRY_DELAYS: tuple[float, ...] = (0.2, 0.4, 0.8)
    
    def _readback_parent_issue_with_retry(..., sleep_fn=time.sleep) -> bool:
        if _readback_parent_issue(...):
            return True
        for delay in _PARENT_READBACK_RETRY_DELAYS:
            sleep_fn(delay)
            if _readback_parent_issue(...):
                return True
        return False
    

    そして、新規作成経路と dedupe reconcile 経路の両方でこの helper を使う。これにより、#79は「sleepを足すIssue」ではなく、readback整合性待ちの仕様を決定論的に固定するIssue になります。

  3. changed the title [-]実装: create_issue_txn.py の sub-issue-readback ステップに retry / consistency wait を追加する[/-] [+]実装: create_issue_txn.py の sub-issue-readback parent retry を共通 helper と単体テストで固定する[/+] on May 20, 2026
  4. squne121 commented on May 20, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop Step 4: 本文全置換(iteration 0)

    変更理由

    review-issue が needs-fix(C1 / C2 / C5 fail + 内容ブロッカー)を返し、codebase-investigator 調査で「既存コードに parent readback の 1 回 retry が 2 経路に重複実装済み」が事実確認された。

    これにより Issue の核心フレームを変更した: 「retry を新規追加する」→「既存 retry 重複実装を共通 helper に整理し、単体テストで決定論的に固定する」

    変更内容

    変更セクション 内容
    タイトル retry 追加 → helper 共通化・テスト固定に再フレーム
    Machine-Readable Contract parent_issue: 40 補完、allowed_paths に tests/** 追加、acceptance_criteria_count: 4 → 7
    Parent Issue 新規追加(#40)
    Parent Goal Ref 新規追加
    Current Validated Scope 新規追加(codebase 調査で確認した 2 経路重複実装の事実・sleep_fn 注入パターン・tests/ 未作成を記録)
    Remaining Parent Gaps 新規追加(dependency-readback / label-readback 等を本 Issue 外として明示)
    Background 旧「観察された事象」セクションを改名・整理
    Outcome retry 追加 → helper 共通化・sleep_fn 注入・両経路共有・partial_failure 条件の明文化に更新
    In Scope helper 新設・定数化・sleep_fn 注入・SKILL.md 更新・tests/ 追加を明示
    Out of Scope sub-issue-register POST 再試行・#61 ラベル実装を追加
    Allowed Paths tests/** 追加
    Acceptance Criteria 4 → 7 件に拡充(AC2: 初回 false→true で success/dedupe、AC3: 全試行 false で partial_failure、AC4: fake sleep 注入、AC5: 両経路同一 helper/定数参照、AC6: SKILL.md 明記、AC7: pytest PASS)
    Verification Commands grep → 具体的なパターン名指定、test/find/uv run pytest を追記。AC2/3/4/7 は grep 非適用として分離
    Stop Conditions 番号付きリスト → bullet 化
    Suggested Test Cases 新規追加
    Delivery Rule 新規追加(#61 との実装順序ルールを明示)
    Notes retry 重複実装の事実確認・AC 主判定 pytest 化の理由を追記

    Guard 結果

    template_guard:         pass
    outcome_quality_guard:  pass
    diff_threshold:         pass (90 → 160 lines, -70 lines, threshold 45)
    ac_vc_alignment:        pass (AC=7, VC AC コメント=7)
    

    Baseline VC 確認

    AC1 VC(grep -nE '_readback_parent_issue_with_retry|_PARENT_READBACK_RETRY' create_issue_txn.py): exit 1(実装前 = 正常 fail)

  5. squne121 commented on May 20, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop: 完了 (2026-05-20T11:30:21Z)

    改善履歴

    • 再フレーム: codebase-investigator 調査で「create_issue_txn.py には parent readback 失敗時の 1 回 retry が既に 2 経路(_reconcile_issue_links() / 新規作成経路本体)に重複実装済み」を事実確認。タイトル・Outcome を「retry を追加する」→「既存 retry を共通 helper 化・明文化・単体テストで固定する」に変更。
    • 必須セクション補完: implementation テンプレ必須セクション 4 件(Parent Issue / Parent Goal Ref / Current Validated Scope / Remaining Parent Gaps)を追加(C1 fix)。
    • Machine-Readable Contract: 必須フィールド parent_issue: 40 を補完。
    • Allowed Paths: AC(テスト追加)に対応するため .claude/skills/create-issue/tests/** を追加。
    • AC を pytest 主判定化: grep のみだと post-create race detection 用の attempt/sleep(_poll_for_created_issue)に誤反応するため、意味的検証を pytest に集約(C5 整合: AC 7 = VC # ACn 7)。
    • Stop Conditions: 番号付き → - bullet 形式に変換(C2 fix)。

    決定論的チェック最終結果

    C1〜C8 すべて pass。

    次アクション

  6. changed the title [-]実装: create_issue_txn.py の sub-issue-readback parent retry を共通 helper と単体テストで固定する[/-] [+]実装: create_issue_txn.py の sub-issue-readback retry 固定 + implementation Issue 標準ラベル自動付与(#61 統合)[/+] on May 20, 2026
  7. squne121 commented on May 20, 2026

    @squne121
    OwnerAuthor

    変更経緯(edit-issue by SubAgent, 2026-05-20)

    人間判断により #61(implementation 標準ラベル自動付与)を #79 へ統合実装。変更内容は以下の通り:

    Refs #40, #61

  8. squne121 commented on May 20, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-05-20T12:07:29Z)

    issue-contract-review: status: go

    • Outcome: create_issue_txn.py の parent readback retry を共通 helper として明文化・テスト固定し、implementation 種別起票時の標準ラベル 4 種自動付与(実装: create-issue skill で起票時に implementation Issue 標準ラベル (state/queued + phase/implementation + agent/implementer + enhancement) を自動付与する #61 統合)を同一 PR で実装する。
    • Acceptance Criteria: AC1〜AC11(retry 固定 = AC1-7 / ラベル自動付与 = AC8-11)
    • Verification Commands: AC1/AC5/AC6/AC8/AC9/AC11 = grep 系、AC2/AC3/AC4/AC7/AC10 = uv run pytest .claude/skills/create-issue/tests/、加えて標準ゲート(pnpm typecheck/lint/test/build)
    • Allowed Paths: .claude/skills/create-issue/scripts/create_issue_txn.py / SKILL.md / tests/** / references/*.md
    • Worktree: .claude/worktrees/issue-79-create-issue-txn-retry-labels
    • Branch: worktree-issue-79-create-issue-txn-retry-labels
    • VC preflight: baseline fail = 11(全 AC 想定どおり fail), 想定外 pass = 0, 実行不可 = 0
      • 補足: 当初 AC6 の VC(grep 'sub-issue-readback|retry')が SKILL.md 既存記述に想定外 hit したため、preflight 内で VC を grep 'bounded retry|全試行|retry 成功' に厳格化し baseline fail を確認済み。

    checks

    check result
    template_compliance pass(必須 13 セクション存在)
    state_label pass(state/queued)
    allowed_paths_present pass
    vc_present pass
    stop_conditions_complete pass(10 項目)
    ac_verifiability pass(AC⇔VC 番号一致 11=11、決定論的判定)
    worktree_branch_collision clear

    next_action: implement_issue(impl-review-loop へ handoff)

  9. added
    phase/implementation
    agent/implementer
    on May 20, 2026
  10. squne121 commented on May 20, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-05-20T12:14:35Z)

  11. squne121 commented on May 20, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-05-20T12:20:06Z)

    ループ結果

    Step 結果
    Step 1 Implementation implementation-worker: status ok、PR #105 起票、retry helper + ラベル自動付与 + 単体テスト19件 + docs
    Step 2 Verification test-runner: TEST_VERDICT PASS、AC1-AC11 全 PASS、mergeable MERGEABLE/CLEAN、baseline_only false
    Step 4 PR Review pr-reviewer: LOOP_VERDICT APPROVE、blockers なし、reviewed_head_sha 一致
    Step 5 判定 termination_reason: approved

    次アクション

  12. added a commit that references this issue on May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/implementerenhancementphase/implementationstate/queued

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions