Files
PaperClipAI/packages/shared/src/validators
eroslifestyle 81e2c50aa9 fix(shared): allow one answer per ask_user_questions question (max 64) (#16702)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - Agents ask board users questions with `ask_user_questions`
interactions
> - The question payload allows up to 64 questions
(`askUserQuestionsPayloadFields`)
> - The response schema `respondIssueThreadInteractionSchema` allows
only 20 answers
> - A card with 21 to 64 questions can be created, but the user cannot
submit all answers
> - This pull request raises the answer limit to 64, the same as the
question limit
> - The benefit is that every valid card can be answered

## Linked Issues or Issue Description

**What happened?**

An `ask_user_questions` card with more than 20 questions is accepted on
creation. When the user answers every question, the response is rejected
by validation because `answers` has a maximum of 20 items.

**Steps to reproduce**

1. Create an `ask_user_questions` interaction with 21 questions (the
limit is 64).
2. Answer all 21 questions.
3. Send the response to `respondIssueThreadInteractionSchema`.

**Expected behavior**

One answer per question is accepted, up to 64.

**Actual behavior**

Validation fails because `answers` allows at most 20 items.

No existing public issue found (searched issues and PRs for
`respondIssueThreadInteraction`).

## What Changed

- `packages/shared/src/validators/issue.ts`: `answers` maximum changed
from 20 to 64 to match the question maximum.
- `packages/shared/src/validators/issue.test.ts`: new test. 64 answers
pass. 65 answers fail.

## Verification

- `LC_ALL=C pnpm --filter @paperclipai/shared exec vitest run
src/validators/issue.test.ts` — 44 passed.

## Risks

Low risk. The change only raises an upper bound to a value the question
schema already allows.

## Model Used

Claude (Anthropic), model ID `claude-sonnet-5-5`, with tool use and code
execution in Claude Code. A human reviewed the change.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes (none
needed)
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [ ] I will address all Greptile and reviewer comments before
requesting merge
2026-11-24 20:15:50 -06:00
..
…
…
…
…
…
…