-
fix(cyclops-sdk): make HttpRequest.timeout_secs optional and add HttpRequestBuilder (#6998)
发布于
2026-08-17 04:34:17 +00:00 - fix(cyclops-sdk): default HttpRequest.timeout_secs to absent
The per-request timeout added timeout_secs to the UniFFI HttpRequest
record as a required field, so every binding constructor changed shape:
callers built for the pre-timeout record raise TypeError against the new
bindings, and callers built for the new record raise
"unexpected keyword argument 'timeout_secs'" against cua-fleet <= 0.1.8.
This version skew broke cua-sandbox 0.3.4 provisioning at
wait_service_ready after pool-create and claim-bind had succeeded.Give the field a UniFFI default of None (and a serde default) so both
construction styles work in every generated binding. Absent still falls
back to the native client's 30-second default, matching the design in
docs/superpowers/specs/2026-08-10-fleet-sdk-per-request-timeout-design.md.Regenerated Python, Kotlin, Swift, and Ruby bindings;
generate-sdk-bindings.sh --check passes and the cyclops-sdk public_api
and service_flow test suites pass.Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_015mvgxXwVSX18pLXySr2ekA- feat(cyclops-sdk): derive a builder for HttpRequest
HttpRequest was the only request record constructed through the raw
UniFFI record constructor, which is exactly why adding timeout_secs
changed its constructor shape under every caller. Derive the existing
UniffiBuilder proc macro on it, matching the other request records, so
callers can construct requests through HttpRequestBuilder where added
optional fields are skippable and future field additions cannot break
construction.Export HttpRequestBuilder from the crate root, cover the skippable
optionals and required-field enforcement in public_api, bump the Ruby
post-processing sanity count from six to seven synchronous builder
build calls, and regenerate the Python, Kotlin, Swift, and Ruby
bindings (generate-sdk-bindings.sh --check passes).Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_015mvgxXwVSX18pLXySr2ekA- fix(cyclops-sdk): construct SDK requests through HttpRequestBuilder
Migrate the binding contract fixture, the Ruby async-client fixture, and
the Python and Ruby app-controlled examples from the raw HttpRequest
constructor to HttpRequestBuilder, so the contract tests and teaching
surfaces exercise the construction path that stays compatible when
record fields are added. Add HttpRequestBuilder coverage to the Python
and Ruby builder suites: optional body/timeout_secs are skippable, a
bounded timeout round-trips, a missing url fails with the stable
MissingRequiredField error, and the legacy constructor still treats
timeout_secs as optional.Also install a pip patchelf in the SDK CI native-wheel job, mirroring
the cua-fleet release runner fix, so auditwheel repair stops failing on
the runner's patchelf 0.14.3.Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_015mvgxXwVSX18pLXySr2ekA
Co-authored-by: Claude noreply@anthropic.com
CloudCyclopsCs-RevId: f4f40d26a9bdf7581c9d580f8df56d697e4f7377下载附件