CONTRACT REFERENCE · REVIEW.1

CONTRACT REVIEW · TEST_ONLY계약 구조와 고정 테스트 데이터만 검토 가능 · 운영 API·SDK·판단 권한 없음

PÓLYA v1 데이터 계약

검토 후보 패키지의 스키마와 주요 함수를 확인합니다. 외부 참조를 받을 때 일치해야 하는 값도 함께 설명합니다.

01

검토 후보 package와 schema

  • package: `@polya/contract-ontology`
  • version: `1.0.0-review.1`
  • graph: `polya.decision-graph.v1`
  • case ref: `polya.decision-case-ref.v1`
  • HARBINGER ref: `harbinger.signal-brief-ref.v1`
  • RAIFFA ref: `raiffa.eligibility-gate-ref.v1`
02

주요 검증 함수

verification은 shape, trust, signature, lifetime, tenant, scope와 exact binding을 확인합니다. consumption은 여기에 replay claim을 더합니다. 두 경우 모두 외부 참조의 내용을 재해석하지 않습니다.

정적 계약 표면ts
assertDecisionGraphV1(input)
digestDecisionGraphV1(input)
assertCaseTransition(from, to)
issueDecisionCaseRefV1(graph, options)
verifyHarbingerSignalBriefRefV1(ref, options)
consumeHarbingerSignalBriefRefV1(ref, options)
verifyRaiffaEligibilityGateRefV1(ref, options)
consumeRaiffaEligibilityGateRefV1(ref, options)
03

외부 참조는 opaque envelope로만 결합합니다

  • SignalBriefRef는 raw body나 confidence field를 허용하지 않음
  • DecisionCaseRef digest는 검증된 전체 snapshot에 결합
  • EligibilityGateRef는 actorId와 DecisionCaseRef의 id·digest·issuer를 정확히 비교
  • 만료, 위조, replay와 scope 불일치는 거부