Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Zipstack/unstract-python-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.5.2
Choose a base ref
...
head repository: Zipstack/unstract-python-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.5.3
Choose a head ref
  • 13 commits
  • 4 files changed
  • 5 contributors

Commits on Jul 24, 2026

  1. feat(clone): follow DRF pagination on all list endpoints

    Every list_* helper unwrapped a paginated envelope but never sent ?page
    and never followed `next` — it read page one and stopped. Endpoints that
    already paginate (tags/, pipeline/, api/deployment/) have therefore been
    silently truncating at 50 rows, and the same would hit adapters,
    connectors and prompt-studio once UN-3770 makes their pagination
    unconditional. A clone that copies a subset without erroring is worse
    than one that fails.
    
    Add PlatformClient._paginate(), which short-circuits on a bare list so
    the client keeps working against deployments where an endpoint is not
    paginated, otherwise walks `next` to exhaustion. It refuses to return a
    short read: the collected row count is checked against the reported
    count, and a cyclic `next` raises instead of looping forever.
    
    _request() is split so the absolute `next` URLs DRF emits can be issued
    without going through org-relative path composition. Its signature is
    unchanged, so every existing caller is untouched.
    
    All 23 list helpers now route through it. list_lookup_versions keeps its
    bespoke unwrap — that endpoint returns {"versions": [...]}, not a DRF
    envelope.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_018HXYFVCZGi7YN9qjDGyJCQ
    chandrasekharan-zipstack and claude committed Jul 24, 2026
    Configuration menu
    Copy the full SHA
    718f789 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2026

  1. ci: add focused clone test workflow (UN-3770)

    Adds a paths-scoped GitHub Actions workflow that runs the clone test
    suite whenever clone code, its tests, or the dependency set changes.
    Gives a fast, dedicated signal for the pagination page-following logic
    in client._paginate — a silent-truncation regression there is worse
    than a hard failure, so it must stay guarded on every clone change.
    
    The full suite in test.yml still runs on every PR; this narrows the
    trigger and the run to tests/clone/ for quicker feedback.
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    chandrasekharan-zipstack and claude committed Jul 29, 2026
    Configuration menu
    Copy the full SHA
    64d4cb5 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #25 from Zipstack/ci/clone-tests-workflow

    UN-3770 [CI] Add focused clone test workflow
    chandrasekharan-zipstack authored Jul 29, 2026
    Configuration menu
    Copy the full SHA
    68a560f View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2026

  1. Harden _paginate: validate every page + reject off-origin next links

    Addresses Greptile review on #24:
    - Validate the DRF envelope of every page, not just the first — a later
      page that is a bare list / non-envelope now raises PlatformAPIError
      instead of an incidental AttributeError on the next loop turn.
    - Reject a `next` link whose origin differs from the configured platform
      endpoint before following it, so a compromised/misconfigured response
      cannot forward the bearer key to another host.
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_018HXYFVCZGi7YN9qjDGyJCQ
    chandrasekharan-zipstack and claude committed Jul 30, 2026
    Configuration menu
    Copy the full SHA
    4904331 View commit details
    Browse the repository at this point in the history
  2. UN-3770 [FIX] Address Greptile: normalise pagination origin, validate…

    … every page
    
    - _assert_same_origin compares normalised (scheme, host, port) so equivalent
      hosts (case, explicit default port) aren't rejected as off-site.
    - _results_or_raise validates results is a list on every page, so a non-list
      results value fails loudly instead of corrupting rows via extend.
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_018HXYFVCZGi7YN9qjDGyJCQ
    chandrasekharan-zipstack and claude committed Jul 30, 2026
    Configuration menu
    Copy the full SHA
    c38d1ef View commit details
    Browse the repository at this point in the history
  3. UN-3770 [FIX] Guard malformed port in pagination 'next' URL

    urlparse defers port parsing to attribute access, so a `next` link with a
    non-numeric or out-of-range port leaked a ValueError from `_origin` instead
    of the actionable PlatformAPIError used for every other malformed link.
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_018HXYFVCZGi7YN9qjDGyJCQ
    chandrasekharan-zipstack and claude committed Jul 30, 2026
    Configuration menu
    Copy the full SHA
    cc0786d View commit details
    Browse the repository at this point in the history
  4. UN-3770 [CI] Pin clone-tests actions to commit SHAs

    Addresses Greptile: mutable major-version tags (checkout@v4, setup-python@v5,
    setup-uv@v6) could execute unreviewed code on an upstream tag move. Pinned to
    full commit SHAs with the version tracked in a trailing comment.
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_018HXYFVCZGi7YN9qjDGyJCQ
    chandrasekharan-zipstack and claude committed Jul 30, 2026
    Configuration menu
    Copy the full SHA
    c9f6357 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2026

  1. Address pagination review: tolerate proxy origins + empty bodies

    Two blockers from review:
    
    - _paginate raised "unrecognised list payload" on a 204/empty body
      because None falls through to _results_or_raise. Restore the old
      (result or {}).get("results", []) behaviour: an empty body returns [].
      A next link that yields an empty body ends pagination; the count guard
      still flags a genuine short read.
    
    - The same-origin check compared scheme+host+port, so a TLS-terminating
      proxy emitting http:// (or off-port) next links for an https:// client
      aborted every paginated list. Compare host only -- the boundary the
      bearer key is actually scoped to -- so the key still can't leak to
      another host while legitimate proxy setups keep working.
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_018HXYFVCZGi7YN9qjDGyJCQ
    chandrasekharan-zipstack and claude committed Jul 31, 2026
    Configuration menu
    Copy the full SHA
    3dacd58 View commit details
    Browse the repository at this point in the history
  2. Update src/unstract/clone/client.py

    Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
    Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com>
    Configuration menu
    Copy the full SHA
    e8ea582 View commit details
    Browse the repository at this point in the history
  3. Pin pagination next links to the configured origin

    Two Greptile P1s on the previous review round:
    
    - Host-only origin check let an https client follow an http:// (or
      off-port) next link on the same host, putting the bearer key on the
      wire in plaintext or at an unrelated service. Follow the link but pin
      scheme+host+port to the configured base_url, keeping only the server's
      path+query, so the key only ever reaches the configured origin. An
      off-host next is still rejected. Replaces _origin/_assert_same_host
      with _same_origin_url.
    
    - A truthy non-string next (int/list) blew up in seen.add / urlparse
      with an incidental TypeError; guard it and raise PlatformAPIError.
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_018HXYFVCZGi7YN9qjDGyJCQ
    chandrasekharan-zipstack and claude committed Jul 31, 2026
    Configuration menu
    Copy the full SHA
    587317b View commit details
    Browse the repository at this point in the history
  4. Wrap urlunparse args to satisfy ruff E501

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_018HXYFVCZGi7YN9qjDGyJCQ
    chandrasekharan-zipstack and claude committed Jul 31, 2026
    Configuration menu
    Copy the full SHA
    2f79565 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #24 from Zipstack/feat/paginate-list-helpers

    UN-3770 [MISC] Follow DRF pagination on all clone list endpoints
    chandrasekharan-zipstack authored Jul 31, 2026
    Configuration menu
    Copy the full SHA
    9a82bb6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    79f8d09 View commit details
    Browse the repository at this point in the history
Loading