Skip to content

feature/Client-identification · L-260923-fd0e26 — User-Agent client surface in analytics - #40

Merged
thomashebrard merged 2 commits into
devfrom
feature/Client-identification
Sep 23, 2026
Merged

thomashebrard merged 2 commits into
devfrom
feature/Client-identification

Conversation

@thomashebrard

Copy link
Copy Markdown
Member

PipelexAPIClient now sends a User-Agent on every request, authenticated or anonymous, of the form [app_info] pipelex-sdk-python/ mthds-python/ python/<x.y.z> (; ), following the workspace client-identification spec so the platform can attribute SDK traffic. A new app_info constructor argument takes a Stripe-style AppInfo that puts the integrator first and refuses an invalid token with ValueError; the builder lives in pipelex_sdk/user_agent.py because the pinned mthds 0.14.0 does not ship one yet.

Advances L-260923-fd0e26

🤖 Generated with Claude Code

thomashebrard and others added 2 commits September 23, 2026 09:25
PipelexAPIClient now sets a User-Agent default header on its one httpx
AsyncClient, authenticated or anonymous: [app_info] pipelex-sdk-python/<v>
mthds-python/<v> python/<x.y.z> (<os>; <arch>), per the workspace
client-identification spec. The builder lives in pipelex_sdk/user_agent.py
because the pinned mthds does not ship one yet; AppInfo mirrors the shape
mthds will expose and refuses a non-token field with ValueError.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t-identification spec

An empty version or url now counts as absent instead of being refused, a url must be visible ASCII
so a non-ASCII one is refused at construction rather than breaking httpx on every request, and the
runtime comment keeps whichever platform part is a readable token, as mthds-python does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@thomashebrard

Copy link
Copy Markdown
Member Author

/rev pass, profile 2, round 1 (bar: open), on 81f9663. Reviewers: cubic, Codex (review), and the official code-review (low, clean). The focus was conformance to the client-identification spec and consistency of app_info validation across the SDKs.

Fixed in 13ae4ad: an empty version or url now counts as absent, as the spec requires. The url is restricted to visible ASCII, so a non-ASCII URL is refused at construction instead of making httpx raise on every request. The runtime comment now keeps whichever platform part is a readable token, which matches mthds-python.

Deferred to wip/client-identification/plan.md under "Deferred from review": the AppInfo shape does not match mthds (strict, with a list rather than a tuple for details, unverified); it is settled when this SDK switches to the mthds builder. The same empty-value and URL defects exist in mthds-python and mthds-js; those were verified and are tracked there.

Verdict: round 2 — bar defects — profile 3.

@thomashebrard

Copy link
Copy Markdown
Member Author

/rev pass — profile 3, round 2, bar defects, on 13ae4ad. Reviewers that produced a review: cubic and code-review (Codex failed: workspace out of credits). No defects found, nothing fixed.

@thomashebrard
thomashebrard merged commit 759d7b7 into dev Sep 23, 2026
15 checks passed
@thomashebrard
thomashebrard deleted the feature/Client-identification branch September 23, 2026 11:47
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant