feat(supervise): chat-transport executor — conversation workers with real resume continuity; P1 live path made valid - #730
Merged
Conversation
…tions transport (#721) chatTransportExecutor: a first-class Executor whose runtime is a plain OpenAI-compatible /v1/chat/completions transport — the worker is a model conversation, not a sandboxed process. Non-streaming (the one-shot Spend carries tokensKnown/usdKnown honesty markers the streaming channel cannot), tokens metered from transport usage fields, dollars only from response cost fields (never a local estimate), transport failures settle as loud infra errors, and session continuity keys recorded message lists by settled worker id so a continuity:'resume' spawn continues the exact conversation. chatWorkerSeam is the session-owning makeWorkerAgent seam workerFromBackend refuses to be; chatCompletionsTransport is the one shared wire function. examples/graphs/user-sim-conversation.ts: a conversation as a graph — the simulated user is a persona-profile node, the product agent a chat worker, each turn a ledgered resume traversal; offline test asserts the resumed message-history chain on wire-captured requests, ledger continuity stamps, seam lineage, and conserved spend. examples/p1-parity live path: both arms' coders share one chat-completions substrate (the graph arm on chatTransportExecutor, delegates edge continuity:'resume' matching runMultishot's single transcript), the live graph arm gains its required reviewer router brain, and every model is explicit — the 'parity/unspecified' fallback is gone and missing env fails loud.
… USD, infra/validity channel F1: chatTransportExecutor gains maxTokens (sent as max_tokens on every request); both parity arms pin coder sampling to one shared constant (PARITY_CODER_SAMPLING, 0.7/2500) so a paired row cannot measure a sampling difference and call it an orchestration effect. The multishot arm's 2000-token tool-follow-up request class is documented as the one residual on the ParityRecord doc block. F2: the live multishot transport maps the bridge's usage.cost/cost_usd onto the transport result's costUsd (same read order as chatTransportExecutor), so runMultishot meters measured dollars instead of firing its price-table estimator every live turn; ParityRecord gains usdSource: measured | estimated | unknown so every row states which. F4: ParityRecord gains the infra/validity channel — infraShots (graph arm: infra-flagged down settles of delegates-bound workers via the run's hook stream; multishot arm: transport throws counted at the metering seam, settling an honest row instead of crashing the cell), plus tokensKnown/usdKnown (false when any counted completion lacked usage/cost; a dead turn counts as unreported, never zero). The offline scripted brain now meters its synthetic usage so completed offline runs are all-clear, and one scripted-500 test per arm proves the infra row is visibly not an ordinary non-convergence.
tangletools
approved these changes
Aug 3, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ Auto-approved drewstone PR — 3a290d00
This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
tangletools · auto-approval · reason: drewstone_author · 2026-08-03T21:07:04Z
8 tasks
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.
Closes #721. Part of #694.
chatTransportExecutor+chatWorkerSeam: workers as conversations on a bare OpenAI-compatible endpoint — no sandbox — with full kernel citizenship (pinning, conserved spend, settle/verdict, ledger, trace). Real resume: acontinuity: 'resume'spawn continues the exact recorded message list (proven at the wire; micro-revert kills 3 tests). Metering is honest by construction: usd only from response cost fields, elseusdKnown: false— no estimation code exists in the module. Transport failures settle infra-flagged, never fake success. Non-streaming by design (documented: streaming usage can't mark an unmetered turn).examples/graphs/user-sim-conversation.ts: the conversation graph — simulated-user root, chat worker,resumeedge; three-worker message-chain proven offline.PARITY_CODER_SAMPLING, asserted at captured requests); multishot arm maps bridge cost fields so the estimate fallback never fires on priced turns (usdSourceon the record);ParityRecordgainsinfraShots/tokensKnown/usdKnownso an infra-dead live run is visibly not a non-convergence (scripted-500 tests per arm). Bonus root-fix: the offline scripted driver brain now meters, un-tainting the conserved pool.Audited SHIP on the module (resume, metering, failure semantics, offline strace, non-tautology probes all held); the live-path sampling asymmetry the audit REFUTED is fixed and pinned by test.
0.128.0 + CHANGELOG. Suite 2379; all gates green.