366a6da825
모든 spec 파일에 has_code_implementation 메타데이터 추가: - 140개 spec 파일 중 100% 태깅 완료 - 코드 참조 자동 판정 (formula_registry, decision_flow, routing 등) - tag_spec_code_implementation.py: 자동화 도구 추가 진행률: 66.4% → 100% Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
63 lines
2.0 KiB
YAML
63 lines
2.0 KiB
YAML
acceptance_criteria:
|
|
- feature_timestamp_lte_decision_timestamp: true
|
|
- backfilled_after_decision_count: 0
|
|
authority: spec/54_temporal_data_integrity.yaml
|
|
code_path: tools/validate_no_lookahead_bias_v1.py
|
|
contract_id: H003_ANTI_BACKFILL_LOOKAHEAD
|
|
created_at: '2026-06-10T23:29:00+09:00'
|
|
data_freshness_sla:
|
|
fundamental_data_max_age_days: 30
|
|
macro_data_max_age_hours: 24
|
|
price_data_max_age_hours: 1
|
|
definitions:
|
|
backfill_contamination: '과거 결정 평가 시 그 시점에 없던 데이터가 소급 적용된 경우
|
|
|
|
'
|
|
lookahead_bias: 'feature 계산에 사용된 데이터의 as_of_date가 해당 결정이 내려진 decision_timestamp보다
|
|
미래인 경우
|
|
|
|
'
|
|
hard_gates:
|
|
- condition: lookahead_violation_count == 0
|
|
gate_id: NO_LOOKAHEAD
|
|
on_fail: BLOCK_RELEASE
|
|
- condition: backfilled_after_decision_count == 0
|
|
gate_id: NO_BACKFILL_CONTAMINATION
|
|
on_fail: BLOCK_RELEASE
|
|
harness_file: tools/validate_no_lookahead_bias_v1.py
|
|
has_code_implementation: true
|
|
inputs:
|
|
- field: computed_harness_v1.json
|
|
required: true
|
|
source: Temp/computed_harness_v1.json
|
|
- field: GatherTradingData.json
|
|
required: true
|
|
source: GatherTradingData.json
|
|
lifecycle_state: active
|
|
meta:
|
|
has_code_implementation: false
|
|
output_fields:
|
|
- description: feature_timestamp > decision_timestamp 건수
|
|
name: lookahead_violation_count
|
|
type: int
|
|
- description: 결정 이후 소급 backfill된 데이터 건수
|
|
name: backfilled_after_decision_count
|
|
type: int
|
|
- description: freshness 위반 종목 목록
|
|
name: freshness_violation_tickers
|
|
type: list[str]
|
|
- enum:
|
|
- PASS
|
|
- FAIL
|
|
name: gate
|
|
type: str
|
|
owner: data_engineer
|
|
purpose: '백필 데이터와 실시간 데이터의 timestamp/freshness 혼입을 차단한다. feature_timestamp가 decision_timestamp를
|
|
초과하는 lookahead는 즉시 차단한다.
|
|
|
|
'
|
|
retirement_condition: '실시간 스트리밍 파이프라인으로 전환 시 해당 파이프라인 계약으로 교체한다.
|
|
|
|
'
|
|
schema_version: temporal_data_integrity.v1
|