Problem
A currently open ask_user free-form draft at the legal 8,000-byte limit cannot be submitted with Enter or shortened with Backspace. The outer input-range preflight treats control-key bytes as additional inserted text and rejects them when the remaining draft budget is zero.
Reproduction
On main f6b49ae59605b1276b8267f2886d22c03f01533c, use the registered ask_user tool and native Pi Editor:
- Enter a free-form answer and fill exactly 8,000 UTF-8 bytes.
- Press Enter: the review screen does not open.
- Or press Backspace: a size-limit error appears rather than deleting text.
The existing command-aware prospectiveAnswerDraftFits logic would allow these controls, but the earlier range gate rejects them first.
Expected / scope
Bound input allocation, then let the existing editor-aware check distinguish commands from inserted text. Keep the same byte cap and review-before-submit semantics; oversized insertions and large paste buffers must remain rejected.
Actual registered-tool/native-editor regressions fail 2/2 before the fix and pass afterward; the full affected input/sanitization group passes 30/30.
This is separate from #499's claimed overlay reopen/draft-lifecycle and unanswered-review work. It does not implement those features, change the questionnaire schema, or close that issue.
Problem
A currently open
ask_userfree-form draft at the legal 8,000-byte limit cannot be submitted with Enter or shortened with Backspace. The outer input-range preflight treats control-key bytes as additional inserted text and rejects them when the remaining draft budget is zero.Reproduction
On main
f6b49ae59605b1276b8267f2886d22c03f01533c, use the registeredask_usertool and native Pi Editor:The existing command-aware
prospectiveAnswerDraftFitslogic would allow these controls, but the earlier range gate rejects them first.Expected / scope
Bound input allocation, then let the existing editor-aware check distinguish commands from inserted text. Keep the same byte cap and review-before-submit semantics; oversized insertions and large paste buffers must remain rejected.
Actual registered-tool/native-editor regressions fail 2/2 before the fix and pass afterward; the full affected input/sanitization group passes 30/30.
This is separate from #499's claimed overlay reopen/draft-lifecycle and unanswered-review work. It does not implement those features, change the questionnaire schema, or close that issue.