Repository navigation
Conversation
…を出力する (#2935) structured 実行の schema_summary top-level に、最初の system/init event の permissionMode を string | null として常に出力する。既存の閉集合 _PERMISSION_MODE_VALUES を再利用し、argv / SubagentStop 等からは補完しない。 新規 offline regression test と policy 文書の位置付けを追加する。 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2940/ The preview will be removed when this PR is closed. |
6 tasks
Owner
Author
Runtime Verification Evidence(AC6 実機検証の証跡): unconfirmed(merge 停止)対象 head:
判定: |
5 tasks
This branch has not been deployed
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.
Summary
run_worktree_agent_runtime_smoke.pyの structured 実行が出力するschema_summary(--evidence-json)の top-level に、permission_mode_observed(string | null)を常に出力するようにしました。値は stream-json の最初のsystem/initevent のpermissionModeだけから取り、非空の文字列で既存の閉集合_PERMISSION_MODE_VALUESに含まれる場合に限って採用します。それ以外はnullです。SubagentStop由来の値からは補完しません。exit code と--require-observed-runtime-fieldの契約、nested のnamed_subagent_resume.permission_mode_observedは変更していません。docs/dev/runtime-verification-policy.mdの第 16 節(位置付け: init 時点の runtime 報告に留まり、effective behavior /effective_permission_profile/ argv との一致は証明しない)を追加しました。本 PR は次の Issue に紐づきます(merge 時に close): Closes #2935
受け入れ条件の達成状況
auto/defaultを含む)で、--evidence-jsonを読み返して top-level の値が一致することを確認(-k "observed and not unobserved": 7 passed)permissionModeなし、null / 数値 / bool / object / list、空文字、bogus、AUTO、最初の init がsession_idもpermissionModeも持たず後続 init が有効値を持つ場合、などを個別の negative case にして、top-level がnull・exit 0 であることを確認。SubagentStopにautoがあっても補完されないことも確認(-k unobserved: 14 passed)scripts/agent-ops/tests/を directory target にしているため未変更runner_helptest(subprocess で--helpを実行して exit 0)が PASS。rg -n "permission_mode_observed" docs/dev/runtime-verification-policy.mdが命中(第 16 節)検証コマンド結果
scripts/agent-ops/testsのruntime_smoke系を広く実行したところ 468 passed / 33 skipped でした。並列実行時にtest_run_worktree_agent_runtime_smoke_claude_gpt_live_causal_evidence.py::test_ac2_native_positive_hook_correlatedが 1 回 fail しましたが、同ファイルを単独で実行すると 5 passed で、負荷依存と判断しています(本 PR の変更とは無関係)。Runtime Verification Evidence(実機動作検証の証跡)
AC6: 実 Claude Code での main-session init permission mode の観測
claude --version、起動条件、exit code、--evidence-jsonの top-levelpermission_mode_observed、evidence["subagent_causal_evidence"]["causal_evidence_source"]nullは PASS ではなくunconfirmedとして扱います。Allowed Paths 遵守
scripts/agent-ops/run_worktree_agent_runtime_smoke.py、scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_main_session_permission_mode.py(新規)、docs/dev/runtime-verification-policy.md.github/ci/python-test-plan.json、既存の permission_mode / named_subagent_resume test、実装: Auto mode の固定 /tmp scratch 上書き false-deny を run-scoped temporary workspace で解消する #2860 / PR fix: Auto mode の固定 /tmp scratch 上書き false-deny を run-scoped workspace で解消する #2931 の file は未変更)Checks
pnpm typecheckpnpm lintpnpm testpnpm buildSchema Change Applicability
WORKTREE_AGENT_RUNTIME_SMOKE_RESULT_V1(schemaの値は変更しない)のschema_summaryに、top-level keypermission_mode_observed(string | null)を 1 つ追加する additive な拡張です。OWNER が Issue 実装: runner の structured 実行 evidence に main-session init permissionMode を観測値として出力する #2935 のコメントで承認した固定契約です。Schema Consumer Inventory
変更対象 schema:
WORKTREE_AGENT_RUNTIME_SMOKE_RESULT_V1のschema_summarytop-level keybefore/after 差分:
Consumer 列挙(rg コマンド例と結果):
Consumer 更新状況:
scripts/agent-ops/run_worktree_agent_runtime_smoke.pydocs/dev/runtime-verification-policy.mdscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_main_session_permission_mode.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_claude_gpt_live_causal_evidence.pyscripts/agent-ops/tests/test_evidence_index_runtime_smoke.pytest_run_scoped_scratch_runtime.pynullと同じく未観測として扱うCompatibility Decision(互換性判定)
additivebackward_compatiblenonullと同じく未観測として扱います。Safety Claim Matrix
権限・サンドボックス・approval の境界は変更せず、runner の evidence に観測値を 1 つ追加するだけです。主張の射程は下表のとおりに限定します。
permission_mode_observedとして観測できるeffective_permission_profile、argv で要求した mode との一致は未検証Notes
本 PR は Claude Code で作成しました。
🤖 Generated with Claude Code