Skip to content

fix(client-contract): state the series_left_out rule the vectors pin and cap a refused failed poll's Retry-After - #42

Merged
jm-rivera merged 2 commits into
devfrom
fix/contract-doc-and-poll-cap
Oct 31, 2026
Merged

jm-rivera merged 2 commits into
devfrom
fix/contract-doc-and-poll-cap

Conversation

@jm-rivera

@jm-rivera jm-rivera commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Three corrections to the client contract.

  • python/client-contract/README.md said a fetch of derived members warns series_left_out only when Recipe.anchor.left_out (the rolling anchor) is non-empty. rules/README.md, rules/series-left-out.json and test_rules.series_left_out warn when any member's manifest lists a series in left_out that a recipe step dropped for a data gap, or says left_out_complete false. The README now states that rule and names the vectors that pin it (growth-left-series-out, list-incomplete, incomplete-with-none-listed).
  • tools/validate_client_contract.py: LongBuild.polled decided whether to post again after a refused poll with code operation_failed with retryable(), so a Retry-After past RETRY_AFTER_MAX_S posted the build again at once, where every other refused poll raises. tries_again now decides for every refused poll. test_a_broken_long_build_is_reported gains refused-failed-operation-past-retry-after-cap (Retry-After: 300), which failed before the change, and test_a_long_build_record_is_valid gains the under-cap control. A running operation's retry_after_ms is a wait the server asks for and stays uncapped. Under the cap, the build is posted again at once, as before, and the README now says so.

The SDK's Python _poll_failed and TypeScript #pollFailed still post the build again on a refused operation_failed poll whose Retry-After passes the cap. No scenario pins the over-cap case yet, so their replays stay green; a scenario for it lands with the SDK change.

  • python/client-contract/CHANGELOG.md: actions.json holds 148 active refusal codes, not 106.

No registry entry, action row or vector changes, so apis and ai keep their pin.

Testing: uv run tools/validate_client_contract.py (148 action rows, 126 scenarios) and uv run tools/validate_registry.py (265 entries) pass, and pytest tools/tests passes (617).

…and cap a refused failed poll's Retry-After

The README said a fetch warns series_left_out only for the rolling anchor's
left-out series. The rule, its vectors and test_rules warn for any manifest's
left_out and for left_out_complete false.

LongBuild.polled decided whether to repost after an operation_failed refused
poll with retryable(), so a Retry-After over the 60-second cap reposted at
once. tries_again now decides for every refused poll.

The CHANGELOG counts 148 active refusal codes in actions.json.
@jm-rivera
jm-rivera merged commit d8d16ac into dev Oct 31, 2026
19 checks passed
@jm-rivera
jm-rivera deleted the fix/contract-doc-and-poll-cap branch October 31, 2026 14:23
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