Skip to content

fix(refinement): preflight failure artifact を schema-valid にする - #1803

Merged
squne121 merged 2 commits into
mainfrom
worktree-issue-1037-preflight-schema-recovery-v3
Jul 26, 2026
Merged

squne121 merged 2 commits into
mainfrom
worktree-issue-1037-preflight-schema-recovery-v3

Conversation

@squne121

@squne121 squne121 commented Jul 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • relative $id を absolute URN にし、Draft 2020-12 の reference resolution を portable にします。
  • validator の schema load / check / reference resolution を never-raises の bounded violation に統一します。
  • planner exit 3 でも schema-valid fallback を atomic write・readback validation 後にのみ報告します。
  • この変更は失敗報告の整合性を直すものであり、planner の Issue 判定や policy authority は変更しません。

Checks

  • uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_preflight_runtime_schema_recovery.py .claude/skills/issue-refinement-loop/tests/test_issue_execution_decision_semantic_validator.py .claude/skills/issue-refinement-loop/tests/test_issue_execution_decision_schema.py .claude/skills/issue-refinement-loop/tests/test_issue_execution_decision_schema_parity.py .claude/skills/issue-refinement-loop/tests/test_refinement_preflight.py .claude/skills/issue-refinement-loop/tests/test_preflight_run_with_anchor.py scripts/agent-guards/tests/test_skill_runtime_preflight_bytecode_cache.py scripts/agent-guards/tests/test_skill_runtime_exec_anchor.py scripts/agent-guards/tests/test_skill_runtime_command_policy_anchor.py -q — PASS (202 passed)
  • 失敗経路と通常経路の双方で artifact を読み戻して schema validation することを確認しています。

受け入れ条件の達成状況

AC 達成根拠
AC1 root $id を absolute URN にし、Draft 2020-12 check_schema regression を追加しました。
AC2 schema load、construction、reference resolution の例外を bounded violation へ正規化します。
AC3 planner exit 3 は fail-closed fallback rewrite_constraints と environment_failure を返します。
AC4 artifact を atomic write 後に readback し、schema-valid でなければ canonical artifact として報告しません。
AC5 provenance に interpreter、Python、jsonschema、referencing versions を記録します。
AC6 issue decision、preflight、executor、policy regression suite 202 tests が PASS です。

検証コマンド結果

AC コマンド 結果
AC1–AC6 uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_preflight_runtime_schema_recovery.py .claude/skills/issue-refinement-loop/tests/test_issue_execution_decision_semantic_validator.py .claude/skills/issue-refinement-loop/tests/test_issue_execution_decision_schema.py .claude/skills/issue-refinement-loop/tests/test_issue_execution_decision_schema_parity.py .claude/skills/issue-refinement-loop/tests/test_refinement_preflight.py .claude/skills/issue-refinement-loop/tests/test_preflight_run_with_anchor.py scripts/agent-guards/tests/test_skill_runtime_preflight_bytecode_cache.py scripts/agent-guards/tests/test_skill_runtime_exec_anchor.py scripts/agent-guards/tests/test_skill_runtime_command_policy_anchor.py -q PASS (202 passed)
style uv run --locked ruff check .claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py .claude/skills/issue-refinement-loop/scripts/validate_issue_execution_decision.py .claude/skills/issue-refinement-loop/tests/test_preflight_runtime_schema_recovery.py PASS

Allowed Paths 遵守

  • .claude/skills/issue-refinement-loop/schemas/issue_execution_decision_v1.schema.json
  • .claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py
  • .claude/skills/issue-refinement-loop/scripts/validate_issue_execution_decision.py
  • .claude/skills/issue-refinement-loop/tests/test_preflight_runtime_schema_recovery.py
  • 変更ファイルは上記4件のみで、Issue 修復: issue-refinement-loop preflight の schema-valid failure artifact を保証する #1037 の Allowed Paths 内です。

Schema Change Applicability

  • decision: not_schema_change
  • reason: existing result/decision schema の field、型、enum は変更せず、既存 required field を failure path でも満たします。

Schema Consumer Inventory

N/A
reason: schema shape は不変です。
既存 consumer の入力と出力の互換性を保ちます。

Safety Claim Matrix

Claim Implemented? Not controlled Evidence Follow-up
invalid artifact を canonical filename に残さない yes none readback schema validation regression none
validator exception は bounded violation になる yes none unresolved reference regression none

Notes

@squne121
squne121 marked this pull request as ready for review July 26, 2026 15:09
@github-actions

github-actions Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Preview URL

Preview removed (PR #1803 closed).

@squne121
squne121 merged commit 1b1102e into main Jul 26, 2026
23 checks passed
@squne121
squne121 deleted the worktree-issue-1037-preflight-schema-recovery-v3 branch July 26, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

修復: issue-refinement-loop preflight の schema-valid failure artifact を保証する

1 participant