Files
QuantEngineByItz/spec/52_decision_trace_replay_contract.yaml
kjh2064 4b1a33ba48 WBS-7.11 2차 확장: spec-코드 동기화 태깅 12→20개 (7.5%→12.5%)
이미 harness_file:/python_tool:/validator: 필드로 1:1 코드 매핑을
스스로 명시하고 있던 H001~H008 결정론적 하네스 계약 7개(spec/52~58)와
spec/32(canonical_artifact_resolver), spec/37(evaluation_dashboard_contract)에
has_code_implementation/code_path를 추가했다. 모든 대상 파일의 code_path
실존을 사전 확인했다.

governance/rules/00~05, spec/40·45·46·gas_adapter_contract 등 다중 구현체에
걸친 계약은 단일 code_path로 환원하면 거짓 1:1 매핑이 되므로 의도적으로
제외했다(WBS-7.11 핵심 원칙 유지).
2026-06-22 01:36:55 +09:00

53 lines
1.9 KiB
YAML

schema_version: decision_trace_replay_contract.v1
contract_id: H001_DECISION_TRACE_REPLAY
harness_file: tools/validate_decision_trace_replay_v1.py
has_code_implementation: true
code_path: "tools/validate_decision_trace_replay_v1.py"
authority: spec/52_decision_trace_replay_contract.yaml
created_at: '2026-06-10T23:29:00+09:00'
purpose: >
최종 매수/보유/매도 결론까지 사용된 모든 gate와 feature를 trace로 복원하여,
결정의 재현성을 보장한다. 결론이 달라지는 trace 불일치는 릴리즈를 차단한다.
inputs:
- field: final_decision_packet_active.json
source: Temp/final_decision_packet_active.json
required: true
- field: computed_harness_v1.json
source: Temp/computed_harness_v1.json
required: true
output_fields:
- name: gate_trace
type: list[str]
description: 결론까지 순서대로 통과한 gate ID 목록
- name: feature_trace
type: dict
description: 결론에 사용된 feature key → value 맵
- name: verdict_replay_match
type: bool
description: 재실행 시 최종 verdict가 동일한지 여부
acceptance_criteria:
- every_final_verdict_has_ordered_gate_trace: true
- missing_gate_trace_blocks_release: true
- verdict_replay_match_pct: 100.0
hard_gates:
- gate_id: TRACE_COMPLETE
condition: all decisions have gate_trace length >= 1
on_fail: BLOCK_RELEASE
- gate_id: VERDICT_REPLAY_MATCH
condition: verdict_replay_match_pct == 100.0
on_fail: BLOCK_RELEASE
non_negotiable:
- LLM은 gate_trace를 번복하거나 재해석하지 않는다
- replay 시 동일 packet 입력이면 동일 결론을 내야 한다
- trace가 없는 결론은 DATA_MISSING으로 표기하고 릴리즈를 차단한다
owner: quant_architect
lifecycle_state: active
retirement_condition: >
대체 결정 추적 계약이 이 계약을 명시적으로 교체 선언할 때까지 유효하다.