Skip to content

feat(types): add calibration scope and issuer to the reward certificate - #38

Merged
abrichr merged 1 commit into
mainfrom
claude/reward-calibration-scope
Sep 1, 2026
Merged

feat(types): add calibration scope and issuer to the reward certificate#38
abrichr merged 1 commit into
mainfrom
claude/reward-calibration-scope

Conversation

@abrichr

@abrichr abrichr commented Sep 1, 2026

Copy link
Copy Markdown
Member

Follows openadapt-types#37 (released as 0.16.0). Adds the calibration scope and the issuer to RewardCertificateV1, carries both on RewardEvidenceReceiptV1, and tightens certified.

What changes

RewardCertificateV1 gains two required fields: calibration_scope (synthetic or production) and issuer (self_signed or organization). The validator refuses issuer: self_signed with calibration_scope: production. A self-signed certificate can state only what it can compute, and today that is a bound against the synthetic MockMed/ExtraDup corpus.

RewardEvidenceReceiptV1 gains calibration_corpus_digest and calibration_scope. Both must be present whenever a certificate is referenced and both must be absent when certificate_state is absent. certified: true now requires all of: oracle tier 2 or 3, certificate_state: current, a calibration corpus digest, and a stated scope. A new production_certified property is true only for a certified receipt with production scope, which no self-signed certificate can reach.

score() applies the same rule: with a certificate, certified is true only when the certificate is current and carries its corpus digest and scope.

docs/REWARD.md gains a section stating that the only computable certificate today is synthetic-scope, that production scope needs the unpublished Phase-1 calibration, and that public text must keep "certified" beside "synthetic" until that changes.

Tests

test_self_signed_certificate_refuses_production_scope and test_certified_requires_corpus_digest_and_stated_scope cover the two refusals. The existing 33 reward tests are updated for the new required fields; the pinned contract digest is unchanged because RewardContractV1 did not change.

Reviewer checks

  • uv run pytest: 430 passed locally. uv build and scripts/check_source_boundary.py --require-dist pass.
  • Two packaged schema files change: reward-certificate-v1.json and reward-evidence-receipt-v1.json. The file count is unchanged.
  • This is a feat commit, so python-semantic-release cuts 0.17.0 on merge. Consumers of 0.16.0 must add issuer and calibration_scope to any certificate they build.

Opened by an agent session, not the founder.

🤖 Generated with Claude Code

A self-signed certificate may carry only synthetic scope. certified now
requires oracle tier 2 or 3, a current certificate, a calibration corpus
digest, and a stated calibration scope. The receipt carries both. The only
computable scope today is synthetic.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@abrichr
abrichr merged commit cbadccf into main Sep 1, 2026
1 check passed
@abrichr
abrichr deleted the claude/reward-calibration-scope branch September 1, 2026 23:49
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.

1 participant