Phase 3 SP4 — CLI dlw + Python SDK#18
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
R1 (BLOCKER): httpx 0.27.2 ASGITransport is async-only -> sync Client/CLI tests use httpx.MockTransport (tests/sdk/_mock.py); async AsyncClient e2e mirrors tests/api/test_tasks.py (async aclient fixture + ASGITransport). No uvicorn live-server (cross-loop engine hazard). R2 (BLOCKER): tests/sdk/_fixtures.py declares explicit __all__ incl. the underscore autouse fixtures (from..import * would drop them). R3: cancel asserts == "cancelling" (cancel_task never sets cancelled sync). R4: --reason accepted-but-not-persisted documented as MVP limitation. R5: Task 11 no longer hardcodes suite count / alembic head. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… transport Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ript Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
dlw.sdk: syncClient+ asyncAsyncClient, each withtasks.{submit,get,list,cancel,delete}+DownloadTask.{wait,refresh}; typed error hierarchy mapped to POSIX exit codes; config precedence (flag>env>config>default), token-only auth.dlwCLI (argparse, stdlib — matchesdlw-executor):submit/list/show/cancel/delete/watch,-o table|json, exit codes per spec §4.1; CLI-is-SDK. New[project.scripts] dlw=entry.src/dlw/sdk/*,src/dlw/cli/*, tests, docs + one scripts line. No controller endpoint/model/schema/migration/lint change; alembic head +uv.lock+ deps unchanged. Phase 3 sub-project 4 of 4 (SP1 Phase 3 SP1 — Multi-tenancy (OIDC + RBAC + tenant scoping + quota) #15, SP2 Phase 3 SP2 — Multi-source (SourceDriver + NameResolver + LPT/chunk routing) #16, SP3 Phase 3 SP3 — Incremental download + global dedup (refcount/GC) #17 merged) — completes Phase 3.ASGITransportis async-only → sync/CLI tested viahttpx.MockTransport, async via the proventest_tasks.pyASGITransportpattern;_fixtures.py__all__). Final whole-impl opus review: MERGE-READY, 0 CRITICAL/HIGH.Test plan
uv run pytestgreen: 427 passed (381 prior + 46 new SDK/CLI), 0 fail/0 error7636b35e4881unchanged; no dep/lock diffMockTransport) + async (real ASGI app + DB) + CLI exit-code coverageSpec: docs/superpowers/specs/2026-05-19-phase-3-sp4-cli-sdk-design.md
Plan: docs/superpowers/plans/2026-05-19-phase-3-sp4-cli-sdk.md
Known MVP limitations (deferred on purpose, documented in docs/operator/cli-sdk.md §6): client-side
listfilter; pollingwatch/wait(no events endpoint); token-only auth (no OIDC);cancel --reasonaccepted-but-not-persisted.🤖 Generated with Claude Code