Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "SUBAGENT_LAUNCH_LEDGER_V1 の writer を trusted local hook process 間で cross-process safe にし、canonical evidence の最終利用を整合した記録だけに限定する"
change_kind: codeParent Issue
なし(#1502 の prerequisite)
Parent Goal Ref
- Goal: SubAgent 起動 ledger の runtime guard 誤検知を、安全境界を弱めずに解消する
- Desired Destination: ledger writer integrity を先に確立し、その後 実装: SubAgent 起動 ledger の更新を runtime guard の誤検知から除外する #1502 が exact-path attribution を実装できる状態にする
Current Validated Scope
scripts/check-codex-agents.mjsのloadLedger()/saveLedger()は排他なしの read-modify-write であり、JSON parse failure を空 ledger にフォールバックするartifacts/codex/subagent-launch-ledger.jsonはSUBAGENT_LAUNCH_LEDGER_V1の canonical evidence である- Node.js 標準 API だけでは、開始前の path substitution を検出しつつ directory-fd 相対の安全な replacement を実装できない
- 並行 hook 実行の ledger integrity は 実装: SubAgent 起動 ledger の更新を runtime guard の誤検知から除外する #1502 から分離した prerequisite として解決する
Remaining Parent Gaps
- 実装: SubAgent 起動 ledger の更新を runtime guard の誤検知から除外する #1502 が root-prefix 集合と exact-path 集合を分離し、exact ledger path の attribution を実装する
- 実装: 契約実行ラッパーに Linux-only optional strict trace attribution mode を追加する #1363 が
strict_straceattribution mode を実装するまで、stdlib mode の child self-write 盲点は Known Limitation のままとする
Outcome
Linux の trusted local Codex hook process が同一 ledger を並行更新しても launch evidence を失わず、開始前から存在する不正な path entry または malformed ledger を fail-close し、canonical evidence の最終利用が dispatch・correlation・少なくとも1件の launch を確認した後だけに限定された状態になる。
Background
現在の writer は fs.writeFileSync() による直接上書きで、同時 writer の lost update と truncate 中 read による empty reset を防げない。決定論的修正として Linux 専用 native helper を追加し、すでに開いた ledger parent directory の fd を基準に openat2 / openat / renameat を使って lock、lock 後再読込、JSON/schema 検証、same-directory temporary file からの atomic replacement を行う。hook 実行を無効化する運用 workaround や artifacts/ 全体の除外は採用しない。
この契約が対象にするのは trusted local hook process 間の競合、実行開始前から存在する substitution、通常の I/O failure だけである。hostile process が check/open/rename の間に path component を差し替える攻撃に対する security boundary は主張しない。その攻撃耐性、ネットワーク filesystem、macOS/Windows の locking は対象外とする。atomic replacement は reader への完全 JSON の可視性を対象とし、system crash 後の durability は主張しない。
In Scope
scripts/subagent-launch-ledger-writer.cを Linux 専用 native helper として追加し、ledger parent directory fd を開いてopenat2(利用不可時はopenatのO_NOFOLLOWを用いる同等の fd-relative path traversal)とrenameatだけで ledger、lock、temporary を扱うscripts/check-codex-agents.mjsから helper source をccでtmp/subagent-launch-ledger-writerに build して起動し、Node.js 側は helper の fail-close reason code を hook failure として返す。配布物は追跡する C source のみであり、build 済み binary は commit しない- trusted local hook process 間では exclusive lock、lock 取得後の再読込、valid
SUBAGENT_LAUNCH_LEDGER_V1のみへの append、same-directory temporary からのrenameatreplacement により lost update を防ぐ。timeout、lock/replacement/build failure は自動 stale-lock 回復や empty reset をせず fail-close にする - helper 起動前に ledger parent、ledger、lock、temporary の各既存 entry を
lstat/ fd-relative open で確認し、symlink、plain-file substitution が不正な directory entry、FIFO、socket、block/character device、またはその他の non-regular file を fail-close にする - malformed JSON または
SUBAGENT_LAUNCH_LEDGER_V1として不正な内容は fail-close とし、空 ledger への置換、partial JSON の公開、canonical evidence としての利用を禁止する - canonical evidence を最終利用する validator/consumer は、少なくとも1件の
launches[]、選択された launch のobserved_dispatch、およびcorrelationを全て観測できなければ fail-close にする tests/test_subagent_launch_ledger_writer.pyで helper の build・独立 process barrier・正常/異常 file type・malformed JSON・canonical evidence 条件を実行検証し、docs/dev/agent-skill-boundaries.mdに上記の保証範囲と非 security-boundary を記録するtests/test_subagent_launch_ledger_writer.pyを.github/ci/python-test-plan.jsonのtargetsに重複なく登録し、python-test の実行対象およびci_test_selection/v1artifact に含める。node-backed-hook-tests は既存のplan_targets_provider_job: python-testによる cross-job coverage として記録し、固定二 nodeid の直接実行対象は変更しない
Out of Scope
skill_runtime_exec.pyの race-tolerant attribution 変更(実装: SubAgent 起動 ledger の更新を runtime guard の誤検知から除外する #1502)artifacts/codex/subagent-launch-ledger.jsonの runtime guard 除外- hostile process による check/open/rename 間の path component race への security guarantee
- strict_strace mode の実装(実装: 契約実行ラッパーに Linux-only optional strict trace attribution mode を追加する #1363)
- macOS/Windows 向け locking 方式、network filesystem、または crash durability の保証
tmp/subagent-launch-ledger-writerを versioned distribution artifact として配布すること
Acceptance Criteria
- AC1: Linux 上で native helper を build して起動した二つの独立 trusted local process が barrier 後に異なる launch/root-action evidence を更新しても、完成した ledger は有効な
SUBAGENT_LAUNCH_LEDGER_V1で両方の evidence を保持する - AC2: helper 起動前から ledger parent、ledger、lock、temporary に存在する symlink/plain-file substitution、FIFO、socket、block/character device、その他 non-regular entry は reason code 付きで fail-close になり、ledger を置換しない
- AC3: malformed JSON、schema 不正、lock timeout、temporary/replacement/build failure は empty reset も partial JSON の reader 公開も行わず fail-close になる
- AC4: canonical evidence の最終利用は少なくとも1件の launch と、選択 launch の
observed_dispatch/correlationが揃う場合だけ成功し、不足時は fail-close になる - AC5: SSOT が trusted local hook process 間の writer integrity、fd-relative Linux helper、開始前 substitution/non-regular-file 拒否、非 security-boundary、atomic visibility と durability の区別、実装: 契約実行ラッパーに Linux-only optional strict trace attribution mode を追加する #1363 への strict-mode handoff を明記する
- AC6:
.github/ci/python-test-plan.jsonのtargetsはtests/test_subagent_launch_ledger_writer.pyを一度だけ含む。python-test のci_test_selection/v1artifact は当該ファイルを収集対象とし、node-backed-hook-tests の artifact は provider_job=python-test による cross-job coverage として扱い、両 artifact のuncovered_changed_test_filesは空になる
Runtime Verification Applicability
decision: immediate
applicable_acs:
- AC1
- AC2
- AC3
- AC4
execution_environment:
cli_tools:
- node
- cc
- python3
- uv
os: linux
auth_required: false
skip_conditions:
- "Linux、node、cc、または uv が利用できない場合は runtime verification を PASS とせず、reason code を記録して Stop Conditions に従う"
fallback_policy:
fallback_success_is_pass: false
notes: "fixed sleep、thread、Node.js-only writer、hook 無効化、または empty ledger reset を成功証跡の代替にしない"
artifact_requirements:
- "pytest の対象 node-id、native helper build argv、独立 process barrier の結果"
- "fail-close の reason code と ledger bytes の readback"
reason: "writer integrity は Node.js と native helper を実際に build・起動し、独立 process と filesystem entry を使わなければ検証できない"Verification Commands
# AC1
$ uv run --locked pytest tests/test_subagent_launch_ledger_writer.py::test_independent_trusted_processes_preserve_distinct_evidence -q
# AC2
$ uv run --locked pytest tests/test_subagent_launch_ledger_writer.py::test_preexisting_substitution_and_nonregular_entries_fail_closed -q
# AC3
$ uv run --locked pytest tests/test_subagent_launch_ledger_writer.py::test_malformed_and_replacement_failures_never_reset_or_publish_partial_json -q
# AC4
$ uv run --locked pytest tests/test_subagent_launch_ledger_writer.py::test_canonical_evidence_requires_launch_dispatch_and_correlation -q
# AC5
$ uv run --locked pytest tests/test_subagent_launch_ledger_writer.py::test_ssot_documents_native_writer_boundary -q
# AC6
$ uv run --locked pytest tests/test_subagent_launch_ledger_writer.py::test_ci_test_selection_plan_includes_writer_test_once -qAllowed Paths
- scripts/check-codex-agents.mjs
- scripts/subagent-launch-ledger-writer.c
- tests/test_subagent_launch_ledger_writer.py
- docs/dev/agent-skill-boundaries.md
- .github/ci/python-test-plan.json
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
SUBAGENT_LAUNCH_LEDGER_V1のキー集合・スキーマ・型定義の変更が必要になった場合- Linux で
openat2/openat/renameatを fd-relative に利用する native helper を Allowed Paths だけでは build・配布できない場合 - hostile process race への security guarantee、network filesystem、crash durability、macOS/Windows support が必要と判明した場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
- Node.js
- C17 / Linux system call API
- Python 3
- pytest
Required Design References
- docs/dev/agent-skill-boundaries.md#Parallel Agent Runtime Safety
- docs/dev/workflow.md#Implementation issue canonical contract
- docs/dev/repository-folder-policy.md#REPOSITORY_FOLDER_POLICY_V1
Scope Delta(任意)
| 項目 | 旧契約 | 更新後 |
|---|---|---|
| writer 実装 | Node.js の lock/temp/replacement | Linux native helper を source 配布し、tmp/ に build して fd-relative 処理 |
| file safety | symlink/plain-file の一般的な fail-close | 開始前 substitution と non-regular file を明示的に fail-close。hostile race は非対象 |
| canonical evidence | ledger が存在すれば利用可能 | launch + observed dispatch + correlation が揃うまで最終利用を fail-close |
Delivery Rule(配信ルール)
- 1 Issue = 1 PR で完結する
- worktree:
.claude/worktrees/issue-1503-subagent-launch-ledger-writer-integrity - Draft PR を既定とする
- 実装: SubAgent 起動 ledger の更新を runtime guard の誤検知から除外する #1502 は本 Issue の PR が merge されるまで blocked とし、preflight wrapper の迂回では復旧しない
Notes for Reviewer(レビュアー向け補足)
openat2が利用できない Linux kernel では helper が fd-relativeopenat+O_NOFOLLOWの限定 fallback を使うか、必要な保証を維持できなければ fail-close すること- lock timeout は fail-close とし、owner identity を検証しない stale-lock unlink を実装しないこと
- independent process + barrier を使用し、fixed sleep だけで同時性を主張しないこと
- build 済み helper を commit せず、
tmp/の untracked binary を canonical evidence または配布物として扱わないこと
Activity
squne121 commentedon Jul 13, 2026
Contract Review Result
squne121 commentedon Jul 13, 2026
限定 overlap preflight waiver
この waiver は deterministic な preflight 出力を書き換えず、上記の狭い条件でのみ #1503 の実装再開を承認する。
squne121 commentedon Jul 14, 2026
Issue #1503 敵対的レビュー
判定
REQUEST_CHANGES — 現行契約のまま実装を開始すべきではありません。
loadLedger()がJSON parse失敗時に空ledgerへフォールバックし、saveLedger()が同一ファイルをwriteFileSync()で直接上書きする現状に対して、排他・lock後の再読込・atomic replacementを導入する方向自体は妥当です。現在の実装は、並行writerによるlost updateと、truncate中の読込を破損ledgerではなく空ledgerとして確定させる危険があります。一方、#1503には次の重大な欠落があります。
fail-closeの意味がCodex hook eventごとに定義されていないPR #1349が確立したrace-tolerant stdlib modeの既知制約、PR #1426が確立したignored ancestor・cold/warm state・独立process barrier・parent substitutionの検証水準を基準にすると、現在の契約はまだ実装可能な精度に達していません。
Blocker 1 — #1503のlock/tempが#1502によって不正writeと判定される
#1503は、ledgerと同一directoryにexclusive lockとtemporary fileを作成する方針です。ところが後続の#1502は、race-tolerant対象を次のledger一ファイルだけに限定し、
artifacts/codex/の別ファイルを引き続きfail-closeさせる契約です。つまり、実装後には少なくとも次のようなpathが発生します。
#1502がledger本体だけを除外した場合、peer hookが作成するlock/tempを
skill_runtime_exec.pyがexecutor childのunauthorized_write_pathとして検出し、今回解消しようとしている誤検知を別pathで再発させます。特に、このリポジトリではartifacts/全体がignoreされており、cold start時には親directoryへ折り畳まれたstatus entryの展開も必要です。 PR #1426でも、まさにこのignored ancestor foldingがBlockerとして検出され、実repo相当の.gitignoreとtargeted expansionを使う修正が必要になっています。必須修正
#1503と#1502の間に、固定されたpublisher path setを定義してください。
推奨は、exclusive lockを前提としてtemporary pathも固定する方式です。uniqueなPID・乱数付きtemporary fileを採用すると、#1502側がprefixまたはglob全体を除外せざるを得ず、stdlib modeにおけるchild self-write盲点が不必要に広がります。
#1502側は、
artifacts/codex/**ではなく上記の固定3 pathだけをrace-tolerant publisher pathとして扱い、それ以外のsiblingをnegative testでfail-closeさせるべきです。この変更は#1503のOutcome・Remaining Parent Gaps・Stop Conditionsに影響します。現在の#521向けlimited waiverは、#1503のOutcome、Allowed PathsまたはStop Conditionsが変わると無効になる契約なので、Issue修正後に再発行が必要です。
Blocker 2 — Verification Commandsが完全にfalse-green
現在の
tests/test_subagent_launch_ledger.pyには3件のテストしかなく、いずれもPython validatorのfixture/audit挙動を検証するだけです。Node.jsの
check-codex-agents.mjs、loadLedger()、saveLedger()、独立process、lock、temporary file、rename、malformed ledger、symlinkのいずれも起動していません。それにもかかわらずcontract snapshotは、AC1・AC2・AC3について同じコマンドを3回実行し、毎回既存3テストの
3 passedをexpected_passとしてstatus: goにしています。これはAC達成の証拠ではなく、無関係な既存regression testの通過です。さらに契約は「pytestのnode-id出力」をartifact requirementにしていますが、Verification Commandsは
-qです。pytestの通常のnode-id表示には-vと具体的node-id指定を使うのが適切です。 ([pytest ドキュメント]1)また、pytestの公開exit codeは0から6であり、pytest単体にはexit 77がありません。
Node.jsまたはpytestが利用できない場合はexit 77という契約を成立させるには、pytestの外側に明示的なshell wrapperが必要です。 ([pytest ドキュメント]2)必須修正
ACごとに固有のnode-idを指定してください。
既存3テストはregression suiteとして残せますが、AC1〜AC3の証拠には使えません。
Blocker 3 —
fail-closeがhook eventごとに定義されていないCodex公式仕様では、同じeventに一致する複数のcommand hookは並行起動されます。したがってcross-process競合は仮定上の問題ではなく、公式runtime modelそのものです。 ([OpenAI Developers]3)
現行
PreToolUse処理は、最初にappendPreToolEvidence()を実行し、その後でtool policyを判定します。ledger writerが例外を送出すると、policy判定とhookDeny()まで到達しません。 また、main entrypointにも例外をCodex hook protocolへ変換するtop-level catchはありません。Codexの
PreToolUseでtool callを明示的にblockする経路は、構造化されたpermissionDecision: deny、旧decision: block、またはstderrへの理由出力を伴うexit code 2です。単なる未処理例外は、少なくとも仕様上の明示的なdeny経路ではありません。 ([OpenAI Developers]3)一方、
SubagentStartではcontinue: falseを返してもsubagentの起動は停止しません。したがって、SubagentStart writer failureを「起動をfail-closeできる」と表現すると誤りです。 ([OpenAI Developers]3)必須修正
event別にfailure contractを分離してください。
PreToolUse
SubagentStart
最低限、次のreason codeが必要です。
Blocker 4 — path substitution保証のthreat modelが過剰
AC3は、ledger targetまたは親directoryのsymlink/plain-file substitutionをfail-closeするとしています。しかし、通常の実装で想定される
lstat → open/write/renameにはpath-prefixのTOCTOUがあります。Node.jsは
O_NOFOLLOWを提供しますが、これはopen対象pathのsymlink拒否に使うflagです。 (Node.js) LinuxではO_NOFOLLOWが保護するのは末尾componentだけで、前段のdirectory componentにあるsymlinkは引き続きfollowされます。 ([man7.org]5)Linuxが
openat()などのdirectory-fd APIを提供する理由の一つは、存在確認とopenの間に親directory componentが並行変更されるpath-prefix raceを防ぐためです。 ([man7.org]5) 全componentのsymlink解決を禁止するにはopenat2()のRESOLVE_NO_SYMLINKS相当が必要ですが、これは単純なNode.js path APIの範囲を超えます。 ([man7.org]6)必須修正
次のどちらかを契約で選んでください。
推奨: cooperative-local threat modelへ狭める
強い保証を維持する
現行IssueのNode.js標準ライブラリ中心のscopeであれば、前者が現実的です。
またAC3はledger targetと親directoryだけでなく、次も明示的に含める必要があります。
artifactsartifacts/codexBlocker 5 — lock protocolが未定義
「bounded cross-process lock」だけでは実装者ごとに安全性が変わります。
現行hook設定のtimeoutは対象scriptで30秒です。lock待機deadlineはこの上限より十分短くし、Codex側timeoutに殺される前に構造化failureを返す必要があります。
Node.jsの
wxまたはO_CREAT | O_EXCLは、既存pathがある場合にopenを失敗させるため、local filesystem上のexclusive lock取得に利用できます。 (Node.js) ただし、O_EXCL系lockingにはnetwork filesystem上の制約があり、proper-lockfileのような既存実装もmkdir、mtime heartbeat、stale threshold、compromise detectionといった別の設計を採っています。 ([GitHub]7)固定すべき契約
重要なのは、mtimeが古いという理由だけでlockを自動削除しないことです。長時間停止、scheduler stall、PID reuse、異なるstale設定などで二重writerが成立します。stale lockはavailability failureとしてfail-closeし、manual recovery手順をSSOTに定義する方が安全です。
同様に、残存temporary fileも無条件削除すべきではありません。所有権を確認できない場合は
ledger_temp_existsで停止してください。Major 6 — 「schema検証」の正本が存在しない
Python validatorには厳格なtop-level・coverage・launch・root-action検証があります。
ただしaudit modeは、少なくとも一件のlaunchを要求し、observed dispatchやcorrelationまで検証します。 PreToolUseが最初のeventで、launchがまだ一件もない正常な途中状態にaudit validatorをそのまま適用すると、writerは正常ledgerを拒否します。
したがってIssueの「schema検証」は次の二層に分ける必要があります。
#1503のAllowed PathsではPython validatorや共有schema fileを変更できません。JS側に独自schemaを実装するなら、既存Python validatorとのparity testを必須にしてください。共有schemaへ正本化するならAllowed Pathsを拡張する必要があり、現行Stop Conditionが発火します。
Major 7 — atomic visibilityとcrash durabilityを分離すべき
same-directory temporary fileからの
rename()は、readerに対して既存targetをatomicに置換でき、失敗時には既存targetを残せます。 ([man7.org]8)ただし、これは「readerがpartial JSONを見ない」というatomic visibilityの保証です。電源断・kernel crash後にも新ledgerを保持するcrash durabilityとは別です。ファイルを
fsync()しても、directory entryの永続化には親directoryの明示的fsync()が必要です。 ([man7.org]9)Issueは次のどちらかを明記すべきです。
高品質推奨
簡易契約
canonical evidenceに対して「evidenceを失わない」と無限定に主張するなら、前者が必要です。
Major 8 — 外部packageを使う場合はAllowed Pathsが不足
現行
package.jsonにはAJVはありますが、proper-lockfileやwrite-file-atomicはありません。新規dependencyを採用すると、少なくともpackage.jsonとlockfileが変更対象になり、現在のAllowed Pathsを逸脱します。write-file-atomicはtemporary file、fsync、renameを実装し、同一fileへの呼出しをPromise queueでserializeします。 ([GitHub]10) ただし、このqueueは説明上同一Node.js process内の呼出しをserializeする仕組みであり、独立hook process間のread-modify-write排他を代替しないと判断すべきです。今回のscopeでは、Node.js標準ライブラリによる固定lock/temp path実装が最も整合的です。packageを導入するならAllowed Pathsとsupply-chain評価を明示的に拡張してください。
Major 9 — 「evidenceを失わない」は現在のdedupe仕様では過大
現行root-action writerは、
tool_nameとcommandが同じentryをduplicateとして追加しません。つまり、同一commandが二回実行された場合、storage raceがなくても一件へ集約されます。したがってOutcomeは、次のように限定する必要があります。
「全hook eventを一件も失わない」ことまで要求するなら、root actionにも
tool_use_idやturn_idを保存するschema変更が必要であり、別scopeです。改訂契約案
改訂Outcome
改訂Acceptance Criteria
推奨実装シーケンス
dynamic temporary fileを採用する場合は、#1502のexact-path安全境界と両立しないため、別途その設計をレビューし直す必要があります。
最終GO条件
次を満たすまで、
implementation-workerへ渡すべきではありません。3 passedをAC1〜AC3の根拠として再利用しない結論はREQUEST_CHANGESです。 設計の方向は正しいものの、現状の契約ではwriterを安全にしても#1502のruntime guardでlock/tempが再び誤検知され、さらにhook failureが正式なdeny経路に乗らない可能性があります。まずcross-Issueのpath contractとevent別failure semanticsを固定する必要があります。
squne121 commentedon Jul 14, 2026
Refinement Loop: Human Escalation Required
The loop has terminated and requires human review. Cause: human judgment required
human_escalationhuman_judgment_requiredBlockers
squne121 commentedon Jul 14, 2026
Contract Review Result
squne121 commentedon Jul 14, 2026
Refinement Loop: Approved
The issue has been approved and is ready for implementation.
approvedsqune121 commentedon Jul 15, 2026
impl-review-loop: 人間判断要請 (2026-07-15T09:22:00Z)
ISSUE_SCOPE_ROLLUP_RUN_RESULT_V1自体はstatus: okでしたが、実行キャプチャ sidecar が存在しないためparse_scope_rollup_run_result.pyはmarker_missing/stop_humanとなりました。契約により raw plan の参照・検証は禁止です。status: okを返すこと。squne121 commentedon Jul 15, 2026
impl-review-loop: scope-rollup 判断記録 (2026-07-15T09:28:00Z)
Issue #1503 について、依頼者の明示判断により scope-rollup の capture sidecar による本物性・最新性検証は不要とします。この実行では raw plan を採用せず、scope-rollup preflight を省略して実装へ進みます。
この判断は scope-rollup のみを対象とします。Issue contract、Allowed Paths、現在の PR HEAD に対する検証、CI、および PR レビューの必須ゲートは引き続き適用します。
squne121 commentedon Jul 15, 2026
impl-review-loop: 人間判断要請 (2026-07-15T09:52:00Z)
human_review_requiredを返しました。source は complete ですが、実装: schema-governance.md の Initial Known Schemas を catalog から生成するスクリプト(#131 FU-5) #521 の旧 waiver は現行 Allowed Paths 変更により無効であり、実装: schema-governance.md の Initial Known Schemas を catalog から生成するスクリプト(#131 FU-5) #521 以外にも fail-closed 根拠があります。sha256:733d53780b8d8c907c4398a754fbadbaef5f8573940295057f25f81c22a73ff6squne121 commentedon Jul 15, 2026
impl-review-loop: overlap preflight 判断記録 (2026-07-15T15:25:07Z)
Issue #1503 について、依頼者の明示判断により live overlap preflight の結果検証・調整を免除します。この実行では preflight が返した候補を採用せず、実装へ進みます。
この判断は #1503 の overlap preflight のみに限定します。Issue contract、Allowed Paths、Runtime Verification、検証コマンド、現在の PR HEAD に対する CI、および PR レビューの必須ゲートは引き続き適用します。
squne121 commentedon Jul 15, 2026
impl-review-loop: 人間判断要請 (2026-07-16T00:54:00Z)
worktree-issue-1503-subagent-launch-ledger-writer-integrityは5693b7d3db547a35e74487b51a0c1a648d031ed0を含みます。現行 contract の Allowed Paths 外であるtests/test_subagent_launch_ledger.pyを変更し、必須 pathscripts/subagent-launch-ledger-writer.cとtests/test_subagent_launch_ledger_writer.pyは未作成です。squne121 commentedon Jul 15, 2026
impl-review-loop: branch reset 承認記録 (2026-07-16T00:56:00Z)
依頼者の明示承認により、Issue #1503 専用 branch/worktree の既存 commit
5693b7d3db547a35e74487b51a0c1a648d031ed0を破棄し、mainを基点として現行 contract 準拠の実装を再開します。対象は
worktree-issue-1503-subagent-launch-ledger-writer-integrityと対応 worktree に限定します。その他の branch / worktree / remote ref は変更しません。squne121 commentedon Jul 15, 2026
impl-review-loop: 人間判断要請 (2026-07-16T01:08:00Z)
実装・検証・push は完了しましたが、Draft PR の正規起票で停止しました。
worktree-issue-1503-subagent-ledger-writer-cross-process-saf/4a43ad34fc2de098d168b4b3e479a56cc061fa22pnpm typecheck、pnpm lint、pnpm test(1575 passed)、pnpm buildはすべて PASSopen-prがphase/implementationlabel により overlap evidence を強制し、実装: SubAgent 起動 ledger writer を cross-process safe にする #1503 限定 owner waiver を受理しない。E_OVERLAP_PREFLIGHT_EVIDENCE_MISSING(evidence_file: None)gh pr createは正規起票手順外のため実行していません。必要な判断:
open-prの overlap hard gate に対し #1503 限定 waiver を受理する正規経路を指定すること。fix: SSOT 見出しの日本語比率を満たす (#1503)
squne121 commentedon Jul 15, 2026
impl-review-loop: 人間判断要請 (2026-07-16T01:16:00Z)
PR #1533 の current HEAD
4b051c7e5d60a9ec9fc095ecde6b90022e48ffcaに対する検証結果です。python-testとnode-backed-hook-testsはGenerate ci_test_selection/v1 artifactで FAILChanged tests: 1/Uncovered tests: 1必要な判断: #1503 の Allowed Paths を拡張するか、CI test-selection 専用の follow-up Issue/PR を作成して先行させること。
squne121 commentedon Jul 15, 2026
Contract Review Result
test: ledger writer を python-test plan に追加 (#1503)
fix: ledger schema invalid を fail-close (#1503)
fix: ledger entry schema を fail-close (#1503)
squne121 commentedon Jul 15, 2026
impl-review-loop: 完了 (2026-07-15T18:00:11Z)
fc98d6017986edf5d84663cdd6aea4c98cea5e7apost-merge-cleanupを実行するfix: ledger writer の fail-close 検証を強化 (#1503)
test: ledger writer の競合 audit を検証 (#1503)
squne121 commentedon Jul 16, 2026
impl-review-loop: 完了 (2026-07-16T10:56:34Z)
e9c6a40146dee3398c7c4f269ad4394f4e6b2bfcfix: SubAgent ledger writer を安全化 (#1533)