Skip to content

実装: worktree-agent-runtime-smoke harness に構造化 telemetry フィールドを追加する #1971

Closed

Description

@squne121

Background

Issue #1733 / PR #1947 の scripts/check_post_merge_cleanup_boundary.py(--check runtime_smoke_evidence, AC12)は、worktree-agent-runtime-smoke 共有 harness(scripts/agent-ops/run_worktree_agent_runtime_smoke.py)が生成する summary.md から worker identity / 参照 Skill / spawn event 分類 / tested_head を検証するために、以下の構造化フィールドを best-effort で参照する:

  • tested_head
  • runtime_version
  • requested_agent_type
  • effective_agent_type
  • loaded_skills
  • child_spawn_event_count
  • spawn_events(分類済み)
  • self_restart_event_count
  • orchestration_action_count
  • prompt_sha256

現在の harness は allowlist-only な summary.md(Issue #1921 P1 fix-delta の evidence-hygiene 方針)を書き出しており、上記フィールドを一切出力しない。scripts/agent-ops/run_worktree_agent_runtime_smoke.py は Issue #1733 の Allowed Paths 外だったため、#1733 側では harness 拡張を行わず、チェッカー側を「フィールドが存在すれば厳格検証、存在しなければ warning のみ(fail しない)」という best-effort 設計にした(PR #1947 comment の OWNER レビュー指摘に対する fix_delta)。

この結果、AC12 の genuine PASS は現状 legacy fields(exit_code / timed_out / expected_markers_missing / errors / postcondition_unexpected_changes)のみで成立しており、worker identity / 参照 Skill / spawn event 分類といった本来の semantic 検証は harness 拡張が完了するまで untested のままである。

Outcome

scripts/agent-ops/run_worktree_agent_runtime_smoke.py が summary.md(allowlist-only の evidence hygiene 方針は維持したまま)に、少なくとも以下の構造化フィールドを追加で出力する状態になっている:

  • tested_head(git rev-parse HEAD から独立に導出。呼び出し元の自己申告を信用しない)
  • runtime_version
  • requested_agent_type / effective_agent_type
  • loaded_skills(起動された agent が実際に参照した Skill 名のリスト)
  • child_spawn_event_count / spawn_events(分類済み。raw transcript は保存しない)
  • self_restart_event_count
  • orchestration_action_count
  • prompt_sha256(raw prompt は保存しない。ハッシュのみ)

scripts/check_post_merge_cleanup_boundary.py --check runtime_smoke_evidence の既存 best-effort 検証ロジック(フィールドが存在すれば厳格検証)はそのまま活用でき、上記フィールドの追加により AC12 相当の semantic 検証(worker identity / 参照 Skill / spawn event 分類)が harness レベルで genuine に成立するようになる。

In Scope

  • scripts/agent-ops/run_worktree_agent_runtime_smoke.py の evidence 収集ロジック拡張(上記フィールドの追加)。
  • evidence-hygiene 方針(raw transcript / raw prompt / credential を保存しない)を維持したまま、spawn_events を分類済みの安全な形(種別・件数程度)で出力する設計。
  • references/evidence-hygiene.md の更新(新規フィールドの hygiene 境界を明記)。

Out of Scope

Verification Commands(案)

# baseline-expect: fail
$ uv run --locked python3 scripts/agent-ops/run_worktree_agent_runtime_smoke.py --runtime codex --mode structured --worktree . --prompt-file tmp/runtime-smoke/codex-structured.md --output-dir artifacts/runtime-smoke/codex-structured --timeout-seconds 180 --require-clean-postcondition
$ grep -q "^- tested_head:" artifacts/runtime-smoke/codex-structured/summary.md

Notes

Activity

  1. squne121 commented on Aug 2, 2026

    @squne121
    OwnerAuthor

    本 Issue #1971 が提案していた「worktree-agent-runtime-smoke harness(scripts/agent-ops/run_worktree_agent_runtime_smoke.py)への構造化 telemetry フィールド出力の追加」は、オーナー(squne121)が 2026-08-02 に Issue #1733 の Allowed Paths をこの harness とそのテストへ明示的に拡張することを承認したため、PR #1947(Issue #1733)の fix_delta(iteration 8)で直接実装・解決されました。

    • tested_head / runtime_version / requested_agent_type / effective_agent_type / loaded_skills(静的 frontmatter 由来。loaded_skills_source: static_frontmatter を併記)/ spawn_events / child_spawn_event_count / self_restart_event_count / orchestration_action_count / prompt_sha256 の10フィールドを genuine に導出・出力するようになりました。
    • scripts/check_post_merge_cleanup_boundary.py::check_runtime_smoke_evidence() はこれらを再び hard-required(欠落・None は FAIL)に戻しました。
    • head cbc0ea9bf13dd4a12455c378c448532ce1b0ce8c に対して実際に Codex CLI(--agent-type post-merge-cleanup-worker)で再実行し、Issue 実装: post-merge-cleanup の orchestrator と worker executor を分離する #1733 AC12 の文字通りの Verification Command が genuine PASS(exit 0、WARNING なし)することを確認済みです。

    詳細は PR #1947 本文の ## fix_delta(iteration 8: harness 拡張による AC12 の genuine 解決) と ## Runtime Verification Evidence を参照してください。

    本 PR がマージされ次第、本 Issue #1971 はクローズ候補としてレビューしていただくことを推奨します(クローズ判断自体は control-plane / 人間の判断に委ねます。本コメントでは実行しません)。

  2. squne121 commented on Aug 2, 2026

    @squne121
    OwnerAuthor

    この Issue が求めていた worktree-agent-runtime-smoke harness(scripts/agent-ops/run_worktree_agent_runtime_smoke.py)への構造化 telemetry フィールド追加は、当初の想定(別 follow-up PR)ではなく、オーナー(squne121)の明示承認により Issue #1733 / PR #1947 のスコープ内(Allowed Paths 拡張)で直接実装されました。

    実装内容: tested_head / runtime_version / requested_agent_type / effective_agent_type / loaded_skills / spawn_events / child_spawn_event_count / self_restart_event_count / orchestration_action_count / prompt_sha256 の10フィールドを harness が実出力するようになり、scripts/check_post_merge_cleanup_boundary.py の AC12 検証が再び必須フィールド検証(best-effort ではなく hard-required)に戻されました。pr-review-judge の最終レビューでも独立に harness 実装の妥当性を確認済みです。

    本 Issue は PR #1947(マージ後)により resolved として close します。

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions