GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Poll cached full scan results until ready by jdalton · Pull Request #115 · SocketDev/socket-sdk-python

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Oct 15, 2026 •
edited by cursor Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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 treated 202 Processing as a failed result.

Fix

  • Poll cached results within the caller's configured timeout.
  • Retry processing responses and existing transient errors; preserve authorization and not-found failures.
  • Keep dictionary and typed artifact parsing unchanged.
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 single 202 Processing as failure. It hits the cached stream endpoint (?cached=true), retries while analysis runs, and returns parsed artifacts once the API responds with 200.

Polling uses a total budget (default: SDK timeout) with backoff from 5s to 10s, optional poll_* keyword args, and per-request timeouts capped by remaining budget. APITimeout is raised when results are not ready in time; auth, not-found, and quota errors still fail immediately. Transient APIFailure cases retry within the same budget.

API.do_request() gains keyword-only request_timeout for 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 SocketApiFixture plus HTTP tests cover processing, retries, timeouts, validation, and encoding.

Reviewed by Cursor Bugbot for commit 5a7e742. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jdalton
Poll cached full scan results
97d148a
Wait for cached full scan artifacts and bound retries so SDK callers receive completed results or a clear timeout.

Assisted-by: Codex: GPT-6
@jdalton
John-David Dalton (jdalton) requested a review from a team as a code owner October 15, 2026 04:34
John-David Dalton (jdalton) and others added 5 commits October 15, 2026 00:49
@jdalton
Fix cached scan CI coverage
18b1212
Exercise the cached stream through the real SDK transport and bump the package version to an unpublished release.

Assisted-by: Codex: GPT-6
@lelia
Merge main into fix/python-cached-full-scans
08db635
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.
@lelia
Merge branch 'main' into fix/python-cached-full-scans
ad138f6
@lelia
Tighten full scan polling and document it
3f36f6c
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.
@lelia
Merge branch 'main' into fix/python-cached-full-scans
5a7e742
@lelia

lelia commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

bugbot run

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Nov 3, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

✅ 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lelia
lelia approved these changes Nov 3, 2026
View reviewed changes
@lelia
lelia merged commit 4ade160 into main Nov 3, 2026
16 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@lelia
lelia deleted the fix/python-cached-full-scans branch November 3, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@lelia lelia lelia approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@jdalton @lelia
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.