Skip to content

feat: qualify session media projection and private transport guards - #142

Draft
Brian Krabach (bkrabach) wants to merge 8 commits into
mainfrom
feat/media-projection-contract
Draft

Brian Krabach (bkrabach) wants to merge 8 commits into
mainfrom
feat/media-projection-contract

Conversation

@bkrabach

@bkrabach Brian Krabach (bkrabach) commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add explicit get_media_request_support(*, model, request_options=None) facts based on exact documented model identities, not family guesses. Preserve original user/tool-result PNG/JPEG positions and call/result ordering; unsupported models/sources get truthful unavailable text before counting.
  • Keep canonical requests reference-only under the host adapter. Validate the original private Core object before count, each transport attempt and at final HTTP handoff. Refuse unmeasured fallback, changed/revoked/expired/released preparation, ambiguous replay and post-stream-event retry.
  • Bind prepared requests to the actual selected SDK/client, static auth, endpoint, headers and HTTP configuration before the first await, including uncounted routes. A private real-SDK facade disables inner retries/content tracing/redirects and rechecks the original binding through the accepted bottom transport. Shared ordinary-text client policy is unchanged.
  • Diagnostic COPY omits known image fields BEFORE hooks; actual SDK models dump with warnings disabled before copying. Preserve credential redaction, raw opt-in, opaque reasoning/signatures/tool input and native provenance. No Core edits, Foundation/app/peer runtime imports or storage-root selection.

Current exact source and verification

Current 58fc9992df48abb6f1ece8dc5cdf947207995402, tree 11e4c2f38754f24ce3bfb64dcaa6088dccb6618d. Includes exact accepted pricing PR143 3204656f784af914de2c3d7d6f7175ad904a00db through reviewed two-parent merge 64d101391053ce3ae841d40418072877f0a4d2ba; no moving-main extras. Prior bd49/14d whole-suite and wheel evidence below remains input-specific.

  • New final-selector correction binds the actual vendor _transport_for_url, rechecks the selected connection after host validation, and requires the returned transport to be an identical member of the bound default/mount inventory and qualified immediately before handoff. Ten actual SDK selector-override controls first failed at14d, then passed at this correction; no live disclosure is asserted.

  • Current scope: 31 passed, actual SDK1.12 separately 73 passed; independent selector review accepted exact source and independently ran 12 passed, 19 deselected (ten selector negatives and two real production-pool positives). A separate current noneditable wheel run against exact whole Foundationc2 source passed those same12; no network attempts, source/input identities unchanged, cleanup accounted.

  • Current wheel SHA256 fedef8d47857ef15361aec43d7ab89a69920501f23a90837adea0239fbb10bae; source archive SHA256 5ef63f25ec44e6ef32a448dfab9453fa145dc3ba2c9868278f1d2c4225dc60ee. All six runtime members match Git and installed target; ten hashed wheel RECORD rows and15 installed RECORD rows verify. Current CI43671177753 succeeded all six OS/Python lanes, each2720 passed/1 optional Foundation skip/1 live deselected/68 warnings. Raw synthetic checkout373af0ef49b27ba4a589a25c497bcf591b3b9468, parents accepted320+58, whole11e4 tree equals current head. Parent original Astra finite selector source review61c47251 accepted exact58 after3calls; no test execution by that reviewer and no whole-goal/admin/host/live acceptance inferred.

  • Whole maintained pre-import offline runner: 3001 passed, 1 live deselected, 84 warnings, 72.15s; exit 0, attempts: [], all 9003 setup/call/teardown phases passed and shutdown accounted. Live vision remains UNMET.

  • Maintained Foundation fixture uses installed 496adcd887cc55d1e79a7539dd6235926ac737e7, Core 2.0.2 and actual SDK 1.17. The 304-case matrix covers 19 literal models x user/tool x PNG/JPEG x complete/internal streaming x valid/revoked: 17 known-window models count after accepted Fable5.2 metadata; two explicitly return budget None and do not count. Not 19-model count qualification. All 152 revoked matrix cases refuse before an additional send.

  • Independent SDK-boundary execution: 348 cases passed on its frozen pre-lifecycle-correction input. Independent finite corrections then passed 42 SDK1.17 + 42 actual SDK1.12 cases; the floor wheel is hash-verified, temporarily overlaid without installation, and removed afterward. Final compatibility review independently passed 72 affected cases, all setup/call/teardown, no attempts/skips. These are separate input-specific proofs, not summed or relabeled full exact-head execution.

  • Drift regressions refuse SDK key/endpoint/client/header/HTTP-auth changes after count and in request/retry hooks. Genuine SDK first-use platform-thread await changes refuse in count and send. Observer, serialization-warning and default-client construction-order controls pass.

  • Exact union review independently verified all four init joints and all 84 tracked entries outside README/init/candidate-test, preserving modes/blobs and all nine nonoverlapping pricing paths. The 16 newly count-required Fable cases independently passed (292 deselected), not an assertion waiver.

  • Four additional source findings have maintained red/green controls: ambient constructor header reread, post-response drift incorrectly labeled not-sent, nested foreign-provider ContextVar inheritance, and authorized effective request header layering. Independent source acceptance and 46 SDK1.17 cases passed; actual minimum SDK1.12 46 cases passed separately.

  • New finite transport/lifecycle controls reject default/mounted transport instance-method overrides, closed original HTTP clients, nonzero inner pool retries, and ordinary pool execution overrides. Actual red receipts retain 10 failures/1 positive and 4 failures/2 positives at their respective predecessor inputs. Real production HTTP transports and exact HTTPcore2 pools remain usable through a controlled socket-free network backend; borrowed facades do not close the owner pool.

  • At14d, affected execution: 67 passed, 304 deliberately deselected, all 201 setup/call/teardown phases passed, zero audited network attempts and shutdown accounted. Actual minimum SDK1.12 separately passed 63 cases. Independent finite reviews accepted source and ran the 11 transport/lifecycle cases, then six pool cases (15 deselected), on their frozen input hashes. No new whole3001 or live campaign is claimed.

  • Current offline wheel/sdist build succeeded. All six wheel runtime Python members match committed Git bytes and all ten hashed RECORD rows verify. Wheel SHA256 5edf23afa3894a99858dc00ca43ec384f0d5b7eea1ad4686e16ef6cd5875e35f; source archive SHA256 75e6543d6e9e073c946902d3cedb72d256de397c1285e25afea0f58e45a32771. The older bd49 noneditable50 proof remains input-specific, not current installed qualification.

  • At14d, CI43669128700 succeeded on all six Ubuntu/Windows/macOS Python3.11/3.12 lanes: each 2710 passed, 1 optional Foundation-candidate skipped, 1 live deselected, 68 warnings. Raw checkout 16780f8078aeaba57079a46600551d6019a48b38, parents accepted320 +14d, has the exact whole tree afd0e4bdf2b17b1a3b1559c6f2cdbcc3ea559243. These lanes do not claim optional Foundation pairing, native media durability or inference. Still draft/administratively blocked; new parent-owned exact-head source disposition remains separate.

Retained failures and evidence limits

  • Real Foundation witness at old b44 accepted count A -> changed SDK key/client/endpoint B and retry-key B in an offline MockTransport audit. The original probe is retained; no live leak is asserted.
  • The current 16 maintained counterexamples against immutable b44 fail all 16 with zero network attempts. New code passes; no old source was overwritten for the reproducer.
  • Initial minimum-SDK actual run failed 22/passed18 because the new tracing constructor option was absent; corrected using the actual SDK signature, not a dependency-floor bump.
  • First whole repair run failed 10/passed2878 and recorded one denied DNS attempt caused by bypassed legacy mocks, before any connection. Nine failures were legacy zero-argument dump adapters. Narrow prepared-only eligibility and adapter compatibility repairs now pass without weakening qualified-request guards. Failed logs stay failed.
  • Earlier dummy-key 401 incident, original missing-dependency/fixture failures, original all-model budget-None failures, and predecessor source proofs remain retained separately.
  • First accepted-pricing union failed 16 stale Fable5.2 uncounted expectations (2981 passed); a cancelled review's actual retained command likewise failed those16 (450 passed). Neither was replayed after shutdown or relabeled green. A changed-input review verified the strengthened count expectations. Four finite source conditions first failed all four; a legacy header-kwargs fixture and nested-text shape error were corrected separately.

Dependency and activation holds

DRAFT. Exact accepted pricing source integration and current CI are complete; exact current Foundation/host/loop graph, normal-entry pairing, parent-owned final named Astra/Fable successor review and administrative upstream merge remain separate requirements. No DTU, live inference, account probe/switch, live configuration/adoption, upstream merge or release was performed.

Dynamic credentials, SDK middleware, HTTP auth/hooks, URL userinfo, content tracing and SDK body-debug logging are not qualified for prepared media. Custom SDK preparation callbacks are not executed by the private facade; no arbitrary custom-client or hostile in-process Python parity is claimed. Original exception causes may retain private data, so hosts must not format unprojected cause chains into public diagnostics. Pixel understanding and account entitlement are not established by offline serialization tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant