fix(workflows): mark runs awaiting human input with the awaiting-input indicator - #2192
Open
flora131 wants to merge 5 commits into
Open
fix(workflows): mark runs awaiting human input with the awaiting-input indicator#2192flora131 wants to merge 5 commits into
flora131 wants to merge 5 commits into
Conversation
…t indicator Apply the shared runIndicatorStatus predicate to the BACKGROUND widget, /workflow connect picker, and /workflow status listing. Attribute hidden nested child prompts to the visible top-level ancestor, preserve terminal and blocked precedence, and keep quit runs resumable. Add direct regression coverage for quit runs carrying pending prompts. Refs #2185
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Collaborator
Author
E2E evidence: awaiting-input run indicator (#2185)Verified end-to-end with the real Atomic CLI built from this branch (worktree commit 1. BACKGROUND widget —
|
The Windows release-archive timeout was based on warm measurements, but a healthy run's 4m04s p100 left no room for cold setup. Two 6m1x cancellations followed, including one on the unrelated feat/2159-curl-irm-installers branch. The rust-toolchain step measured 12s/36s on healthy runs versus 152s/140s on the cancelled runs; checkout also reached 71s/64s. Raise the Windows cap to 9 minutes for the observed cold tail and the native build and archive smoke steps. This is a CI budget correction, not a product change. Refs #2185
…sion restore The /workflow status chat entry kept its point-in-time full run collection in a WeakMap keyed by the in-memory StatusPayload. A payload rebuilt from persisted message details after a session restore is a different object, so a visible running ancestor lost its hidden nested descendant's awaiting-input attribution and re-rendered with the running dot. Resolve each visible run's indicator status against the complete collection at emit time (resolveRunIndicatorStatuses) and persist that small serializable record on the payload instead; hidden run snapshots still never reach the serialized message. renderStatusList prefers the precomputed record over deriving from allRuns. Addresses the P1 review finding on #2192.
Two coding-agent suites failed only on Windows CI, both because they synchronized on an event that is not the one they need. bash-session-metadata "propagates the same snapshot into detached async jobs" gated on existsSync(outputPath). The shell's `>` redirect creates and truncates the file when the command starts, before printf runs and before the job exits, so the predicate is satisfied by a zero-byte file and a loaded runner reads ''. Verified directly: a gated writer under `>` reports exists=yes size=0 while the process is still alive, and the test reproduces `expected '' to be '<id>:<id>'` when it keeps polling only for existence. It now waits for the managed job to report "completed" via __atomic_bash_job, and additionally asserts the file is empty at creation time so the defect itself stays pinned. rpc-bash-session-replacement burned the whole 90s budget in an unbounded waitFor() spinning on `updatesFor(...) === "before"`. Chunking is opportunistic, not guaranteed: createLocalBashOperations forwards raw 'data' events, so `printf before; sleep 0.05; printf after` can arrive as one buffer. Confirmed on macOS by driving exec() directly, which delivered chunks ["beforeafter"] - the accumulated string never equals "before", so the loop could not terminate. waitFor is replaced by waitForOutput: bounded by a named constant, matching a monotonically reachable prefix, and throwing an error naming the id and the observed accumulated output on expiry. The two tests that must issue a replacement mid-execution no longer rely on a 50ms sleep to stay in flight; they block the shell on a marker file in a temp directory that is also the session cwd, which widens the in-flight window deterministically rather than removing it. A focused test feeds a single coalesced "beforeafter" delta through the helper and fails under the old exact-equality predicate. Test synchronization only; no production behavior changed. Every existing assertion is preserved verbatim. Assistant-model: Claude Opus 5
Retry gated cwd cleanup on Windows and run it from finally blocks. Gate the shared-manager clone on an explicit in-flight marker so coalesced output cannot make the test pass vacuously. Widen diagnostic wait bounds to 10 seconds for cold Git Bash starts while preserving the suite timeout headroom. Assistant-model: GPT-5.6 Sol
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 #2185
Summary
Runs paused on a human-input prompt now show a distinct awaiting-input indicator instead of the generic running spinner.
packages/workflows/src/shared/run-indicator-status.tsexportsrunIndicatorStatus(run, allRuns), the single source of truth for a run's primary indicator status./workflow connectpicker, and the/workflow statuslisting all resolve their indicator through the shared predicate.rootRunId/parentRunId(with cycle protection), so the surface the user can see is the one that lights up.completed,failed,killed,cancelled,skipped,blocked) win over a stale pending-prompt marker left in a snapshot.AWAITING INPUT · <run id> <name>) is deliberately not relanded — it is out of scope.Relationship to closed PR #2135
This is a fresh implementation from clean
main. Nothing was checked out, cherry-picked, merged, or copied fromfix/hil-run-attribution-indicator; PR #2135's description was consulted only as a spec reference.Verification (local)
npm run check— biome,tsc --noEmit, and shrinkwrap check all pass.run-indicator-status,session-picker,status-list-render,widget-rendering,workflow-status-listing): 5 files, 86 tests, all pass.npm run test:unit— 630 files, 5890 passed, 1 skipped.npm run check,test:unit,test:integration,test:ci-contracts) all passed on the pushed commit. One earlier hook run saw two unrelated interactive-engine tests fail under parallel-suite load; both pass standalone and on the accepted run.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Greptile Summary
This change adds a shared workflow indicator for runs awaiting human input, including attribution from hidden nested runs, and carries that indicator into status cards, widgets, pickers, and restored chat entries.
A reproduced behavior gap remains: an unfiltered status listing correctly marks a visible parent workflow as awaiting input when its hidden nested child has a prompt, but
/workflow statusfiltered to awaiting-input returns no matching workflow. Users and agents can therefore miss an actionable workflow when relying on that filter.Confidence Score: 4/5
Not safe to merge until the awaiting-input filter includes visible workflows whose nested descendants require input.
The status display and filtered status results disagree for the same active workflow. This makes an actionable human-input request undiscoverable through the filter intended to surface it.
Files Needing Attention: packages/workflows/src/extension/workflow-status-summary.ts, packages/workflows/src/extension/workflow-tool.ts
What T-Rex did
Comments Outside Diff (2)
packages/workflows/src/extension/workflow-status-summary.ts, line 206 (link)statusFilter: "awaiting_input"only checkssummary.awaitingInputCount, which is derived from the visible run's own snapshot. A top-level run with a hidden nested descendant awaiting a prompt is therefore omitted from the filtered/workflow statusresult, even though the unfiltered status renderer correctly marks that same top-level run with the awaiting-input indicator. This prevents users and agents from discovering the actionable visible workflow through the awaiting-input filter. Resolve descendant-aware indicator status against the complete run collection before filtering, and treat a resolvedawaiting_inputstatus as a match.Artifacts
Unfiltered workflow status with a hidden child prompt
Filtered workflow status with a hidden child prompt
Nested prompt status reproduction harness source
Focused workflow status and indicator test run
Prompt To Fix With AI
General comment
/workflow statuswithstatusFilter: "awaiting_input"from discovering the actionable visible workflow whenever the pending prompt belongs to a nested hidden run.makeExecuteWorkflowToolinvokesbuildWorkflowStatusListing(topLevelExpandedSnapshots(), args.statusFilter ?? "all")atpackages/workflows/src/extension/workflow-tool.ts:97.buildWorkflowStatusListingsummarizes only each visible snapshot and filters it atpackages/workflows/src/extension/workflow-status-summary.ts:219-221; theawaiting_inputpredicate at:204-207only checks that summary's ownawaitingInputCount. By contrast, unfiltered rendering callsrunIndicatorStatus(snapshot, allRuns)atpackages/workflows/src/extension/workflow-tool-content.ts:75-85, and the resolver attributes descendant prompts throughrootRunId/parentRunIdatpackages/workflows/src/shared/run-indicator-status.ts:18-28,64-74.awaiting_inputas matching the filter. Ensure the summary/detail representation also exposes enough descendant prompt attribution to make the returned root actionable.Prompt To Fix All With AI
Reviews (4): Last reviewed commit: "fix(test): harden gated bash synchroniza..." | Re-trigger Greptile