Skip to content

fix(protocol): require integer retry_after emission - #6165

Merged
bokelley merged 3 commits into
mainfrom
fix/retry-after-integer-3-2
Aug 8, 2026
Merged

fix(protocol): require integer retry_after emission#6165
bokelley merged 3 commits into
mainfrom
fix/retry-after-integer-3-2

Conversation

@bokelley

@bokelley bokelley commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Defines deterministic integer error.retry_after emission for AdCP 3.2 without narrowing the released 3.x wire schema.

The migration rule is ceiling before clamping:

  1. AdCP 3.2 producers emit whole seconds.
  2. Consumers that receive a legacy finite fractional value round up.
  3. Clamp the result to 1–3600; treat non-finite values as absent.

Preserving the JSON Schema number type keeps earlier conformant payloads valid. The normative producer requirement supplies the 3.2 behavior, and the consumer rule prevents early retries during migration.

Closes #5953.

Changes

  • Preserves the released numeric wire type and bounds.
  • Requires integer emission from AdCP 3.2 producers.
  • Requires ceiling-before-clamp handling for legacy fractional values.
  • Aligns both error-handling references and the executable JavaScript example.
  • Adds regression coverage for compatibility and migration semantics.
  • Retains the minor protocol changeset because no released payload becomes invalid.

Validation

  • Retry-after regression tests: 2 passed
  • JSON schema parse: passed
  • Changeset protocol scope: passed
  • git diff --check: passed

@bokelley
bokelley marked this pull request as ready for review August 3, 2026 14:37
Comment thread static/schemas/source/core/error.json Outdated

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Request changes

Request changes — 1 blocking finding.

Blocking findings

  • static/schemas/source/core/error.json:27 — retry_after type narrowed from number to integer, a backward-incompatible wire tightening shipped on a minor changeset. A field released in 3.1.x is having its value domain narrowed; a producer that previously emitted a fractional retry_after now emits an invalid value against the tightened schema, breaking conformant 3.1 implementations. Per the changeset-scope rule, a breaking wire change (type narrowing / value-domain restriction on a published field) requires a major changeset, not a minor. This is also a Breaking-class protocol change under the constitution's decision classes, which is never auto-approved without human ratification.

The schema↔docs coherence, ceil-before-clamp migration prose, JS example, and regression test are all internally consistent and correct — the sole concern is the release sizing of the breaking narrowing.

Note: this PR also touches gated paths (static/schemas/source/**) with review_decision: REVIEW_REQUIRED, so it additionally requires human/CODEOWNERS approval before merge.

Row 1 of the decision table (a high finding present) governs: outcome is request-changes.

Blocking findings

  • static/schemas/source/core/error.json:27 — retry_after number -> integer is a breaking type narrowing shipped as minor; breaking wire changes require a major changeset and human ratification

@bokelley bokelley changed the title fix(schema): require integer retry_after seconds fix(protocol): require integer retry_after emission Aug 8, 2026
@bokelley
bokelley dismissed aao-secretariat[bot]’s stale review August 8, 2026 05:06

The number-to-integer schema narrowing was removed in dbdee3e; the released numeric wire type is preserved. Dismissing the stale blocking review pending current-head review.

@bokelley
bokelley requested a review from a team August 8, 2026 05:06
@bokelley
bokelley enabled auto-merge (squash) August 8, 2026 05:07
@bokelley
bokelley disabled auto-merge August 8, 2026 07:02
@bokelley
bokelley merged commit 39ef6da into main Aug 8, 2026
31 checks passed
@bokelley
bokelley deleted the fix/retry-after-integer-3-2 branch August 8, 2026 07:02
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.

spec: decide whether error.retry_after permits fractional seconds

1 participant