docs: design issue 448 n1 exec observation - #449
Merged
Conversation
This was referenced Sep 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Issue #448 の設計である。N1 は launcher PID のコマンドラインを 1 回だけ採る。そのため exec 前の launcher 自身を「args 不一致の fail」と判定していた。
これを、binding 観測後に別枠の上限時間まで観測する形へ直す。
文書は
docs/decisions/2026-09-13T164649_issue-448-n1-exec-observation.mdの 1 本だけで、実装は別 PR で行う。Refs #448 #434 #407 #395 #444
断定
N1_EXEC_TIMEOUT_SECONDS=10。起点は binding の観測時点。N1_START_TIMEOUT_SECONDSの残りに収める案は採らない。起点が定まらず、未到達の意味が launcher の欠陥と予算不足で区別できないためps -ww -o command=を採り、launcher、claude、unrecognized、absentに分類する。claudeは argv[0] とCLAUDE_BINおよびCLAUDE_BIN_CANONICALとの一致で判定する。args の照合はclaudeに分類した後にだけ行うclaudeかつ args 一致で pass。claudeかつ args 不一致だけが fail。それ以外(exec_not_observed、launcher_exited_before_exec、process_identity_unrecognized)は unknownexec-observation.jsonに経過秒、分類の遷移、binding の mtime を残す。未到達ならlauncher-stat.txt、process-command.raw、launcher-output-tail.txt(pty.rawの末尾)も残す。さらに、判定を変えない 5 秒の遅延観測で、遅れて exec したかを記録する根拠
scripts/pilot-launcher.sh:715-826)。runner は 1 秒間隔で binding を探し、validate-bindingの後に 1 回だけpsを採る(scripts/pilot-gate-runner.sh:951-975,1320)。どちらの時点になるかは競合で決まるda7e002)と smoke(0c6faff)の差は競合で説明がつくが、実測はしていない。そのため、競合なのか launcher 側の別の欠陥なのかを証跡で切り分けられる形にした(§6.4)stderr.rawではなくpty.rawに出る。未到達時の証跡はpty.rawの末尾から採る試験要件
N1E-01〜08(§7.1)。#448 本文が指定した負の対照を含む。
実装 PR では、この 2 つがそれぞれ判定の変異で KILLED になることを示す。
範囲外の報告
インストール済みの Claude Code は 2.1.270 である。一方、#444 の実装は準備完了の検出を 2.1.268 に束縛している(
N1_READY_VERIFIED_CLI_VERSIONS)。本件を直しても、smoke は
ready_patterns_unverified_for_cli_versionで止まる見込みである(§8)。README への影響
無。gate harness は開発・受入用の内部ツールである。
🤖 Generated with Claude Code
https://claude.ai/code/session_01QCtgi8wVJDRaMwXHZmkHqT