Repository navigation
Conversation
ASRTarget, DecisionTarget and HTTPAppTarget add an endpoint block (scheme, host, port, via_proxy) to TargetResponse.raw, warn once at construction on plain http to a non-loopback host, and create their client through one helper. ASRTarget uploads the file as audio<suffix>.
Collaborator
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.
For an audit to be reproducible, its record should say which endpoint answered:
ASRTarget,DecisionTargetandHTTPAppTargetnow add anendpointblock toTargetResponse.rawwith the scheme, host, port andvia_proxy(whetherurllib.request.getproxies()/proxy_bypass()route the request through a proxy), merged into the provider's response without overwriting its fields; a response that is not a dict, or already has anendpointkey, is wrapped as{"response": ..., "endpoint": ...}.The block never contains the path, query, userinfo, headers or API keys;
rawis not written to saved results today, so the block is available to callers ofsend()only.Each of the three targets warns once at construction when its URL is plain
http://to a host other than loopback (localhost,127.0.0.0/8,::1).ASRTargetnow uploads the audio asaudioplus the lowercased extension, so the local filename is not sent with the upload; the MIME type is still guessed from the original filename exactly as before.pytest -p no:randomlygave 1611 passed, 2 skipped onmainat 6636ae8 before the change and 1623 passed, 2 skipped, 0 failed after it (12 new tests intests/test_endpoint_provenance.py), andruff check --select E9,F821 .passes.AI disclosure: implemented with Claude Code.