Skip to content

スプリント p2436 - #2452

Merged
takemi-ohama merged 77 commits into
developfrom
sprint/p2436
Nov 3, 2026
Merged

takemi-ohama merged 77 commits into
developfrom
sprint/p2436

Conversation

@takemi-ohama

@takemi-ohama takemi-ohama commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

スプリント p2436 の課題を develop へ取り込む。

利用者向けの変化

移行の手順

  • 無し

課題と設計

コミット

変更の統計

 .../skills/development-workflow/references/loop.md |  22 +-
 .../development-workflow/references/parallel.md    | 137 ++++
 .../development-workflow/references/relay.md       |   3 +
 plugins/ndf/skills/issue-plan-strategy/SKILL.md    |   6 +
 .../references/parallel-plan.md                    |  56 ++
 .../ndf/skills/release/references/release-steps.md |  17 +-
 scripts/check-pr-base.sh                           |  22 +-
 scripts/contracts_lib/model.py                     |  12 +-
 ..._ndf__scripts__lib__parallel_run.py--lines.json |   1 +
 ...__ndf__scripts__lib__sprint_loop.py--lines.json |   1 +
 ...__scripts__lib__sprint_loop_gate.py--lines.json |   1 +
 ...scripts__lib__sprint_loop_record.py--lines.json |   1 +
 scripts/tests/test_check_ndf_contracts.py          |   4 +
 scripts/tests/test_pr_base_guard.py                |  51 ++
 102 files changed, 6645 insertions(+), 513 deletions(-)

テスト(supervise.py の run のステップ)

ステップ exit 最後の行
collect 0

集めた実装の PR

閉じる課題

Closes #2436

手動確認

モード: standard / 通した工程: 実装 → Pull Request

🤖 Generated with Claude Code

takemi-ohama and others added 19 commits November 3, 2026 03:50
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- script-structure の同名の違反: 新しく足した関数を改名した(durable の外からの読み・レーン・計画・実行・CLI)
- parallel.py の deps.require に md・mdtable・versions を足した
- contracts_lib のフォームの例の形に、メッセージと正否の組(parallel-request.json)を足した

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ンを宣言から読む(#2436)

契約の検査の file-dynamic・env-dynamic を例外リストへ足さずに直し、parallel.py と新しい受け渡しのファイル・環境変数の契約を足した。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYHP7xWdWHdeDeY7afGnGT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#2436 を実装する(スプリント p2436)
…orkflow

計画の検査落ち・ls から消えたレーン・承認待ちの知らせ・配布の組み立ての失敗・却下・範囲外の依頼の持ち越しの 6 経路を固定する。

Item-Id: I-001
Impl-Runtime: claude
Impl-Model: claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rallel_workflow

ループの中の停止処理・起動の対象の反映・終了判定・観測と知らせを _handle_stop・_spawn_ready・_finished・_observe へ抽出し、本体はループ制御と各段階の呼び出しだけにした。耐久ワークフローのステップの呼び出し順は変えていない。

Item-Id: I-001
Impl-Runtime: claude
Impl-Model: claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…flow

抽出した _finished / _observe が他モジュールの同名関数と本体違いで構造検査(same-name)に
当たったため、_run_finished / _observe_run へ改名した。振る舞いは変えていない。

Item-Id: I-001
Impl-Runtime: claude
Impl-Model: default
Item-Id: I-002
Impl-Runtime: claude
Impl-Model: claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rocess

spawn の cwd と引数の正規化を同じモジュールの spawn_input(req) へ抜き出した。
restart_input と並ぶ入力の解釈で、process には観測・名前の採番・役割の選択・
judge・launch を残した。観測の順序・断りの JSON・登録簿を書き換える時機は変えていない。

Item-Id: I-002
Impl-Runtime: claude
Impl-Model: claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
現状固定テストの長い行を ruff format の形へ整形した(期待値は変えていない)。

Item-Id: I-002
Impl-Runtime: claude
Impl-Model: default
@takemi-ohama

takemi-ohama commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

改修計画 — devbasex/ai-plugins #2452

/ndf:cross-refactoring が提案し、改修計画し、適用した改善項目の記録である。
理由と手順は提案の時点でしか残らないため、公開の直前に書き出している。

  • 件数: 採用 4・未確認 0・取り消し 0・見送り 25(うち時間 25)(最終ゲート: passed)
  • 公開: e54dbdc を push した
  • 書き直した時刻: 2026-11-03T14:15:49
  • 対象範囲: .github/workflows/pr-base-guard.yml, .serena/project.yml, AGENTS.md, docs/glossary.md, docs/glossary/glossary.json, docs/specifications/ndf-ask-guard.md, docs/specifications/ndf-backlog-refinement-depths.md, docs/specifications/ndf-production-release-record.md, docs/specifications/ndf-relay-multi-session-supervisor.md, docs/specifications/ndf-release-approved-commit.md, docs/specifications/ndf-workflow-development-loop.md, docs/versioning-and-distribution.md, plugins/mcp/mcp-serena/tests/test_serena_lsp_this_repo.py, plugins/ndf/contracts/entrypoints/plugins__ndf__scripts__hook.py.json, plugins/ndf/contracts/entrypoints/plugins__ndf__scripts__parallel.py.json, plugins/ndf/contracts/entrypoints/plugins__ndf__scripts__relay.py.json, plugins/ndf/contracts/entrypoints/plugins__ndf__scripts__sprint-state.py.json, plugins/ndf/contracts/entrypoints/plugins__ndf__scripts__supervise.py.json, plugins/ndf/contracts/env/NDF_PARALLEL_MAX_PLANS.json, plugins/ndf/contracts/env/NDF_PARALLEL_POLL.json, plugins/ndf/contracts/env/NDF_PARALLEL_RELAY.json, plugins/ndf/contracts/env/NDF_PARALLEL_STALL_MINUTES.json, plugins/ndf/contracts/env/NDF_RELAY_MAX_NAMED.json, plugins/ndf/contracts/env/NDF_RELAY_PLAN.json, plugins/ndf/contracts/env/NDF_RELAY_ROLE.json, plugins/ndf/contracts/files/answer-json.json, plugins/ndf/contracts/files/approved-txt.json, plugins/ndf/contracts/files/breakdown-md.json, plugins/ndf/contracts/files/plan-json.json, plugins/ndf/contracts/files/plan-md.json, plugins/ndf/contracts/files/present-json.json, plugins/ndf/contracts/files/presented-json.json, plugins/ndf/contracts/files/prs-txt.json, plugins/ndf/contracts/files/request-id-txt.json, plugins/ndf/contracts/files/request-txt.json, plugins/ndf/contracts/files/requests-json.json, plugins/ndf/contracts/files/run-log.json, plugins/ndf/contracts/files/run-pid.json, plugins/ndf/contracts/forms/parallel-request.json, plugins/ndf/contracts/index.md, plugins/ndf/contracts/settings/release.json.json, plugins/ndf/scripts/hook_lib/ask_guard.py, plugins/ndf/scripts/lib/durable.py, plugins/ndf/scripts/lib/pace.py, plugins/ndf/scripts/lib/parallel_files.py, plugins/ndf/scripts/lib/parallel_lane.py, plugins/ndf/scripts/lib/parallel_plan.py, plugins/ndf/scripts/lib/parallel_release.py, plugins/ndf/scripts/lib/parallel_run.py, plugins/ndf/scripts/lib/sprint_loop.py, plugins/ndf/scripts/lib/sprint_loop_cli.py, plugins/ndf/scripts/lib/sprint_loop_gate.py, plugins/ndf/scripts/lib/sprint_loop_gate2.py, plugins/ndf/scripts/lib/sprint_loop_record.py, plugins/ndf/scripts/lib/sprint_loop_select.py, plugins/ndf/scripts/merged-steps.py, plugins/ndf/scripts/merged_lib/main_lock.py, plugins/ndf/scripts/parallel.py, plugins/ndf/scripts/relay_lib/init.py, plugins/ndf/scripts/relay_lib/hub.py, plugins/ndf/scripts/relay_lib/hub_client.py, plugins/ndf/scripts/release-steps.py, plugins/ndf/scripts/release_lib/approval.py, plugins/ndf/scripts/release_lib/declared_steps.py, plugins/ndf/scripts/release_lib/version_merge.py, plugins/ndf/scripts/sprint-state.py, plugins/ndf/scripts/supervise.py, plugins/ndf/scripts/supervise_lib/paths.py, plugins/ndf/scripts/supervise_lib/plan.py, plugins/ndf/scripts/supervise_lib/queue_fill.py, plugins/ndf/scripts/supervise_lib/release_templates.py, plugins/ndf/scripts/supervise_lib/sprint.py, plugins/ndf/scripts/worktree-session.sh, plugins/ndf/skills/development-workflow/SKILL.md, plugins/ndf/skills/development-workflow/references/asking.md, plugins/ndf/skills/development-workflow/references/loop.md, plugins/ndf/skills/development-workflow/references/parallel.md, plugins/ndf/skills/development-workflow/references/relay.md, plugins/ndf/skills/issue-plan-strategy/SKILL.md, plugins/ndf/skills/issue-plan-strategy/references/parallel-plan.md, plugins/ndf/skills/release/references/release-steps.md, scripts/check-pr-base.sh, scripts/contracts_lib/model.py, scripts/script-structure-allow/plugins__ndf__scripts__lib__parallel_run.py--lines.json, scripts/script-structure-allow/plugins__ndf__scripts__lib__sprint_loop.py--lines.json, scripts/script-structure-allow/plugins__ndf__scripts__lib__sprint_loop_gate.py--lines.json, scripts/script-structure-allow/plugins__ndf__scripts__lib__sprint_loop_record.py--lines.json, tests, plugins/ndf/scripts/tests, plugins/ndf/skills/development-workflow/tests, plugins/ndf/skills/release/tests, scripts/tests
  • テストの戦略: local-scoped-ci-whole(根拠 derived:test_duration)
  • 範囲テストの雛形: uv run --frozen --project . --all-extras pytest {paths} -q -n 4 -o junit_family=xunit1 --junitxml=.ndf/tmp/junit.xml / npm --prefix factory ci --no-audit --no-fund --silent && factory/node_modules/.bin/vitest run --root factory {paths} / python3 scripts/check-script-structure.py {paths}(静的解析) / python3 scripts/check-ndf-contracts.py {paths}(静的解析) / bash scripts/check-lint.sh -- {paths}(静的解析)
  • 最終ゲートへ寄せた危険フラグ: D1, D3, D4(項目 I-002, I-003, I-004)
  • 着手前のテスト: uv run --frozen --project . --all-extras pytest plugins/mcp/mcp-serena/tests/test_serena_lsp_this_repo.py plugins/ndf/scripts/tests plugins/ndf/skills/development-workflow/tests plugins/ndf/skills/release/tests scripts/tests tests -q -n 4 -o junit_family=xunit1 --junitxml=.ndf/tmp/junit.xml && python3 scripts/check-script-structure.py && python3 scripts/check-ndf-contracts.py && bash scripts/check-lint.sh(scope)
  • 着手前のテストの結果: 通過(494.3 秒 / HEAD 22306b8)
  • 既存失敗の件数: 0
  • 想定最大時間: 51 分 / 改修計画の時点で使えた時間: 17.4 分
  • 実装担当: claude

改善項目

I-001 — plugins/ndf/scripts/lib/sprint_loop_select.py#choose_issues

兆候 手法 重要度 等級 提案元 状態 コミット
long_method extract_method major high claude / codex / kiro 採用 1

なぜ: 1 関数に候補集め・スプリント MVV の承認判定・採否・落選行(切り出しの境界の外)の構築が同居し、認知的複雑度 30(計測値)。sorted(ms.get('rows', []), key=lambda r: r['rank']) が 3 回繰り返される。マイルストーンごとのループ本体が読みにくく、承認判定と採否の責務が混ざる。

手順: 1. test_sprint_loop.py の選定・品質枠・保留課題・revise の優先選定のテストを実行する。
2. candidates_of の呼び出しと first の課題の補完を milestone_candidates(ms, rec, first) に抽出する。
3. 選ばれたマイルストーンの境界外の行の整形を outside_boundary_rows(ms, cands, title) に抽出する。
4. choose_issues にはマイルストーンの順序、MVV 承認の照合、_select_candidate_rows の呼び出し、最初の選定成功で返る処理を残す。exclusion_reason の呼び出し回数・順序と merged_at の更新を変えない。
5. 選定行の並び、候補件数、理由、最初に採用されるマイルストーンが既存テストと一致することを確認する。

I-002 — plugins/ndf/scripts/lib/parallel_plan.py#load_plan

兆候 手法 重要度 等級 提案元 状態 コミット
duplication consolidate_duplication major high claude 採用 1

なぜ: 上限を外して計画を読む式 pp.ParallelPlan.model_validate(pp.load_plan(main, name), context={"max_plans": 10**6, "max_named": 10**6}) が parallel_run.py の step_spawn・held_loops・design_held・render_progress と parallel_lane.py の lane_of の 5 か所に同じ形で写されている。上限の値(10**6)の意味も名前が無く、どれか 1 か所だけ直すと読み方が食い違う

手順: 1. parallel_plan.py に def load_valid_plan(main: Path, name: str) -> ParallelPlan を足す(中身は既存の式と同じ。上限は名前付きの _NO_LIMIT = {"max_plans": 10**6, "max_named": 10**6} で渡す。例外はそのまま投げる)
2. parallel_run.py の 4 か所と parallel_lane.py の lane_of の 1 か所を pp.load_valid_plan(...) へ置き換える(try/except の範囲はそのまま)
3. tests/test_parallel_run.py・test_parallel_lane.py・test_parallel_plan.py を流す

I-003 — plugins/ndf/scripts/release_lib/declared_steps.py#STAGES

兆候 手法 重要度 等級 提案元 状態 コミット
dead_code remove_dead_code minor high claude 採用 1

なぜ: 定数 STAGES = ("production", "verification", "any") はどこからも読まれていない(grep で参照 0 件)。同じ値は _StepShape.stage の Literal が持ち、二重の定義のうち効いているのは Literal だけである

手順: 1. リポジトリ全体で declared_steps.STAGES と from release_lib.declared_steps import ... STAGES が無いことを grep で確かめる
2. STAGES の行を消す
3. tests/test_release_steps.py と test_step_scripts.py を流す

I-004 — plugins/ndf/scripts/lib/parallel_run.py#held_loops

兆候 手法 重要度 等級 提案元 状態 コミット
magic_value introduce_named_constant minor high claude 採用 2

なぜ: held_loops が保留の周回の結果を生の文字列 ("配布待ち", "質問待ち") で比べ、ループの記録の置き場も Path(main) / ".ndf" / "loop" / ... / "loop.json" と直書きしている。同じ値の正本は sprint_loop_record.py の PENDING・LOOP_DIR・RECORD にあり、呼び名が変わると並列の側だけが黙って外れる

手順: 1. parallel_run.py で from sprint_loop_record import LOOP_DIR, PENDING, RECORD を読む(循環が無いことを import で確かめる)
2. lap.get("outcome") in ("配布待ち", "質問待ち") を in PENDING に、loop.json のパスを Path(main) / LOOP_DIR / ln.input.loop / RECORD に置き換える(design_held の同じパスも)
3. tests/test_parallel_run.py と tests/test_sprint_loop.py を流す

指標の測定

  • 状態: written / 言語とツールの対応: 既定(.ndf/code-metrics.json は無い) / 所要: 39.0 秒(使えた時間 153 秒 / 上限 153 秒)
  • 指標のファイル: /tmp/ndf-worktrees/devbasex--ai-plugins/rf2452/work/.cross_refactoring/code-metrics-rf2452.md
言語 ツール 版 ランナー ファイル 秒 結果
python ruff-complexipy ruff 0.16.9 / complexipy 8.0.1 uvx 314 0.9 測った
shell — — — 12 — unsupported_language
重複: python symilar pylint 4.0.9 uvx 314 35.7 測った(2 箇所)
重複: shell jscpd jscpd 4.3.0 npx 12 1.2 測った(0 箇所)

時間の上限

値 中身
提案の枠の終わり(監視の上限 = 残り + 余裕) 2026-11-03T13:55:16+00:00
改修計画の枠の終わり(同上) 2026-11-03T14:00:22+00:00
テストの追加の終わり = 実装の終わり − Σ(採っていて未検証の項目の実装の見積り) 2026-11-03T13:59:14+00:00
実装の終わり = 最終ゲートの修正の打ち切り − バッファ − Σ(採っていて未検証の項目の検証の見積り) 2026-11-03T14:01:13+00:00
直しの試行の打ち切り 2026-11-03T14:10:58+00:00
想定最大時間の終わり H(子プロセスはすべてここまでに止まる) 2026-11-03T14:27:50+00:00
確かめの開始の締め切り = H − 確かめの見込み(最終ゲート修正と打ち切りの後の取り消しもここまで) 2026-11-03T14:12:28+00:00
確かめの見込み(秒。最終ゲートの確かめ 1 回。バッファの最終ゲートの全体テスト) 922
最終ゲート修正 1 回の見込み(秒。バッファの final_fix。起動は今 + この値が確かめの開始の締め切り以前のときだけ) 90
指標の測定の上限(秒。提案の枠の中から割く) 153
着手前のテスト 1 回の上限(秒) 4644
範囲テスト 1 回の上限(秒) 1483
手元の全体テスト 1 回の上限(秒) 4644
CI の待ちの上限(秒) 2766
余裕(秒。手順の上限と CLI の上限に足す) 153

入力: 予算 51 分 / 全体テストの所要 w 1548.0(ci-steps) / 着手前の実測 x 494.3 / CI の壁時計 c 922.0 / 着手前のテストの所要の見込み s 1548.0(whole) / 戦略 local-scoped-ci-whole

無音の打ち切りは手順の監視の上限と同じ値である。項目ごとの期限は持たない(実装を止めるのは実装の終わりだけ)。

見送った提案

対象 兆候 理由 根拠(MVV) 補足
plugins/ndf/scripts/lib/sprint_loop_gate2.py#finish_held magic_value budget Value 6 / Value 8 見積り 10.2 分が残りに入らない
plugins/ndf/scripts/lib/parallel_release.py#plan_parallel_release long_method budget Value 1 / Value 6 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/lib/parallel_run.py#_Run.take long_method budget Value 1 / Value 6 / Value 4 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/lib/sprint_loop_select.py#run_selection long_method budget Value 1 / Value 4 / Value 6 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/release-steps.py#cmd_release long_method budget Value 1 / Value 6 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/lib/durable.py#wait duplication budget Value 6 見積り 13.9 分が残りに入らない
plugins/ndf/scripts/lib/sprint_loop_gate2.py#pending_step duplication budget Value 6 / Value 7 見積り 13.9 分が残りに入らない
plugins/ndf/scripts/lib/parallel_run.py#_Run.pause magic_value budget Value 6 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/lib/parallel_run.py#held_loops duplication budget Value 6 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/lib/sprint_loop_gate2.py#finish_pipeline duplication budget Value 6 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/parallel.py#cmd_confirm duplication budget Value 6 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/relay_lib/hub_client.py#cmd_role duplication budget Value 6 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/tests/test_parallel_run.py#env hidden_dependency budget Value 3 / Value 6 見積り 9.4 分が残りに入らない
plugins/ndf/scripts/relay_lib/hub.py#ROLES magic_value budget Value 8 / Value 6 見積り 10.2 分が残りに入らない
plugins/ndf/scripts/lib/parallel_lane.py#send_release_request duplication budget Value 6 見積り 13.9 分が残りに入らない
plugins/ndf/scripts/lib/durable.py#wait_from long_method budget Value 10 / Value 3 / Value 4 見積り 10.3 分が残りに入らない
plugins/ndf/scripts/supervise_lib/release_templates.py#_prepare_steps data_clump budget Value 10 / Value 6 / Value 7 見積り 12.2 分が残りに入らない
plugins/ndf/scripts/lib/parallel_run.py#_Run.resume duplication budget Value 10 / Value 6 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/lib/sprint_loop_gate.py#backlog_summary long_method budget Value 10 / Value 6 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/lib/sprint_loop_gate2.py#pending_pipeline duplication budget Value 6 / Value 10 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/parallel.py#cmd_start duplication budget Value 10 / Value 6 見積り 9.1 分が残りに入らない
plugins/ndf/scripts/lib/parallel_release.py#closes_by_pr long_method budget Value 10 / Value 6 見積り 9.5 分が残りに入らない
plugins/ndf/scripts/lib/sprint_loop_record.py#active_seconds long_method budget Value 10 / Value 3 / Value 4 見積り 10.3 分が残りに入らない
plugins/ndf/scripts/lib/sprint_loop.py#resume_stopped data_clump budget Value 10 / Value 1 / Value 6 見積り 12.2 分が残りに入らない
plugins/ndf/scripts/release-steps.py#_merge_prod_pr long_parameter_list budget Value 10 / Value 6 見積り 12.2 分が残りに入らない

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 1 | codex | REQUEST_CHANGES

通常の起動・提示・配布・周回継続・停止を妨げる接続不備と、承認資料の不整合、PR単位の追加API呼び出しを修正してください。

Comment thread plugins/ndf/scripts/parallel.py Resolved
Comment thread plugins/ndf/scripts/lib/parallel_run.py Resolved
Comment thread plugins/ndf/scripts/parallel.py Resolved
Comment thread plugins/ndf/scripts/lib/parallel_run.py Resolved

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 1 | kiro | REQUEST_CHANGES

まとめた配布と並列進行の設計は一貫しているが、長時間動く wait の経路で DBOS クライアント接続を毎ポーリング開閉している点(処理回数の増加)と、配布の連番に欠番が出たときに released_version が途中で打ち切る点(正しい版を返せない)の 2 点に修正アクションがある。

Comment thread plugins/ndf/scripts/lib/durable.py Resolved
- wait: pause の action を ev から外してから返す(action の重なりで TypeError)
- plan_parallel_release: apply_decls に kind・state を渡し、本番のプランへ提示の承認資料と
  提示のプランの facts・答えの記録を渡す
- present: prs.txt・approved.txt を提示のプランの状態ディレクトリ(state_dir_of)へ書く
- レーンの配布の依頼: prs を省いた呼び出しは前のステージの PR({queue_prs})を載せる
- 配布を組むたびに受けた依頼を releases/requests.json へ書く(契約 requests-json を足す)
- closes_by_pr: PR ごとの gh pr view をまとめた読み出しへ置き換える
- wait_from: DBOSClient を待ちの間 1 つだけ開く
- released_version: 欠番で打ち切らず、配布の置き場のある連番をすべて読む

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@takemi-ohama

Copy link
Copy Markdown
Contributor Author

🔧 /ndf:fix サマリ | round 1 | commit 8cb8006

対応件数: critical=0 / major=9 / minor=0(合計 9 件)
決着: 9 件 / 見送り: 2 件 / 却下: 1 件
CI: SUCCESS

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 2 | claude | REQUEST_CHANGES

配布の途中の stop が設計どおり settle を待たずに耐久ワークフローを終える点、オーガナイザーへの起動指示(release / confirmed)が単一のイベント pause の上書きで失われる点、pace: normal のレーンの本番ステージで {queue_prs} が埋まらず配布の依頼が送れない点の 3 件を直してください。

Comment thread plugins/ndf/scripts/lib/parallel_run.py Resolved
Comment thread plugins/ndf/scripts/lib/parallel_run.py Resolved

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 2 | kiro | APPROVE

round 1 の kiro の 2 件(wait_from の接続の毎ポーリング開閉、released_version の欠番での打ち切り)はどちらも直っている。wait_from は open_client をループの外に 1 度だけ開く形になり、released_version は releases/<連番>/ のある連番をすべて読んで欠番で打ち切らない。他の担当の major(parallel.py の pause action の重なり、plan_parallel_release の Namespace、present の状態パス、sprint の prs 差し込み、承認資料の名前、present の requests.json、closes_by_pr の一括取得)も実装側で解消を確認した。残る未実装(--parallel-helper の手順・終了コード10のループの締め・停止時の一時レーンの扱い)は round 1 で既に指摘され、要ユーザ判断として見送り/却下の記録があるため重複指摘しない。新規の critical/major は見つからなかった。

…へつなぐ

- parallel_run: 承認後の配布(confirmed)の途中に stop を受けたら settle が届くまで耐久ワークフローを終えない(設計の失敗の 12 番)
- parallel_run: イベント pause の上書きで release / confirmed の起動の指示を失わないよう、配布の途中の notice に最後の起動の指示を添える
- sprint: 並列のレーンの「本番」ステージに then_of を付け、{queue_prs} を前のステージの Pull Request で埋める

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@takemi-ohama

Copy link
Copy Markdown
Contributor Author

🔧 /ndf:fix サマリ | round 2 | commit e0e3008

対応件数: critical=0 / major=3 / minor=0(合計 3 件)
決着: 3 件 / 見送り: 2 件 / 却下: 1 件
CI: SUCCESS

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 3 | claude | REQUEST_CHANGES

round 2 の修正のうち 2 点が設計の条件を満たし切っていない。配布の途中の stop を保留する条件が state=confirmed に限られ、MVV 判定が通した配布(提示のまま本番へ流れる)では settle を待たずに終わる点と、wait の --after が pause と questions で 1 つの seq を共有し、pause を先に返すため seq の小さい questions が読み飛ばされて問いが失われる点を直してください。

Comment thread plugins/ndf/scripts/lib/parallel_run.py Resolved
Comment thread plugins/ndf/scripts/parallel.py Resolved

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 3 | codex | REQUEST_CHANGES

提示プランの遷移先・PR引数・関門の扱いを修正してください。

Fix: ndf-next を出さずに終えるレーンが自分のラッパーを止める(#2436 の保留 2 件)

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 9 | claude | REQUEST_CHANGES

c85531a で、問いを保留したレーンが自分のラッパーを止めるようになった。そのため「ラッパーが止まった」が「レーンが終わった」と同じ意味ではなくなった。耐久ワークフローのうち、止まったことを終わりとして扱う 2 か所(一時レーンが止まったときの問い、依存のあるレーンの起動)を、保留中のレーンと区別するように直してください。

Comment thread plugins/ndf/scripts/lib/parallel_run.py Resolved
Comment thread plugins/ndf/scripts/lib/parallel_run.py Resolved

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 9 | codex | REQUEST_CHANGES

問いの転送先の選定と、まとめた問いへの回答後に全持ち主を再開する経路を修正してください。

Comment thread plugins/ndf/scripts/parallel.py Resolved
…た計画を飛ばして問いを送る(#2436 の cross-review round 9)

- _spawn_ready: 答えていない問いを持つレーン・答えを当てていない revive・waiting_only で答えを待つループは止まったと数えない(I8)。答えた時点で止まった持ち主を起こす 1 行を添える
- _ask_helper: 一時レーンが送った答えていない問い(ask も含む)があれば「配布の途中で止まった」を問わない(6g)
- _owner_restart: 同じ原因としてまとめた問いは merged の全持ち主をそれぞれの依頼の id で調べて起こす(異常系 5)
- ask_guard: 同じレーン名を持つ計画を順に試し、送り手でない(4)なら次の候補へ

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@takemi-ohama

Copy link
Copy Markdown
Contributor Author

🔧 /ndf:fix サマリ | round 9 | commit b30dbf2

対応件数: critical=0 / major=4 / minor=0(合計 4 件)
決着: 4 件 / 見送り: 0 件 / 却下: 0 件
CI: SUCCESS

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 10 | codex | REQUEST_CHANGES

質問待ちの回答を適用してから再開する経路と、依頼へ返す配布版・連番の判定を修正してください。

Comment thread plugins/ndf/scripts/lib/parallel_run.py Resolved
Comment thread plugins/ndf/scripts/lib/parallel_run.py Resolved

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 10 | kiro | APPROVE

round 9(commit b30dbf2)の 4 件はいずれも解消を確認した。c85531a43 で「問いを保留したレーンが自分のラッパーを止める」ようになり、ラッパーが止まっても計画が終わったとは限らなくなったため、(1) _spawn_ready は stopped から _asking_lanes(答えていない問いの持ち主)・run.revive(答え未適用)・step_waiting_lanes(waiting_only で待つループ)を引いて依存の判定を行い、依存が絡むときだけループ記録を読む形になった(test_a_held_lane_does_not_release_its_dependents・test_the_plan_waits_until_the_owner_applies_a_design_answer・test_the_plan_does_not_finish_while_a_question_is_unanswered で保留中の la の後に lb を起こさないことを裏付け)。(2) _ask_helper は helper が答えていない問い(_asking_lanes に ask も含む)を送って止まったときは「配布の途中で止まった」を問わない(test_a_helper_that_stopped_after_asking_is_not_asked_about)。(3) _owner_restart は merged の全持ち主をそれぞれの依頼 id で lane_waits にかけ restart 行を '; ' で連結する(test_owner_is_woken_by_the_lane_side_wait_record の qm)。(4) ask_guard.forward_to_organizer は lane_plans_in で同名レーンの候補を順に試し、送り手でない計画(code 4)を飛ばして動いている計画へ送る。全体の FORWARD_TIMEOUT を残り時間で分配する(test_a_finished_plan_with_the_same_lane_name_is_skipped)。sender_of/lane_of が running の計画だけを送り手と認めるため終わった計画は必ず code 4 になる点、stop_self が shlex.quote と "$NDF_RELAY_NAME" で注入に耐える点、parallel_files への新しい import が循環しない点も確認した。reply() が sprint の持ち主を wake へ足して pause('notice') を出すのは _run_finished が全レーン停止を前提とするため早期終了を招かない。新規の critical/major は見つからなかった。残る未実装(--parallel-helper の手順・終了コード 10 のループの締め)は過去ラウンドで要ユーザ判断として記録済みのため重複指摘しない。

@takemi-ohama

Copy link
Copy Markdown
Contributor Author

🔧 /ndf:fix サマリ | round 10 | commit b578f2d

対応件数: critical=0 / major=2 / minor=0(合計 2 件)
決着: 2 件 / 見送り: 1 件 / 却下: 0 件
CI: NONE

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 11 | claude | REQUEST_CHANGES

答えの後に起こした 1 スプリントのレーンの待ち(revive)を外す条件が、観測した状態の変化(stopped → running)だけになっている。起こしたレーンが観測の間隔より短く終わると待ちが外れず、計画が終わらない。

Comment thread plugins/ndf/scripts/lib/parallel_run.py Resolved

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 11 | kiro | APPROVE

round 10(commit b578f2d)の 2 件はいずれも解消を確認した。(1) confirm は出し直しの提示ごとの版を rel["versions"]=[v1,v2] に保持し、確定時に選んだ提示(k=1→old・k=2→new)の版を versions[min(k,len)-1] で rel["version"] へ入れる。settle は msg.get("version") or rel.get("version") で released の版を決めるため、提示 2 を選べば提示 2 の版が依頼の答えへ渡り、提示 1 の古い版にならない(test_settle_answers_with_the_version_of_the_chosen_presentation。提示 1 後に dev_version が 1.2.4 へ進んでも take=new の答えが 1.2.4 を返す)。(2) answer_from_ranges は done を古い配布から順に累積し、各配布の iteration で pr.answerable(pending, rel.prs, done)(want<=have かつ want&got)で答える。これにより依頼は全 PR がそろう=最後の PR が got に入る配布の iteration で初めて答えられ、その配布の rel.version/rel.n を返すため、後の配布の PR を前の配布の版で答えない(test_a_late_request_is_answered_by_the_release_that_completed_it。{10,20} の依頼が配布 2 の 1.2.4/n=2 で、{10} の依頼が配布 1 の 1.2.3/n=1 で答える)。settle 側も done に他の released 配布の prs を入れて同じ answerable を使うため、分割配布でも最後の配布で答える。_Run は durable workflow の replay で take/resume を同順に再適用して releases と rel["versions"] を決定的に再構成するため、打ち直しでも版の選択が保たれる。新規の critical/major は見つからなかった。残る未実装(--parallel-helper の手順・終了コード 10 のループの締め)は過去ラウンドで要ユーザ判断として記録済みのため重複指摘しない。

答えを当ててすぐ止まるレーンは観測の間隔の中で stopped → running → stopped と動き、
状態の変化として見えないため revive が残り、計画が finished へ進まなかった。
relay.py ls の at が答えたときの観測の時刻より後へ進んだら revive から外す。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@takemi-ohama

Copy link
Copy Markdown
Contributor Author

🔧 /ndf:fix サマリ | round 11 | commit 00cba4a

対応件数: critical=0 / major=1 / minor=0(合計 1 件)
決着: 1 件 / 見送り: 1 件 / 却下: 0 件
CI: NONE

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 12 | claude | APPROVE

round 11 の指摘(起こしたレーンの待ち revive を状態の変化だけで外す点)は、00cba4a4e で relay.py ls の at(ラッパーの最後のログ行の時刻)が答えたときの観測の時刻より後へ進んだら外す形に直り、観測の間隔の中で stopped → running → stopped と動いたレーンも外れることを確認した。stopped は tmux のセッションが無いときだけで、そのとき at は log.jsonl の最後の行から取るため、止まったままのレーンで at が進むことはない。round 10 の版の選び方(提示ごとの versions と、古い配布から足して答える answer_from_ranges)にも新しい critical / major は無い。残る見送り(--parallel-helper の手順・終了コード 10 での周回の締め・質問待ちの答えの中身を読む再開)は記録済みのため、重ねて指摘しない。

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 12 | codex | REQUEST_CHANGES

レーンの並列数を生成コマンドまで適用し、引継ぎ文書の保存先の重複を作成前に拒否してください。

差分の外を指す指摘

  • plugins/ndf/scripts/supervise_lib/sprint.py:429 [major] [major / 性能・並行性] スプリントと周回の続きが生成する queue コマンドにも、計画のレーンごとの plans を適用してください。通常の目録が固定の --max 3 を渡すため default_max() が呼ばれず、plans=1 のレーン3本でも最大9プランが動き、検査で許した合計上限6本を超えます。
  • plugins/ndf/scripts/lib/parallel_plan.py:350 [major] [major / 正確性] init の書き込み前に、レーン間で handoff_name() の保存先が重複していないことも検査して拒否してください。異なる課題の2レーンへ同じ handoff を指定すると検査を通り、後の文書が先の文書を上書きして、両レーンが後の課題を開始します。

… cross-review round 12)

- queue の本数の判定を parallel_lane.queue_max へ寄せ、supervise.py queue の既定・スプリントのステージの 1 行・周回のまとめの 1 行・待ち時間の調査が同じ値を使う
- 並列の計画の検査で、handoff_name() の保存先が重なるレーンを I1 で拒む

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@takemi-ohama

Copy link
Copy Markdown
Contributor Author

🔧 /ndf:fix サマリ | round 12 | commit 493ed26

対応件数: critical=0 / major=2 / minor=0(合計 2 件)
決着: 2 件 / 見送り: 1 件 / 却下: 0 件
CI: NONE

レビュー本文の指摘への返事:

  • 対応しました。(493ed2651)
  • 対応しました。(493ed2651)

takemi-ohama and others added 3 commits November 3, 2026 17:32
衝突 3 件を両方の変更を残して解いた: relay_lib/__init__.py は develop の _help への置き換えを採り(role は docstring の表から出る)、hub_client.cmd_ls の metrics は hub・tmux・pinned_account をすべて残し、test_relay_hub の期待値もそれに合わせた。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…parallel_run.py と sprint_loop_gate.py の例外の行数を今の行数へ)(#2436)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant