Skip to content

Add bounded terminal-only waits to the pinned runtime source - #1035

Draft
GraciousGazelles wants to merge 19 commits into
work/w14939-upstream-convergence-20261109from
work/w14939-terminal-wait-20261112
Draft

GraciousGazelles wants to merge 19 commits into
work/w14939-upstream-convergence-20261109from
work/w14939-terminal-wait-20261112

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

Scope

This is an isolated forward change from the exact package-runtime source 413530dc8106c710c1cd7711b2d18e9af4788d98, targeting the existing work/w14939-upstream-convergence-20261109 source branch. It does not use the workflow-host commit as runtime source and does not change the Rama dependency/security lane.

  • Adds wait_until_terminal, max_wait_ms, and heartbeat_interval_ms to both exec_command and write_stdin schemas.
  • Continues waiting through the existing manager's bounded internal polling windows, issuing only empty polls after the initial command/input. Cancellation returns the last known live session state; it does not replay stdin.
  • Aggregates wait output with a capped head/tail buffer and preserves omitted-byte/token accounting.
  • Adds focused completion, cancellation/session-retention, and bounded-output tests.

No workstation tests/builds were run. Hosted proof is pending. This source PR alone is not package, security, install, or live OCI acceptance; the existing Rama/cargo-deny blocker remains separate.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a 'terminal wait' feature for command execution tools, allowing the system to poll until a process exits. The implementation adds new configuration parameters (wait_until_terminal, max_wait_ms, heartbeat_interval_ms) and a polling loop in complete_terminal_wait. The review feedback highlights three areas for improvement: correcting the wait window resolution logic to properly respect max_wait_ms, fixing the token count estimation to account for truncated bytes, and ensuring that max_output_tokens and truncation_policy are cached from the initial response to prevent data loss during the polling loop.

This branch has not been deployed

No deployments
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