fix: guard get_question_batches and degrade malformed direct-built payloads (confirmation-pass-1) - #56
Merged
Conversation
…yloads (confirmation-pass-1) Two needs-a-look rows from the confirmation-pass-1 ledger (2026-08-20), both direct-Python-API reach only: - FormSchema.get_question_batches rejects non-positive batch_size with a named ValueError (before: -1 silently dropped every question, 0 raised a raw range() error). Reject over clamp: the size is code-authored, so a loud error is catchable where a clamp reshapes the bug. - Formatting helpers degrade malformed construct payloads like suggested_pick instead of crashing: confirm_consequences and endorsement_map are new one-place shape guards used by every surface; expansion_items skips non-dict rows. Parse-path rejection unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
silversurfer562
force-pushed
the
claude/modest-heisenberg-c4d569
branch
from
August 20, 2026 14:13
88f133d to
a2f341f
Compare
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
Recovered a committed-but-never-pushed session branch during the worktree sweep — genuine unmerged work with no prior PR. Pushed for review.
Guards
get_question_batchesand degrades malformed direct-built payloads (aFormQuestionbuilt directly by the dataclass constructor, bypassingform_from_dict) rather than crashing.Note
Branched from an earlier
main; likely needs a rebase onto currentorigin/mainbefore merge, and there may be overlap with already-merged confirmation-pass-1 work (#42/#44) worth checking for redundancy during review.🤖 Generated with Claude Code