Repository navigation
Poll cached full scan results until ready - #115
Merged
Merged
Conversation
Wait for cached full scan artifacts and bound retries so SDK callers receive completed results or a clear timeout. Assisted-by: Codex: GPT-6
Exercise the cached stream through the real SDK transport and bump the package version to an unpublished release. Assisted-by: Codex: GPT-6
Resolve the version conflict by riding main's unreleased 3.6.2 instead of bumping to 3.7.0, and add the full-scan polling notes to the 3.6.2 changelog entry.
Stop polling once the next attempt could not start before the deadline instead of sleeping out the budget, give each request the configured timeout rather than a fixed 30s cap, and document the polling parameters in the README.
Contributor
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5a7e742. Configure here.
lelia
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLM Description written by Codex:gpt-6-astra
Keep full-scan reads working while analysis is still processing. Existing callers now use cached results with bounded polling instead of holding one long request.
Root Cause
fullscans.stream()made one uncached request and treated202 Processingas a failed result.Fix
Validation
29 tests pass against a local HTTP fixture using the real SDK and requests transport. Ruff and diff checks pass. Tests cover processing, timeout, transient and permanent failures, encoded identifiers, invalid settings, and artifact parsing.
Ships in the unreleased 3.6.2 alongside #113; the changelog entry is under 3.6.2. No CLI dependency update is included.
Public Changelog
Full-scan reads wait for cached analysis results within the configured timeout.
Note
Medium Risk
Default
fullscans.stream()behavior changes (cached URL, polling, and timeout semantics), which may affect integrations that relied on immediate failure on 202 or uncached reads.Overview
fullscans.stream()no longer treats a single202 Processingas failure. It hits the cached stream endpoint (?cached=true), retries while analysis runs, and returns parsed artifacts once the API responds with200.Polling uses a total budget (default: SDK
timeout) with backoff from 5s to 10s, optionalpoll_*keyword args, and per-request timeouts capped by remaining budget.APITimeoutis raised when results are not ready in time; auth, not-found, and quota errors still fail immediately. TransientAPIFailurecases retry within the same budget.API.do_request()gains keyword-onlyrequest_timeoutfor one-off limits. Org slug and scan id path segments are URL-encoded. Responses are **close()**d during polling and error paths.Docs/changelog for 3.6.2 and a localhost
SocketApiFixtureplus HTTP tests cover processing, retries, timeouts, validation, and encoding.Reviewed by Cursor Bugbot for commit 5a7e742. Configure here.