Skip to content

feat(conformance): gate min_timestamp as a non-fatal freshness hint (§7.3)#50

Merged
CameronBrooks11 merged 1 commit into
mainfrom
feat/conformance-min-timestamp-gate
Jun 24, 2026
Merged

feat(conformance): gate min_timestamp as a non-fatal freshness hint (§7.3)#50
CameronBrooks11 merged 1 commit into
mainfrom
feat/conformance-min-timestamp-gate

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Closes the G4 silent-divergence surface from the pre-Wave-5 audit (#47, part of #49). Decision basis: §7.3 already says "return the best available values and indicate staleness via quality" — so lenient is the spec-aligned behavior; ezo's CODE_DEADLINE_EXCEEDED is the non-conformant outlier. sim/bread are already correct, and nothing tested this, so a shared SDK handler could silently converge either way.

What this does

  • §7.3 clarification (semantics.md): min_timestamp constrains quality, not success — a provider MUST NOT turn an otherwise-readable signal into an error solely because the hint is unmet. The existing §7.3 SHOULDs (best-effort, staleness-via-quality) are unchanged.
  • Core gate: test_min_timestamp_hint_is_not_fatal (far-future min_timestamp → must not be fatal; UNAVAILABLE exempt, like the §7.2 test).
  • Hermetic self-test: test_selftest_freshness_hint_validator proves the harness rejects DEADLINE_EXCEEDED and accepts OK/UNAVAILABLE.
  • checks.assert_freshness_hint_not_fatal helper + client.read_signals(min_timestamp=...).
  • No wire/proto change. CHANGELOG under [Unreleased].

Sequencing (staged on main, no release — option b)

Providers pin the harness, so this is inert in their CI until they bump. anolis-protocol's own CI runs only the hermetic self-tests. ezo's lenient fix and its pin-bump land together in anolishq/anolis-provider-ezo#70 (Phase C), flipping ezo green; sim/bread already pass and bump when convenient.

Local validation

  • Self-tests: 35/35 pass (incl. the new validator).
  • Against built binaries (the proof the gate works): sim PASS · bread SKIP (mock backend → UNAVAILABLE, contract unobservable; full suite otherwise 36 passed/1 known xfail) · ezo FAIL with the exact CODE_DEADLINE_EXCEEDED message.

Do not merge yet if you want to review; it's safe to merge whenever (additive, non-breaking, provider-CI-inert). Refs #47, #49.

…§7.3)

Close the silent-divergence surface flagged by the pre-Wave-5 audit (G4):
ezo returns CODE_DEADLINE_EXCEEDED on an unmet min_timestamp while sim/bread
return CODE_OK + QUALITY_STALE, and no test covered it — so a shared SDK handler
could converge either way undetected.

Clarify semantics.md §7.3: min_timestamp constrains *quality*, not *success* —
a provider MUST NOT turn an otherwise-readable signal into an error solely
because the hint is unmet (the §7.3 SHOULDs are unchanged). Add the core gate
test_min_timestamp_hint_is_not_fatal + the hermetic verifier self-test
test_selftest_freshness_hint_validator, the checks.assert_freshness_hint_not_fatal
helper, and a client read_signals(min_timestamp=...) param. No wire/proto change.

Staged on main (no release yet): providers pin the harness, so this is inert in
their CI until they bump. Validated locally: self-tests 35/35; against binaries
sim PASS, bread SKIP (mock backend -> UNAVAILABLE, contract unobservable),
ezo FAIL (CODE_DEADLINE_EXCEEDED) -> ezo's lenient fix + pin-bump lands in
anolis-provider-ezo#70 (Phase C). Refs anolis-protocol#47, #49.
@github-actions

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow CI / lint (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJun 24, 2026, 4:31 PM

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