Repository navigation
feat: add entirecli schema admission contract (#1134) - #1178
Conversation
Preview URLPreview removed (PR #1178 closed). |
検証結果レポートIssue #1134: 実装: agent_run_report schema に entirecli_safety admission 契約を追加する。TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: BEHIND
branch_behind_main: true
baseline_only: false
verification_commands_pass: 4
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results:
- ac: AC1
command: "rg -n 'entirecli_safety' docs/schemas/agent-run-report.schema.json"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "schema head で entirecli_safety の定義行を確認"
- ac: AC2
command: "rg -n '\"const\": \"entirecli_safety_result/v1\"' docs/schemas/agent-run-report.schema.json"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "schema_version const を確認"
- ac: AC3
command: "test -f tests/fixtures/agent-run-report/invalid-public-entirecli-blocked.json"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "fixture file exists"
- ac: AC4
command: "rg -n 'schema-admission のみを扱い、producer 接続・posting / retro index の fail-closed enforcement は後続 scope' docs/dev/agent-run-report.md"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "scope boundary 文言を確認"CI_TEST_PERFORMANCE_DECISION_V1CI_TEST_PERFORMANCE_DECISION_V1:
schema: CI_TEST_PERFORMANCE_DECISION_V1
issue_number: 1134
pr_number: 1178
decision_scope: docs_only
changed_paths:
- docs/dev/agent-run-report.md
- docs/schemas/agent-run-report.schema.json
- tests/agent-run-report-schema.test.ts
- tests/agent-logs/entirecli-report-field.test.ts
- tests/agent-logs/generated-report-validation.test.ts
- tests/fixtures/agent-run-report/invalid-public-entirecli-blocked.json
- tests/fixtures/agent-run-report/invalid-public-entirecli-missing-field.json
- tests/fixtures/agent-run-report/invalid-public-entirecli-raw-values.json
- tests/fixtures/agent-run-report/invalid-public-entirecli-unknown-key.json
- tests/fixtures/agent-run-report/invalid-public-entirecli-unknown-verdict.json
- tests/fixtures/agent-run-report/valid-public-entirecli-not-applicable.json
- tests/fixtures/agent-run-report/valid-public-entirecli-safe.json
lane_classification:
fast_static:
applicable: false
evidence:
- "schemas/** 変更は fast_static 対象外"
- "docs/schema/test-only 変更で src や workflow の修正はない"
required_commands: []
python_unit:
applicable: true
evidence:
- "schema / Vitest fixture を更新しており pnpm test が必要"
required_commands:
- "pnpm test"
contract_artifact:
applicable: true
evidence:
- "schema-admission 契約と docs/fixtures を更新している"
required_commands:
- "pnpm test"
- "pnpm typecheck"
- "pnpm lint"
- "pnpm build"
integration:
applicable: false
evidence:
- "runtime wiring や src の変更はない"
required_commands: []
baseline_inputs:
ci_runtime_baseline_v1_available: false
run_count: 0
p50_p95_ready: false
artifact_consistency:
ci_test_selection_v1_checked: true
missing_pytest_args: []
risk_flags:
- docs_only_no_runtime_delta
- baseline_insufficient
reviewer_gate:
approve_allowed: true
required_evidence:
- TEST_VERDICT_MACHINE
- CI_CHECK_RUN_SCOPED
approve_denied_reason: null
follow_up_required: [] |
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, merge_state_status=BEHIND
Evidence Check
- AC coverage: linked issue #1134 / PR本文 / TEST_VERDICT_MACHINE を照合し、reviewed_head_sha
2e10a068b45f910b18e47ce67088a4360a2ac280上で AC1-AC4 の根拠は確認できました。 - Allowed Paths:
allowed_paths_review_gate.pyはstatus: ok、changed files 12件すべてが contract snapshot の Allowed Paths 内でした。 - CI Verification:
ci_verdict_summary.pyは expected head 一致でstatus: all_pass、required checks は success でした。 - 検証コマンド結果: TEST_VERDICT_MACHINE は
verification_commands_pass: 4、verification_skipped_count: 0でした。
Blockers
- なし
Non-blockers
- PR 本文に
## 受け入れ条件の達成状況/## 検証コマンド結果/## Allowed Paths 遵守の required section 名が無いため、update_pr_body_hygieneが必要です。 - mergeability は
MERGEABLEですがmerge_state_status=BEHINDのため、update_branchが必要です。
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "2e10a068b45f910b18e47ce67088a4360a2ac280"
merge_ready: false
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "BEHIND"
blockers: []
required_auto_actions:
- kind: update_pr_body_hygiene
executor: implementation-worker
skill: open-pr.update_pr
blocking_merge_ready: true
mechanical: true
- kind: update_branch
executor: implementation-worker
skill: implement-issue.update_branch
blocking_merge_ready: true
mechanical: true
expected_head_sha: "2e10a068b45f910b18e47ce67088a4360a2ac280"
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
検証結果レポートIssue #1134: 実装: agent_run_report schema に entirecli_safety admission 契約を追加する。TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: CLEAN
branch_behind_main: false
baseline_only: false
verification_commands_pass: 4
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results:
- ac: AC1
command: "rg -n 'entirecli_safety' docs/schemas/agent-run-report.schema.json"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "current head で entirecli_safety の定義行を確認"
- ac: AC2
command: "rg -n '\"const\": \"entirecli_safety_result/v1\"' docs/schemas/agent-run-report.schema.json"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "current head で schema_version const を確認"
- ac: AC3
command: "test -f tests/fixtures/agent-run-report/invalid-public-entirecli-blocked.json"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "current head で invalid fixture file exists"
- ac: AC4
command: "rg -n 'schema-admission のみを扱い、producer 接続・posting / retro index の fail-closed enforcement は後続 scope' docs/dev/agent-run-report.md"
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: "current head で scope boundary 文言を確認" |
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, merge_state_status=CLEAN
Evidence Check
- AC coverage: linked issue #1134、PR 本文の
## 受け入れ条件の達成状況、current head 向け TEST_VERDICT_MACHINE を照合し、af770a847a51dee203d9dbee9cca9831a19d04a3上で AC1-AC4 の根拠を確認しました。 - Allowed Paths:
allowed_paths_review_gate.pyを current head / linked issue contract で再計算し、status: ok、changed files 12 件すべてが Allowed Paths 内でした。 - CI Verification:
ci_verdict_summary.pyは GitHub 詳細取得で待機継続したため raw GitHub fallback に切り替え、gh pr view --json statusCheckRollupで current head の check rollup を確認しました。required checks はすべてSUCCESSで、ci-verdict-summarycheck 自体もSUCCESSでした。 - 検証コマンド結果: current head 向け TEST_VERDICT_MACHINE は
verification_commands_pass: 4、verification_commands_fail: 0、verification_skipped_count: 0でした。 - PR body hygiene:
Closes #1134、## 受け入れ条件の達成状況、## 検証コマンド結果、## Allowed Paths 遵守を current body で確認しました。 - CI_TEST_PERFORMANCE_DECISION_V1: PR 本文に存在し、
reviewer_gate.approve_allowed: true、required evidence はTEST_VERDICT_MACHINEとCI_CHECK_RUN_SCOPEDと記載されていました。changed paths は schema/docs/tests/fixtures に限定され、review-only で追加 follow-up はありませんでした。
Blockers
- なし
Non-blockers
- なし
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "af770a847a51dee203d9dbee9cca9831a19d04a3"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
結論判定: REQUEST_CHANGES 寄りの Conditional Approve。 ただし、#1134 を close して後続 #1153 の前提依存にするなら、まだ誤読されやすい穴があります。 特に「public report で 参照した関連文脈#941 / PR #1131 では EntireCLI safety checker 自体が実装されましたが、 #1134 はその follow-up であり、 過去の #1134 コメントでは、 良い点PR は public surface では テストも以前の「report-like object に値を入れるだけ」から進み、checker result を実際に report に埋めて schema validation する形になっています。safe / not_applicable は pass、blocked は public report で fail、safe なのに reason がある場合、raw true、not_applicable なのに Ajv は strict mode で compile されており、JSON Schema / Ajv の一般的な落とし穴である「未知 keyword や曖昧な schema が静かに無視される」リスクを抑える設定になっています。 Ajv 側も strict mode は schema のミスを静かに無視しないための仕組みとして説明しています。([ajv.js.org]1) 修正要求 1:
|
検証結果レポートIssue #1134 / PR #1178 current head
|
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, merge_state_status=CLEAN
Evidence Check
- AC coverage: linked issue #1134、PR 本文の
## 受け入れ条件の達成状況、current head 向け TEST_VERDICT_MACHINE を照合し、3136a7a3b215a385af40c848b7345ed6dcea68de上で AC1-AC4 の根拠を確認しました。 - Allowed Paths:
allowed_paths_review_gate.pyを current head / linked issue contract snapshot で再計算し、status: ok、changed files 13 件すべてが Allowed Paths 内でした。 - CI Verification:
ci_verdict_summary.pyは GitHub 詳細取得で待機継続したため skill 許容の raw GitHub fallback に切り替え、gh pr view --json statusCheckRollupで current head の required checks がSUCCESSであることを確認しました。 - 検証コマンド結果: current head 向け TEST_VERDICT_MACHINE は
head_sha: 3136a7a3b215a385af40c848b7345ed6dcea68de、verification_commands_pass: 4、verification_commands_fail: 0、verification_skipped_count: 0でした。 - Review follow-up closure: review comment
#4809908277の fix_delta(optional admission / bad schema_version fixture / diagnostic fingerprint caveat / telemetry precedence)は current PR body と current-head TEST_VERDICT extra checks で反映を確認しました。 - PR body hygiene:
Closes #1134、## 受け入れ条件の達成状況、## 検証コマンド結果、## Allowed Paths 遵守を current body で確認しました。 - CI_TEST_PERFORMANCE_DECISION_V1: PR 本文に存在し、
reviewer_gate.approve_allowed: true、required evidence はTEST_VERDICT_MACHINEとCI_CHECK_RUN_SCOPEDでした。
Blockers
- なし
Non-blockers
- なし
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "3136a7a3b215a385af40c848b7345ed6dcea68de"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
Summary
agent_run_reportschema にpublic_safety.entirecli_safetyのEntireCLISafetyResult/v1admission 契約を追加しました。EntireCLISafetyResult/v1を present のときに admit するだけで、public report でpublic_safety.entirecli_safetyを required にはしていません。entirecli_safetyが無い current generated reports も、producer / posting / retro enforcement follow-up までは引き続き valid であり、今回の変更だけでは失敗させません。blockedとraw_values_emitted: trueを schema で reject し、safe/not_applicableだけを許可する cross-field 制約を追加しました。schema_versionnegative fixture/test を追加し、entirecli_safety_result/v2のような値が schema/current validator で fail することを確認しました。checked_surfaces.entire_versionは non-authoritative diagnostic fingerprint として扱い、raw version/provenance を証明する authoritative な field ではないことを docs に明記しました。telemetryを正本として優先し、legacystrategy_options.telemetryは互換入力、未設定はblockedと明記しました。受け入れ条件の達成状況
public_safety.entirecli_safetyと required fields を schema に追加済みです。EntireCLISafetyResult/v1の exact shape と public surface admission 制約を schema に追加済みです。invalid-public-entirecli-bad-schema-version.jsondocs/dev/agent-run-report.mdに schema-admission のみを扱い、runtime enforcement は後続 scope と明記済みです。Checks
pnpm typecheck: 型検査pnpm lint: lint 検査pnpm test: テスト実行pnpm build: build 検証検証コマンド結果
rg -n '"entirecli_safety"' docs/schemas/agent-run-report.schema.jsonrg -n '"const": "entirecli_safety_result/v1"' docs/schemas/agent-run-report.schema.jsontest -f tests/fixtures/agent-run-report/invalid-public-entirecli-blocked.jsonrg -n 'schema-admission のみを扱い、producer 接続・posting / retro index の fail-closed enforcement は後続 scope' docs/dev/agent-run-report.mdrtk vitest run tests/agent-run-report-schema.test.ts tests/agent-logs/entirecli-report-field.test.ts tests/agent-logs/generated-report-validation.test.tsSchema Change Applicability
この変更は report schema の admission 契約を更新する schema change として扱います。
docs/schemas/agent-run-report.schema.jsonにpublic_safety.entirecli_safetyを追加し、public report admission の cross-field 制約を更新したため schema change として扱います。Schema Consumer Inventory
schema consumer への影響範囲を、変更前後の比較として以下に整理します。
before
agent_run_report/v1schema にはpublic_safety.entirecli_safetyが存在せず、EntireCLI checker の結果は report schema に admission されていませんでした。tests/agent-logs/entirecli-report-field.test.tsは checker result の構造保持のみを見ており、Ajv compile や public report invalid fixture を検証していませんでした。after
agent_run_report/v1schema にpublic_safety.entirecli_safetyを追加し、schema_version/verdict/reason_codes/raw_values_emitted/checked_surfacesを required として固定しました。entirecli_safety自体を required にはしておらず、present のときだけEntireCLISafetyResult/v1admission を検証します。invalid-public-entirecli-bad-schema-version.jsonを追加し、wrongschema_versionが schema/current validator の両方で fail することを検証しました。checked_surfaces.entire_versionは diagnostic fingerprint の note を docs に追加し、release provenance の証明には使わない non-authoritative 情報だと明記しました。telemetry優先 / legacystrategy_options.telemetry互換入力 / 未設定 blocked に修正しました。docs/schemas/agent-run-report.schema.jsonEntireCLISafetyResult/v1と public surface cross-field 制約を追加docs/dev/agent-run-report.mdtests/agent-run-report-schema.test.tstests/agent-logs/entirecli-report-field.test.tstests/agent-logs/generated-report-validation.test.tstests/fixtures/agent-run-report/*entirecli*.jsonscripts/lib/agent-run-report-validation.mjsscripts/agent-logs/lib/report-builder.mjsscripts/agent-logs/finalize-agent-run.mjsentirecli_safetyの生成必須化は今回行わないscripts/agent-logs/lib/validate-final-report.mjsscripts/agent-logs/lib/retro-index-builder.mjsSafety Claim Matrix
この PR は runtime enforcement を広げず、schema admission の説明と検証に限定した変更です。
N/A reason: 変更対象は schema / docs / tests / fixtures のみで、permission・sandbox・auth・workflow など validator 上の safety-sensitive path には該当しません。runtime enforcement は #1134 の out-of-scope であり、本 PR は schema-admission 契約だけを固定します。
Allowed Paths 遵守
## Allowed Paths内に限定しています。Notes
補足として、optional admission と後続 follow-up 境界を再掲します。
not_applicableentirecli_safetyが無い current generated reports は、producer / posting / retro enforcement follow-up までは引き続き valid です。