Runtime events need a stream identity to complete remote nested replies

Open
#4,951 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go

Research direction

Start by tracing the runtime event definitions and the code that emits and handles StreamStarted, StreamStopped, and content events; the issue does not name specific files or tests. Follow how replies get is_streaming and how nested streams share sessions. Done means replies from a stopped remote stream complete independently while its parent stream continues, with local runtime behavior preserved.

Written by the indexing model from the issue text.

Description

area/api area/runtime

Markdown transformers (#4952) send is_streaming per reply. A reply completes when its saved message arrives, or when the last stream of its session stops.

A remote runtime does not send the saved message. A nested stream that shares its parent's session stops while the parent is still running, so its replies keep is_streaming: true until the parent's stream stops. Local runtimes are not affected: their saved message completes the reply.

Completing exactly the stopped stream's replies needs a stream identity on runtime events: StreamStarted, StreamStopped, and the content events, so each reply can be attributed to its stream. Keying on (session, agent) is not enough when the same agent runs nested in its own session.

Raised in https://github.com/docker/docker-agent/pull/4943#discussion_r4606337964.

Dominant language
Go
Stars
4.7k
Forks
565
Avg merge
18h 52m
Merged PRs (30d)
221

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from docker/docker-agent

All issues in docker/docker-agent

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.