Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phaseprocessProcess / template changesworkflowWorkflow / skill automation changes
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1153"
goal_ref: "Child A0 (#1157) の containment / runtime inventory / Kill Switch 完了後、Latitude credential を保持した real pilot 例外を認めるかを人間 Decision として固定し、許可する場合のみ time-boxed activation / rollback / rotation / retention 境界を実装する"
change_kind: mixedParent Issue
Parent Goal Ref
- Goal: Claude Code / Codex CLI / Google Antigravity の運用データを public-safe な agent_run_report/v1 / agent_retro_index/v1 に正規化し、ChatGPT が GitHub 経由で再現可能なレトロスペクティブを行える pilot 運用を確立する
- Desired Destination: private observation plane の credential 境界を人間 Decision 付きで固定し、許可時のみ time-boxed な real pilot activation を行える状態
Current Validated Scope
docs/dev/secret-policy.mdに Latitude real pilot 例外の credential category / storage boundary / rotation owner / revoke procedure を追記するdocs/dev/session-recording-policy.mdに real session start gate と A1 decision 参照境界を追記する.claude/scripts/check_session_recording_runtime_safety.pyと関連 test/fixture に activation gate / blocked 判定を追加するpackage.jsonに policy / host checker 実行経路を追加または調整する
Remaining Parent Gaps
- Child B で Claude / Codex / Antigravity の capture capability verdict を authoritative evidence 付きで確定する
- Child C0/C1 で private observation source を public-safe report schema と adapter に接続する
- Child D で
CHATGPT_RETRO_CONTEXT_V1marker 境界を実装する - Child E で Cloud pilot metrics と adopt / withdraw decision を記録する
Outcome
docs/dev/secret-policy.md と docs/dev/session-recording-policy.md に LATITUDE_PILOT_EXCEPTION_V1 decision 契約が追加され、real pilot 可否が machine-readable に判定できる状態。
In Scope
LATITUDE_PILOT_EXCEPTION_V1decision marker の定義reject_and_uninstall | approve_synthetic_only | approve_timeboxed_real_pilot | deferの closed enum 化approve_timeboxed_real_pilot時の activation window / max eligible runs / allowed issue labels / rollback deadline / stop thresholds の必須化- API key storage boundary / rotation owner / revoke procedure / leakage response の明記
- unpinned
npx/ unknown provenance / non-HTTPS /LATITUDE_DEBUG=1を activation 拒否条件として固定 approve_timeboxed_real_pilot時の distribution 必須フィールド(exact_version/lockfile_digest/npm_registry_signature_verified: true/tarball_sha256/entrypoint_sha256/preload_sha256/hook_command_sha256)の明記- activation gate は Stop hook ではなく session 開始前の host verifier(
check_session_recording_runtime_safety.py --json --execution-profile host)JSON を正本とし、hook は diagnostic layer と明記 security:session-recording:hostの activation 前denyまたはblocked_until_activation判定- provider-side retention / delete verification が機械検証不能な場合の fail-closed / unknown 契約
- parent 導入: EntireCLI + Latitude の観測データを agent_run_report に接続し、GitHub 経由の ChatGPT レトロ動線を確立する #1153 への prerequisite 参照面の明記
Out of Scope
- real telemetry の即時実走
- raw prompt / request body / tool result / local path の表示・hash 化・GitHub 投稿
- Latitude adapter 実装
- Cloud pilot 実行
- self-host 構築
Acceptance Criteria
- AC1:
docs/dev/secret-policy.mdにLATITUDE_PILOT_EXCEPTION_V1decision ブロックが 1 件だけ存在し、decision がreject_and_uninstall | approve_synthetic_only | approve_timeboxed_real_pilot | deferのいずれかである(導入: EntireCLI + Latitude の観測データを agent_run_report に接続し、GitHub 経由の ChatGPT レトロ動線を確立する #1153 comment はdecision_refとして参照) - AC2:
approve_timeboxed_real_pilotの場合、activation window / max eligible runs / allowed issue labels / rollback deadline / stop thresholds が必須である - AC3: API key の storage boundary、rotation owner、revoke procedure、leakage response が
docs/dev/secret-policy.mdに追記されている - AC4:
docs/dev/session-recording-policy.mdの real session start gate が A1 decision を参照し、decision 不在時はBLOCKEDを維持する - AC5: unpinned
npx、unknown provenance、unknown destination、non-HTTPS、LATITUDE_DEBUG=1は real pilot activation を拒否する - AC6:
security:session-recording:hostが secret 非出力 JSON を返し、activation 前はdenyまたはblocked_until_activationになる - AC7: provider-side remote trace state が machine-verifiable でない場合、
remote_cleanup_state: unknownとして PASS にしない - AC8: real API key を argv に渡す手順を禁止し、
argv_exposure_state: absent_verified | possible | unknownを定義する。possibleまたはunknownの場合はcredential_rotation_state: requiredとし activation を blocked にする - AC9: decision が
reject_and_uninstallの場合、quiescent two-stage postcondition と二回 scan の結果を記録する - AC10: 導入: EntireCLI + Latitude の観測データを agent_run_report に接続し、GitHub 経由の ChatGPT レトロ動線を確立する #1153 の Child B / C1 / E が A1 decision marker を prerequisite として参照する
Verification Commands
# AC1
$ rg -c "LATITUDE_PILOT_EXCEPTION_V1" docs/dev/secret-policy.md
# AC2
$ rg -n -e "activation_window" -e "max_eligible_runs" -e "allowed_issue_labels" -e "rollback_deadline" -e "stop_thresholds" docs/dev/secret-policy.md
# AC3
$ rg -n -e "rotation_owner" -e "revoke_procedure" -e "leakage_response" docs/dev/secret-policy.md
# AC4
$ rg -n -e "LATITUDE_PILOT_EXCEPTION_V1" -e "a1_decision_ref" docs/dev/session-recording-policy.md
# AC5
$ rg -n -e "distribution_exact_version" -e "npm_audit_signatures_verified" -e "lockfile_digest" -e "tarball_sha256" docs/dev/secret-policy.md
# AC6
$ rg -n -e "blocked_until_activation" -e "deny" docs/dev/session-recording-policy.md
# AC7
$ rg -n -e "remote_cleanup_state.*unknown" -e "machine_verified" -e "human_attested" docs/dev/secret-policy.md
# AC8
$ rg -n -e "argv_exposure_state" -e "credential_rotation_state" docs/dev/secret-policy.md
# AC9
$ rg -n -e "reject_and_uninstall.*postcondition" -e "quiescent" -e "two.stage" docs/dev/secret-policy.md
# AC10
$ rg -n "LATITUDE_PILOT_EXCEPTION_V1" docs/dev/session-recording-policy.mdAllowed Paths
docs/dev/secret-policy.mddocs/dev/session-recording-policy.md.claude/scripts/check_session_recording_runtime_safety.py.claude/scripts/lib/latitude_telemetry_safety.pytests/session_recording_runtime_safety.test.tstests/fixtures/session-recording-runtime-safety/**package.json
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- credential value を読む、表示する、hash 化する必要が生じた場合
- request spool / remote trace body を読む必要が生じた場合
Required Skills
- Secret Inventory / Kill Switch policy
- Claude Code hook configuration
- npm provenance verification
- fail-closed runtime verification
Scope Delta(任意)
N/A
Runtime Verification Applicability
decision: not_applicable
rationale: 本 Issue は decision gate と checker contract の admission が主目的であり、real pilot 実走は scope 外
Delivery Rule
- 1 Issue = 1 PR
- Draft PR を既定とする
- real telemetry 実走は許可しない
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phaseprocessProcess / template changesworkflowWorkflow / skill automation changes
Activity
squne121 commentedon Jun 28, 2026
判定
REQUEST_CHANGES。現時点の
approve_timeboxed_real_pilotは不可。deferまたはapprove_synthetic_onlyを既定にして、activation gate の検証契約を修正してから実装着手すべきです。#1220 は「A0 #1157 完了後に、Latitude credential を保持した real pilot 例外を人間 Decision として固定する」Issueで、方向性自体は妥当です。対象Issueのコメントは0件なので、追加議論はまだありません。
既存ポリシー上、Latitude API key は
agent_local_secretであり、存在時はsecrets_mode: app_secret。session recording は不許可、real development session も false のままです。session-recording-policy.mdもpilot_state: BLOCKED、real_development_session_allowed: false、別Child Issueの人間Decisionまで blocked と定義しています。Blocker
1. AC1 が
pnpm policy:checkでは証明不能#1220 は「#1153 に
LATITUDE_PILOT_EXCEPTION_V1marker が1件だけ存在する」ことを AC1 にしていますが、現行policy:checkはローカルのsecret-policy.mdとsession-recording-policy.mdの構造検査だけです。GitHub Issue comment を読まず、marker の一意性も検査しません。修正案: decision marker の正本をどちらかに固定してください。GitHub comment を正本にするなら、
gh api等で #1153 comments を取得し、marker が1件だけで enum / required fields / digest が妥当なことを検査する専用 checker が必要です。ローカルdocsを正本にするなら、docs/dev/session-recording-policy.mdに marker YAML を置き、#1153 comment はdecision_refに落とすべきです。2. runtime gate が package script に正しく配線されていない
現行
security:session-recordingは policy / manifest / smoke / secret scan で、check_session_recording_runtime_safety.py --jsonを呼びません。別scriptとしてsecurity:session-recording:fixtureと:hostはありますが、fixture側は--fixture-root tests/fixtures/session-recording-runtime-safetyを渡していません。checker 側も
--fixture-rootがある場合だけ fixture root と home root を明示的に分離します。現状のsecurity:session-recording:fixtureは deterministic fixture check ではなく、repo root 寄りの曖昧な実行になります。修正案:
security:session-recording:hostはローカルpreflight専用に残し、CI required gate には入れない方が安全です。host mode はSRRS_*override を reject する設計なので、実環境の activation 前確認に使うべきです。3. Latitude 配布物の pin / integrity / provenance gate が現実装では不足
Latitude 公式手順は
npx -y @latitude-data/claude-code-telemetry installと unpinnednpxを案内し、manual Stop hook でもnpx -y @latitude-data/claude-code-telemetryを使います。さらに manual hook はasync: trueです。([docs.latitude.so]1)npm の
npxは、指定packageがlocal project dependenciesに無ければ npm cache にinstallして実行し、version指定なしのpackage名はlocal dependencyのversionに一致させる仕様です。つまり unpinnednpxは再現性・実行物同一性の証明に不向きです。([npmドキュメント]2)現行 checker の host distribution check は global
npm list -gを見るだけで、npxがその場で解決した実行物、npm cache、lockfile、tarball digest、entrypoint digest、preload digest を証明しません。dist_integrity/provenance_verifiedも実証ではなくNone/ unknown へ落ちます。修正案:
approve_timeboxed_real_pilotでは、最低限以下が全部揃わない限りblocked_until_activationにしてください。npm audit signaturesは npm provenance / registry signature の検証コマンドとして公式に案内されていますが、provenance は「どこで・どうbuildされたか」の検証リンクであり、悪意あるコードが無いこと自体の保証ではありません。したがって provenance verified だけで allow にしてはいけません。([npmドキュメント]3) ([npmドキュメント]3)4.
--api-keyargv 利用の過去可能性を現行checkerでは証明できないLatitude 公式docsは installer argument として
--api-key=lat_xxxを例示しています。これは shell history / process argv / audit log に残る可能性があります。([docs.latitude.so]1)現行
check_argv_credentialは/proc/self/cmdline、つまり checker自身の argv だけを見ています。過去に installer へ real key を渡したか、別processに残ったか、shell historyに残ったかは証明できません。修正案: #1220 AC8 は「argv key 不使用を機械証明する」ではなく、次に分けるべきです。
possibleまたはunknownなら real pilot activation は拒否し、rotation 完了までblockedにする。shell history の自動scanは禁止のままでよいです。5. async hook を activation gate にしてはいけない
Claude Code hooks は matching した全hookが並列実行されます。plugin / skill / agent frontmatter / managed settings など複数surfaceもあります。([Claude]4) ([Claude]4)
また Claude Code の async hook は block / approve / deny できず、操作完了後に非同期で走るだけです。hook command はユーザー権限で実行されるため、hook exit 0 を安全境界や trace 到達証明として扱うのは不適切です。([Claude]4)
修正案: #1220 の activation gate は Stop hook ではなく、session開始前の host verifier を正本にするべきです。hook は evidence producer ではなく diagnostic layer と明記してください。
High
LATITUDE_BASE_URL/LATITUDE_DEBUGの検査surfaceが弱いです。現行check_destination_transportは host mode で current shell environment のLATITUDE_BASE_URLとLATITUDE_DEBUGを見る設計ですが、Claude settings / managed policy / systemd user environment / environment.d / shell startup file に設定された値まで同じ粒度で検査していません。#1220 は non-HTTPS / unknown destination /
LATITUDE_DEBUG=1を拒否条件にしています。ならばBUN_OPTIONSと同様に、LATITUDE_BASE_URL、LATITUDE_DEBUG、LATITUDE_API_KEY、LATITUDE_PROJECTを全 logical surface で presence scan する必要があります。Latitude docsでも full-fidelity telemetry は prompts / responses / tool input/output / system context を含み、sensitive material 前は無効化が必要と説明されています。([docs.latitude.so]1)実装前に #1220 へ追記すべき要点
特に
remote_trace_stateは現行実装でも default unknown です。provider-side retention / delete verification が機械検証不能なら PASS にせず、risk acceptance を明示するか、activation を拒否すべきです。貼り付け用レビューコメント案
手元で
pnpm実行はしていません。上記は GitHub connector で取得した Issue / PR / repo assets と、Latitude / Claude Code / npm 公式docsに基づくレビューです。squne121 commentedon Jun 28, 2026
Refinement Loop: Approved
The issue has been approved and is ready for implementation.
approvedfeat(#1220): latitude pilot exception decision gate (#1226)
fix: cloud_pilot_success_contract_v1 に decision contract 要素を追加する
docs: cloud pilot success contract を #246 と canonical に整合させる (#1325)
feat: agent_operation_session_index/v1 と chatgpt_retro_execution_proo…