feat(compose): expose source-attributed Runlet progress - #23
Merged
Conversation
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.
Summary
Expose bounded, source-attributed Runlet progress through
RunletBackend::execute_with_progress, using published Runlet 0.6.0. Preserve the existing backend APIs while letting hosts observe exact compose-call ownership, execution incarnations, and compiled-source identity.Motivation
Hosts cannot accurately assign nested tool activity to script expressions by tool name or call count. The Runlet progress stream supplies dynamic node identities and lifecycle states, but the compose adapter must preserve attribution and reconcile runtime completion with approval and cancellation outcomes.
Impact
The opt-in API delivers a per-execution receiver through a host-owned bounded channel. Events omit source text, arguments, outputs, and error text. Slow or dropped consumers do not stop execution; observation loss is explicit. Existing unobserved execution remains available.
Technical details
Exact identity and source matching
Each compiled execution carries its parent compose-call ID, a fresh process-local incarnation, and the digest of the exact compiled source. Auto-healed scripts are marked so their byte spans cannot be mistaken for offsets in submitted source.
Host-authoritative completion
Raw Runlet completion is suppressed until the adapter resolves its outcome. Approval interruption, cancellation, and dropped execution futures invalidate prior observations instead of reporting completion. The host polls in its own scoped task; the bridge starts no observer workers or callbacks.