Repository navigation
fix(tool): refuse an empty question list - #793
Merged
Ishaan Gangwani (ishaan1124) merged 2 commits intoSep 29, 2026
Merged
Ishaan Gangwani (ishaan1124) merged 2 commits into
Ishaan Gangwani (ishaan1124) merged 2 commits into
Conversation
ANIRUDDHA ADAK (aniruddhaadak80)
requested review from
Aayam Bansal (aayambansal) and
Ishaan Gangwani (ishaan1124)
as code owners
September 28, 2026 15:37
|
ANIRUDDHA ADAK (@aniruddhaadak80) is attempting to deploy a commit to the InkVell Team on Vercel. A member of the Team first needs to authorize it. |
ANIRUDDHA ADAK (aniruddhaadak80)
force-pushed
the
fix/question-empty-list
branch
from
September 29, 2026 04:49
300b5af to
90c2a6b
Compare
find() over an empty array is undefined, so the recommended-option guard passed and the tool went on to report an assumption it had not recorded, or ask the user a question with nothing in it and wait for an answer that could not be given.
ANIRUDDHA ADAK (aniruddhaadak80)
force-pushed
the
fix/question-empty-list
branch
from
September 29, 2026 10:01
90c2a6b to
3ea4f2e
Compare
# Conflicts: # CHANGELOG.md
Ishaan Gangwani (ishaan1124)
merged commit Sep 29, 2026
4a05a13
into
synthetic-sciences:main
8 of 9 checks passed
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.
What
QuestionToolacceptedquestions: []. The only validation is:findover an empty array returnsundefined, so an empty list passes.Why it matters
Two wrong outcomes, both of which misreport the run's state:
Autonomous / balanced-planning invents a decision:
The model is told an assumption was recorded when none was — and the dangling
Assumption recorded: .is a visibly broken sentence it then has to reason about.Interactive hangs.
Question.ask({ questions: [] })publishes aquestion.askedevent with zero questions and returns a promise that only settles on a UI reply or an abort, so the turn waits on a card with nothing to answer until the user interrupts.Verification
Fails before, passes after:
The test covers both autonomy paths and asserts
Question.askwas never reached, so the hang cannot come back quietly. All 6 pre-existing tests still pass.The change
async execute(params, ctx): Promise<QuestionDecisionResult> { + if (!params.questions.length) { + throw new Error( + "The question list was empty, so nothing was asked and nothing was decided. Retry with at least one question and the options to choose from.", + ) + } const autonomy = MessageV2.resolveDelegationSettings(ctx.extra?.delegationSettings).autonomyPlaced before the recommended-choice guard, and phrased for the model the way the neighbouring throw already is.
bun run typecheckclean; touched files are Prettier-clean (checked on LF-normalized copies — this checkout hascore.autocrlf=true, which makes Prettier flag every file in the repo).Fixes #792