Skip to content

fix: stabilize current host context across provider continuations - #1927

Closed
Brian Krabach (bkrabach) wants to merge 2 commits into
mainfrom
fix/provider-context-continuity-0801
Closed

Brian Krabach (bkrabach) wants to merge 2 commits into
mainfrom
fix/provider-context-continuity-0801

Conversation

@bkrabach

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

Copy link
Copy Markdown
Collaborator

Current source integration status

Current head: 89ddb582a8873c05f8eae78a52448084001f6e64 (tree f22eb885fe2b5164d69334ae0cc42f90358a19dc). Ordinary conflict-free merge of the preserved 70142aeb7b7e4913588a127fbbd1cb693faa4525 contribution and exact published 0.80.3 1f96a2b2a921b3377ff428b55ac8d7fe4edf70c2. All ten contribution blobs/modes and the +752/-18 full-index patch remain byte-identical to the prior independently approved port; all other files match the published base. Independent source-composition review accepted this exact head. No unmerged runtime/urgent release work was imported.

All four upstream PRs are now merged: Anthropic 46b0d34557dab8914e8eb897a3da6872475db154, Gemini e040c7cee5561c0b5b2df66a3dc8ac8cd2a4e043, Copilot 5040547e22800dc132d250e3fd7cd4af57f00dab, managed context b43fa333e749966504af6877c9eabffa027ef728. Exact installed CLI and Agent compatibility was independently accepted; this does not update Agent's shipped pins or install Unified's app fix.

Normal selected-worker qualification COMPLETE; still draft / publisher-held. Exact host 89ddb582a8873c05f8eae78a52448084001f6e64 passed one real production UpdateManager.validate(stage, generation) preparation: ordinary UV resolution, selected-source/index alignment, dependency batch, immutable freeze and read-only compatibility mounts. Recorded worker q-1381e72945a1dcfb5dd61cb0911a6bd7 has published native Core 2.0.2; Foundation 5413c54406f93d0da302e33fca843ddca1fd29af; accepted upstream providers/context above; LoopLive c18f3befc635922acb47afa96480c9680718912d and Streaming 072d50c5bcc0f7c57ca4d336ef03915563fa7861. SDK closure is Anthropic 1.17.0, google-genai 2.34.0, Copilot 1.0.15, OpenAI 3.46.0. No product source overlay or post-freeze install.

  • 38 maintained continuation cases passed, zero skips, including native Anthropic complete and SDK-stream count/send/header/binding parity. Exact loaded-file provenance checked against a receipt-bound 929-file map.
  • Six retained round-trip cases passed: Anthropic signed/redacted/empty seals and persistence, Gemini ordered/parallel signatures, Copilot foreign-opaque suppression, OpenAI encrypted metadata; real Core/Boundary/finite LoopLive mounts and canonical JSON readback with fake transports. All four before/after graph verifications returned 0.
  • Original witness attempt remains five failures / one pass, caused by a bare tool-output expectation. A separately saved v2 fixture strictly asserts Core 2 native-hook full ToolResult envelopes; no alternate-shape acceptance or provenance/order weakening. Independent final evidence review accepted this correction and the exact normal graph.
  • Evidence archive SHA-256: 3a0ce04b194ad2831b61fcd20019ddef3252c143bf127d65e8a3f5b6c904fee4 (1,192,960 bytes); preparation receipt SHA-256 998004aa2cedf9baa202ebf1bc07ff2033f396b21f13f10516065eef7242a0df. Final packet: working-files/provider-unified-normal-graph-prep/evidence/final-handoff.json.
  • Sole task-owned DTU stopped/exported/destroyed; containers/networks/volumes and owned twin image confirmed removed, reservation released, 0 active owned environments. Unrelated resources preserved.

Limits / remaining boundary: the six cases use regular installed imports, not normal module-loader selection within those cases; production compatibility probes separately cover ordinary preparation/cache paths. Synthetic JSON public-context reload is not the host checkpoint/recovery writer. No live inference/authentication/cryptographic validity or adopted app claim. Prior CLI/Agent and broad/refit/checkpoint/vendor evidence remains reused at its original identities. The old overlay results below are not relabelled as this new graph. The sole Release Manager owns subsequent exact release composition, merge, publication, official package smoke and live adoption. No version/pin/tag/client/runtime/service additions are included.


Change

Fix avoidable request-prefix churn at Unified's canonical host request-preparation boundary. PreparationContext places fresh ambient observations after the latest ordinary accepted input and before its assistant/tool continuation. Explicitly acquired evidence stays after its genuine complete tool-result batch; missing/partial receipts and focus-only evidence retain request-time placement. Generated/service user carriers and user quotations do not become new authority anchors.

The existing coordination, memory, reaction, surface, voice and output-image delivery owners remain authoritative. Stable prompt serialization omits only allowlisted sampling clocks, not semantic revisions, expiry, grants or source identities. Every request still reads current context and gets fresh private Work/request bindings: this is not an authority cache. Current revocations, Stop, exact-fit refusal and the existing single unsent pretransport refit remain enforced. Canonical history and provider signatures are not rewritten, stale observations are not replayed, and tools are not re-executed.

Real context changes and new input intentionally reset the relevant prefix. Native providers own validity/selective invalidation against their actual envelope; this is not cross-turn append-only reasoning preservation. The complete remedy needs both host and provider fixes. Anthropic's strict diagnostics and real model/account signature enforcement remain authoritative; supported native binding controls are not an enforcement bypass or a guarantee for every model/account/proxy.

Exact candidate: 70142aeb7b7e4913588a127fbbd1cb693faa4525, one commit on Unified 0.80.1 4fbbb51e3749ab90f1eafbe36bd18e1ae1c6d1a0. The ten-path change is byte-identical to reviewed host candidate a8bbe801a174dbb8012842f25d4a28e8092a066b over c336241488993ebcef50a30cac3776221f1e43e4 (full-index binary diff SHA-256 1c586120fc77154fe08248f967e7df960b7be3b1b9adaae95f83b2c2905d82ba). No dependency pins, version, client, service or runtime-owner changes.

Draft / integration-held. Hold downstream adoption until the accepted exact upstream revisions and dependency adoption are checked together: Anthropic #140, managed context #32, Gemini #64, and Copilot #92. This PR does not adopt those branches. Upstream acceptance, this host merge and publisher/release approval are separate decisions owned by the release coordinator. No merge, release or live adoption is performed by this publication.

Validation

  • Exact-port source overlay: parent-owned isolated, credential-free/network-disconnected checks paired host 70142aeb7b7e4913588a127fbbd1cb693faa4525 with Foundation 01a7c8bd87fb7feb9cedc697ce7ca7edc6deaeb3: 66 cases passed, 0 skipped, 0 failed, including all 40 new cases and provider connection-identity regressions. The real offline next_message_native_probe.py --connection-binding passed. 87 process import receipts recorded the overlay; original baseline before/after was identical and installed Python/native-binary/distribution-metadata hashes stayed unchanged. Independent review accepted the port and harness. This is a source overlay, not an installed 0.80.1 full graph or copied-source-path qualification.
  • Earlier frozen candidate graph, separately labeled: host a8bbe801a174dbb8012842f25d4a28e8092a066b with Foundation c67e3ada021a5bbb93df9567feb23e2a72c93f55, the four sibling candidate heads and native Core 2.0.2: 303 focused provider, 229 host-delivery, 575 managed-context, 92 unchanged-loop and 46 unchanged-OpenAI tests passed. These are selected checks, not a full-suite total or evidence that the exact 0.80.1 graph was installed. Six offline cases passed real inbound conversion -> StreamingOrchestrator.execute() -> JSON context write/read -> Core typed reconstruction -> real outbound native conversion, including OpenAI encrypted reasoning/raw metadata. Tools/transport were fake; those seams do not prove vendor acceptance or every durable compaction path. The initial managed collection failure from dropping importlib mode is retained; explicitly restoring --import-mode=importlib produced the 575-pass result.
  • Narrow actual-vendor evidence: the parent seven-step Fable host+provider sequence observed empty transformation reports for the first three stable requests, a context-change drop at step 4 with the next same-context request stable, and a new-input drop at step 6 with the following request stable. Six count preflights matched generation input counts; 956 output tokens / 26.266 seconds were recorded. No new latest-thinking drops appeared after each stabilization. Earlier v1 refusal/model-fallback and v2 harness-attribute failures are retained, not erased or followed by an unchanged paid repeat. This is not universal model, account, proxy, real-vision or long-lived-state qualification.
  • Scaling and semantics: ambient placement performs one anchor pass without traversing tool batches; the regression exercises 4- and 1,000-row histories while preserving causal placement, current authority, exact user evidence and detached signed history. Acquired evidence uses its complete-batch anchors. This is a deterministic work/semantic bound, not history-independent preparation. The seven-step timing is observational: no comparable baseline/cache benchmark establishes overall latency, token or cost improvement.
  • Reusable evidence: exact-source tests are in tests/test_provider_context_continuation.py, the two new coordination regressions in tests/test_coordination_delivery.py, and existing tests/test_provider_connection_identity.py / tests/fixtures/next_message_native_probe.py. The parent retained the private source/import receipts and failed attempts; exported evidence SHA-256 85b3aeb6ae494c53929b9a5023c1a68a6c2871d4cfb4a24e2fbee665477fbc6e and witness archive SHA-256 2b8e52534ce5177f4629aef55cb376bbccea205a671d66d26b222b3b9636b8f0 identify that handoff without publishing private paths or transcript/signature bytes.

CI is pending at draft publication; independent source acceptance and offline/live observations above are not CI, accepted-upstream integration, package smoke or publication approval. No new DTU or live installation was created for this PR.

@bkrabach

Copy link
Copy Markdown
Collaborator Author

Delivered through reviewed coordinated union PR#1944, not a direct merge of this branch. Published v0.82.0 immutable78673d136ff8cb0d75b149192db8ae6823bdceb0/tree21a10787f5db0a46ac7ef79620f58e86eb89dc6c preserves exact89ddb contribution and current-main synthesized session_state field. Prior accepted normal graph38+6 remains original-identity evidence; composed32 backend anchors plus fresh package946 payloads/nine origins/current canonical9ad affected pair and exact-head Fast43148803080 passed. Automatic publisher43149490302 and official outside-checkout installed-package smoke43149774000 SUCCESS. Official wheel602d3e9a44e22dd8c9410c5d8912597bc298d931c233e404dcd5a949fe3f5210 binds actual source. No fresh live-provider/reasoning continuity guarantee or original-held-operation recovery claim. Branch/author history and evidence retained. https://github.com/microsoft/amplifier-unified/releases/tag/v0.82.0

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