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-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 13cb3f7
Choose a base ref
...
head repository: Zipstack/unstract-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b222266
Choose a head ref
  • 6 commits
  • 22 files changed
  • 2 contributors

Commits on Aug 10, 2026

  1. feat(poc): OpenAPI -> generated SDK -> CLI pipeline

    Proves the layered pipeline for both backends with zero backend repo changes.
    
    - tools/gen_docstudio_spec.py: drf-spectacular over an unstract checkout,
      mounting api_v2.execution_urls at its real prefix so generated paths match
      what the server serves.
    - tools/annotations.py: the @extend_schema_view block for DeploymentExecution,
      applied at runtime, written in the form it will take in the backend.
    - tools/gen_llmw_spec.py: AST walk of the LLMWhisperer Flask controller,
      resolving one level of helper indirection so params read outside the handler
      are not lost.
    - poc/facade.py: retry, sync/async POST rule, dict return shapes, and the
      httpx -> requests exception translation downstream depends on.
    - poc/cli_generated.py derives its flags from the generated request model; a
      new backend serializer field reaches a CLI flag with zero hand-written lines.
    
    Specs are committed and deterministic; the generated SDK is gitignored and
    never hand-edited.
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01NvFMau3jC1hf5hNisPtsrB
    chandrasekharan-zipstack and claude committed Aug 10, 2026
    Configuration menu
    Copy the full SHA
    586ee75 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2026

  1. feat(poc): LLMWhisperer facade, input-diff parity checks, spec-defaul…

    …t fix
    
    Adds the LLMWhisperer half of the published-vs-generated comparison and the
    checks that made it useful.
    
    - poc/llmw_facade.py: facade over the generated LLMWhisperer SDK, mirroring
      the published constructor, retry policy and exception translation.
    - poc/cli_published.py: whisper/webhook groups so both backends have a real
      side-by-side, with flags derived from the published signature.
    - poc/test_llmw_compat.py: signature, constructor and query-string parity.
    - poc/facade.py, poc/test_compat.py: reset untouched request-body fields to
      UNSET so the multipart body carries only what the caller set.
    
    The generator writes every spec-declared default into the request, which the
    published clients never send. On staging this pinned word_confidence_threshold
    and silently dropped low-confidence words from the extracted text. Both facades
    now send only what the caller set; GAPS.md and MEASUREMENTS.md record the
    bisect.
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01NvFMau3jC1hf5hNisPtsrB
    chandrasekharan-zipstack and claude committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    09c0211 View commit details
    Browse the repository at this point in the history
  2. fix(poc): pin the generator, track published client, correct the DB c…

    …laim
    
    - tools/gen_sdk.sh pins openapi-python-client==0.29.0 and reinstalls if the
      venv drifts. Unpinned, a generator upgrade and a spec change produce the
      same diff and cannot be told apart.
    - poc/llmw_facade.py gains word_confidence_threshold. The published client
      moved 9862b8f -> 3832713 and test_llmw_compat.py caught the missing
      parameter offline; both CLIs picked up the flag with no edit.
    - Spec generation does not need a database. Measured against a dead port,
      the spec is byte-identical for both the deployment and the full tenant
      urlconf, so CI needs the backend venv and nothing else.
    - GAPS §14 revised: the bisect baseline was 2.5 months stale, so
      word_confidence_threshold was version skew rather than an over-send. The
      mechanism it proved is unchanged.
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01NvFMau3jC1hf5hNisPtsrB
    chandrasekharan-zipstack and claude committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    2e738a3 View commit details
    Browse the repository at this point in the history
  3. docs: refine why the facade does not auto-expose

    Prior-art survey of 14 SDK-codegen projects shows re-declaration of the
    surface is what blocks auto-exposure, not hand-writing it. Mature wrappers
    inherit or re-export, so new endpoints flow through for free. Our
    re-declaration is justified only where a published contract must be pinned.
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01NvFMau3jC1hf5hNisPtsrB
    chandrasekharan-zipstack and claude committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    10e2d3b View commit details
    Browse the repository at this point in the history
  4. docs: add AGENT_BRIEF for exercising the POC with no prior context

    PR #1's E2E.md targets a much larger CLI — config files, Prompt Studio
    projects, tool export, API deployment — none of which this branch has, so an
    agent following it fails on scenarios that were never in scope. AGENT_BRIEF
    lists the twelve commands that exist, the runnable scenarios, the credentials
    to use and avoid, and the run-to-run noise that is not a defect.
    
    Also records why --help is not enough on its own: the specs carry no parameter
    descriptions, while the published docstring documents all 25.
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01NvFMau3jC1hf5hNisPtsrB
    chandrasekharan-zipstack and claude committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    2d8b425 View commit details
    Browse the repository at this point in the history
  5. test: add error-path parity, and fix the two defects it found

    Points both clients at a local server returning a scripted status and body and
    compares what a caller sees: exception class, status_code, message, or the
    returned dict. 25 comparisons across five methods, no network.
    
    Two defects on the first run, both in code that had passed every existing check
    and a live round trip. The facade read `resp.parsed`, which the generator builds
    only for statuses the spec declares and types loosely for error bodies, so a
    well-formed 500 crashed with AttributeError and an undeclared 401 reported
    "Invalid JSON response from API" for valid JSON. The facade now reads the body,
    as the published client does.
    
    Two more followed from the same change: `_parse_response` calls `.json()`
    unguarded on every declared status, so requests now go through `_get_kwargs`
    and skip generated response parsing entirely; and `status._get_kwargs` was
    over-sending two injected defaults the published client never sends.
    
    Separately the drift gate fired again — llm-whisperer-python-client e8935b3
    adopts this POC's finding that two parameters never reached the service, and
    settles which deprecated spellings forward. The facade mirrors its resolver, and
    the overlay gains `addParams` for parameters read through a helper that takes
    the argument name as an argument, which the AST walk cannot see.
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01NvFMau3jC1hf5hNisPtsrB
    chandrasekharan-zipstack and claude committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    b222266 View commit details
    Browse the repository at this point in the history
Loading