Skip to content

πŸ›πŸ§‘β€πŸ’» - Explain rejected comment command input with actionable validation errorsΒ #701

Closed

Description

@efraespada

Is there an existing issue for this?

  • I have searched the existing issues.

Which actions are affected?

Issue, Pull Request

Which platforms are affected?

Linux, macOS, Windows

Description

A malformed comment command is correctly rejected before effects, but its public reply discards the specific parser reason and gives only validation.invalid-input and β€œCorrect the input and retry”. A contributor cannot tell whether the command exceeded the argument count, exceeded the character limit, had invalid quoting or used an unsupported form.

Observed on PR #699: #699 (comment)
Source request: #699 (comment)
Run: https://github.com/vypdev/copilot/actions/runs/40211874692
Correlation: comment:6400176794; error reference cb3dbecc-7ba6-4704-afcf-d62d4d75c6c9.

The request placed a long explanation after /copilot recheck, exceeding its 20-argument parser bound. This was an invalid request, not a crash during review. The corrected bare command succeeded in run 40212533462: #699 (comment).

Expected: preserve strict grammar/2,000-character/argument/authorization limits and show a safe, localized reason plus a valid next action. Do not echo arbitrary operands, credentials or private prose.

Representative reply:

Request not accepted: this command exceeds the allowed argument count.
Send /copilot recheck on its own; place scope explanations in a separate comment.
No review ran and no repository changes were made.
Command help

Reproducing the issue

  1. In a permitted issue/PR comment, submit /copilot recheck followed by more than 20 whitespace-separated words (within 2,000 characters).
  2. Observe the correct early rejection.
  3. Observe that the published error does not disclose the safe parser cause or a correct command example.
  4. Submit the bare command and observe that review can proceed.

Audit the documented argument contract for every command; distinguish bounded operands from supported human prose. Do not silently widen recheck semantics or weaken command validation to hide the UX defect.

Acceptance:

  • A closed safe validation-reason contract reaches the localized error presenter.
  • The reply identifies the violated rule and a valid next action without raw input leakage.
  • Unsupported/malformed/over-limit inputs remain effect-free; replay reuses the existing semantic reply.
  • Help, command examples, relevant SDD/catalog evidence and docs agree with the parser.
  • Minimum 12 distinct regressions: 4 parser boundaries, 5 safe presentation/recovery behaviors and 3 end-to-end/replay/corrected-retry behaviors. Run the supported-locale matrix in addition; preserve repository coverage gates.
  • This is separate from πŸ›πŸ§‘β€πŸ’» - Reopened dismissed Bugbot finding remains verification required after copilot recheck and blocks guarded approvalΒ #700's reopened-finding state problem.

copilot Version

3.10.5; trusted runtime commit 39679e2.

Relevant Log Output

Error code: validation.invalid-input
Retained state: No new state or external effect was created.
Reference: cb3dbecc-7ba6-4704-afcf-d62d4d75c6c9

Additional context and comments

Deferred follow-up requested after merging #699. Do not start a branch, hotfix, release or deployment for this issue now. The valid recheck already completed; the follow-up concerns actionable validation UX and documented grammar. Source areas: src/domain/copilot_command.ts, comment-command routing, structured application errors, semantic error replies, localization and docs/issues/comment-commands.mdx.

Activity

  1. added
    bugSomething isn't working
    bugfixSomething isn't working
    priority: lowNot urgent, can be addressed later.
    on Oct 25, 2026
  2. added theissue type on Oct 25, 2026
  3. moved this to Todo in vypdevon Oct 25, 2026
  4. changed the title [-]Explain rejected comment-command input with actionable validation errors[/-] [+]πŸ› - Explain rejected comment command input with actionable validation errors[/+] on Oct 25, 2026
  5. vypbot commented on Oct 25, 2026

    @vypbot
    Contributor

    Hi! I’m @vypbot, the Copilot assistant for this repository.

    I can answer questions, explain the codebase, propose implementation and test plans, review issues and pull requests for potential bugs or security problems, and help authorized maintainers apply changes.

    Try /copilot help to see the available commands, or mention @vypbot with your question.

  6. moved this from Todo to In Progress in vypdevon Oct 26, 2026
  7. added
    branchedIndicates that a branch has been created for this issue.
    on Oct 26, 2026
  8. changed the title [-]πŸ› - Explain rejected comment command input with actionable validation errors[/-] [+]πŸ›πŸ§‘β€πŸ’» - Explain rejected comment command input with actionable validation errors[/+] on Oct 26, 2026
  9. 1 remaining item

  10. vypbot commented on Oct 26, 2026

    @vypbot
    Contributor

    Implementation plan

    Current status: Ready to start. No action is required from maintainers before implementation.

    1. Define the validation reason contract
      • Audit the parser and documented grammar for every command; preserve the 2,000-character limit, 20-argument limit, authorization checks, and current command semantics.
      • Add a closed set of safe validation reasons that distinguishes supported parser failures without carrying raw input.
    2. Route reasons to localized replies
      • Pass the safe reason through comment-command routing, structured application errors, and semantic error replies to the localized presenter.
      • Provide a valid next action and confirm that no review or repository changes occurred; never include operands or comment prose.
    3. Align help and specifications
      • Update command help, examples, docs/issues/comment-commands.mdx, and the owning SDD and catalog evidence to match parser behavior.
      • Keep prose-command guidance distinct from bounded structured-command operands.
    4. Add regression coverage
      • Add at least 12 distinct regressions: four parser boundaries, five safe presentation and recovery behaviors, and three end-to-end, replay, or corrected-retry behaviors.
      • Run the supported-locale matrix and preserve repository coverage gates.

    Acceptance: The supported-locale matrix and coverage gates pass; at least 12 distinct regressions verify that malformed, unsupported, and over-limit commands remain effect-free, replay reuses the semantic reply, and localized replies identify the safe violated rule and valid next action without exposing raw input; help, examples, SDD/catalog evidence, and docs match the parser.

    Need something else? Mention the bot with a question or use /copilot help.

  11. added
    size: XXLIndicates an extremely large task or issue that requires significant time and effort to complete.
    85%Progress: 85%
    on Oct 26, 2026
  12. vypbot commented on Oct 26, 2026

    @vypbot
    Contributor

    Issue closed β€” historical progress

    Current status: closed as completed.

    The last estimate is retained below as history. Closure does not certify a new percentage, tests, or branch alignment.

    Action required: none for this closed issue. If work continues, reopen the issue; a fresh assessment can update this same card.

    Last assessment before closure (historical)

    Progress: 85% β€” in progress

    > Current status: The comparison shows substantial implementation, documentation, and regression coverage for safe command diagnostics, localized recovery, effect-free rejection, replay, and corrected retries. The listed source patches include parser, presentation, and end-to-end tests, but the comparison does not establish that tests or coverage gates passed. Generated build metadata does not verify bundles.

    Next: Run the supported-locale matrix and required test, coverage, build, and repository validation gates; confirm help, examples, specifications, catalog evidence, and documentation agree.

  13. vypbot commented on Oct 26, 2026

    @vypbot
    Contributor

    Issue closed: synchronization recommendation retired

    No branch synchronization is required for this closed issue.

    The previous recommendation is historical. Issue closure does not certify that the branches are synchronized.

  14. moved this from In Progress to Done in vypdevon Oct 26, 2026
  15. added
    100%Progress: 100%
    and removed
    85%Progress: 85%
    in-progressStart work on an admitted issue.
    state:workingWork can proceed on the verified branch or without a branch.
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

100%Progress: 100%branchedIndicates that a branch has been created for this issue.bugSomething isn't workingbugfixSomething isn't workingpriority: lowNot urgent, can be addressed later.size: XXLIndicates an extremely large task or issue that requires significant time and effort to complete.

Type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions