Repository navigation
Decisions a Planner waits on no longer time out - #657
Merged
Merged
Conversation
A blocking question from a Planner (the in-process Atomic harness, or a remote Planner's input-request over the agent connection) now waits until a person answers it or it is withdrawn: the Planner stops, its run is cancelled, the document is archived or deleted, or the asker's link closes. Previously createHumanInput defaulted to a 30-minute timer, after which the cards were marked expired and the Planner got no answer. - createHumanInput and Questions.ask no longer take an expiry; the expire path, projectExpiry and INPUT_EXPIRY_MS are gone. Stored records and cards with status "expired" still load and render. - A Default-machine Planner is no longer idle-stopped while it waits on an open question or a live or paused workflow run. PLANNER_IDLE_MS counts from when the last of those ended or the last viewer left. - The per-question "room to expire" size reserve is removed. Edits, questions, options and answers may fill the document to its exact 256 KiB limit, and refusals name that limit without mentioning expiry. - The expired card note no longer names a time limit, and the Planner prompt and docs say a question waits until answered or withdrawn. The connector and the agent-link protocol are unchanged; `expired` stays in the input-result schema for older servers. Assistant-model: Claude Opus 5.5 (fast) Assistant-workflow: inline (fast subagents) Assistant-verification: red before fix: human-input, session (atomic and remote), link and planner-dispatch tests failed with the question expired or the Planner idle-stopped after a simulated 31 minutes; exact-limit tests in human-input and room failed on the expiry reserve; question-view and decisions tests failed on the "30 minutes" note Assistant-verification: GIT_CONFIG_GLOBAL=/dev/null bun test apps/server packages apps/web passed: 5768 pass, 7 skip, 0 fail Assistant-verification: bun run types passed Assistant-verification: bun run ci passed (design-contract hash renewed for question-view.tsx, copy-only change) Assistant-verification: bun run e2e passed: 90 tests across decisions, harness, planner-attachment and machine-choice files User-preference: Decisions a Planner waits on never time out Co-authored-by: Alex Lavaee <alexlavaee@microsoft.com>
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.
A blocking question from a Planner now waits until a person answers it or it is withdrawn. It never expires after a fixed time.
This covers the in-process Atomic harness and a remote Planner's
input-requestover the agent connection. A question is withdrawn when its Planner stops, its run is cancelled, the document is archived or deleted, or the asker's link closes.Timeouts found and what changed
createHumanInputdefault (INPUT_EXPIRY_MS, 30 min), reached byharness/session.tsfor the in-process and remote PlannersexpiresInMs,Questions.expire,room.projectExpiryandINPUT_EXPIRY_MSare removedPLANNER_IDLE_MS(30 min) for a Default-machine Planner (experiments/routes.ts)AgentLink.waiting,PlannerAttachments.waiting). The 30 minutes start after the later of the last viewer leaving or the wait endingfitsExpiry,EXPIRY_ROOM, checks in submit and append-option)These timeouts were checked and left alone because none of them times out a question:
The
expiredstatus stays readable for stored records and cards, and for theinput-resultschema from older servers.apps/connectorandpackages/agent-linkare unchanged.Tests (red before the fix)
human-input.test.ts: a question asked throughcreateHumanInputis still open after a simulated 31 minutes and 24 hours, then returns the answer. After 31 minutes, aborting it withdraws the cards.testing/decisions.tslaterTimersholds back timers of a minute or more so the test can let time pass.session.test.ts: the Atomic and remote Planners registered byopenPlannerSessionkeep a question open after 31 minutes.link.test.ts: a question on the agent connection stays open after 31 minutes. Closing the link then withdraws its card.planner-dispatch.test.ts: a Default-machine Planner with an open question, or with a live or paused run, is still dispatched with nobody viewing. It stops 30 minutes after the question is answered or the run ends.human-input.test.tsandroom.test.ts: Planner edits, a new question, an option, an answer and a person's edit fit at exactly 256 KiB, and one byte more is refused with no expiry wording.question-view.test.tsanddecisions.test.tsx: the expired card shows no time limit.Verification
GIT_CONFIG_GLOBAL=/dev/null bun test apps/server packages apps/web: 5768 pass, 7 skip, 0 fail.bun run typesandbun run cipass. The design-contract hash forquestion-view.tsxwas renewed after a copy-only change.bun run e2eon the Decisions, harness, planner-attachment and machine-choice files: 90 passed.