fix: convert astrolabe int provisioned_at to ISO before ProvisioningStatus
Round-4 review (real bug): get_background_sync_status now returns provisioned_at as Unix seconds (the wire/pact value), but ProvisioningStatus.provisioned_at is str | None (ISO). Constructing it for a provisioned user raised a Pydantic ValidationError — a path that was unreachable before the has_access fix. Convert int -> ISO at the oauth_tools boundary (mirroring the existing refresh_token branch), keeping the model schema and the int-asserting contract pact/unit tests intact. Add a regression test that drives the full _get_provisioning_status round-trip with an integer timestamp. Also surface dropped provider-state params in the verifier's _dispatch_state no-op branch (round-4 nit). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
c474f62190
commit
69c40a0479
@@ -86,7 +86,13 @@ def _dispatch_state(state: str, **kwargs) -> None:
|
||||
"""
|
||||
handler = _PROVIDER_STATES.get(state)
|
||||
if handler is None:
|
||||
logger.warning("No provider-state handler registered for %r; no-op", state)
|
||||
# Log any params astrolabe passed so they're visible once real handlers
|
||||
# need them (e.g. given("user X exists", params={"user_id": ...})).
|
||||
logger.warning(
|
||||
"No provider-state handler registered for %r (params=%s); no-op",
|
||||
state,
|
||||
kwargs,
|
||||
)
|
||||
return
|
||||
handler()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user