Repository navigation
Keep Build waiting while a reopened decision needs an answer - #741
Open
MaggieAppleton wants to merge 1 commit into
Open
MaggieAppleton wants to merge 1 commit into
MaggieAppleton wants to merge 1 commit into
Conversation
Reopening a decided card shows it as needing an answer again in the Decisions tab and the sidebar, but Build readiness only blocked on decisions still in their first "open" state. A document with a reopened decision showed it waiting while Build plan, Build and Retry went ahead as if everything was settled. implementationReadiness now uses isOpenStatus, so a reopened decision blocks with "unanswered questionnaires" like an open one. The test covers every decision status through an exhaustive table, so a new status fails to compile until someone decides whether it blocks Build. It also checks that the server's stored-record unanswered count classifies the same statuses as waiting. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.
Symptom
Reopening a decided card shows it as needing an answer again in the Decisions tab and the sidebar, but Build readiness only blocked on decisions still in their first
openstate. A document with a reopened decision showed it waiting while Build plan, Build and Retry went ahead as if everything was settled.Fix
implementationReadiness(apps/server/src/tasks/plan-graphs.ts) now uses the existingisOpenStatushelper, so areopeneddecision blocks with "unanswered questionnaires" just like anopenone.Tests
apps/server/src/tasks/plan-graphs.test.ts, run once per decision status. The status table is aRecord<DecisionRecord["status"], boolean>, so adding a status fails to compile until someone decides whether it blocks Build. The test also checks that the server's stored-record unanswered count (unansweredDecisions) classifies the same statuses as waiting. Without the fix, only thereopenedcase fails.bun test apps/server/src/tasks/plan-graphs.test.ts: 27 passbun test apps/server/src/tasks apps/server/src/questions apps/server/src/plan apps/server/src/agent/tools: 824 passbun run types: passbun run ci: passReview
Two adversarial reviews ran before this PR: one approved and one approved with nits. In response, the status table became exhaustive, the test is named after the rule it checks, and the unanswered-count assertion is explicitly limited to classifying statuses rather than claiming full parity between client and server.
Possible follow-up (out of scope):
pastReadinessinapps/server/src/main.tsalso checks onlystatus === "open"when deciding whether aLIVE_BUILDdocument needs another readiness turn. As a result, a document whose only waiting decision is reopened may get an extra Planner turn. It affects scheduling, not Build readiness, so it is left alone here.