Skip to content

PR writer hallucinates placeholder issue refs #343

@sentry-junior

Description

@sentry-junior

Junior generated a PR body containing a placeholder issue reference that links to a nonexistent GitHub issue:

Closes https://github.com/getsentry/sentry/issues/XXXXX

Observed in getsentry/sentry#115461.

Impact

  • GitHub closing keywords (Closes, Fixes, Resolves) have side effects — they can auto-close issues on merge
  • Placeholder references degrade PR quality and confuse reviewers
  • The linked issue URL returns a 404

Root cause

The pr-writer skill says "do not invent references," but the model still generated a template-style placeholder (XXXXX) instead of omitting the reference when no real issue was known. Prompt-only guardrails are insufficient for this failure mode.

Proposed fix

  1. Deterministic validation — add a preflight check on PR bodies before gh pr create / API PATCH that strips or blocks:
    • Placeholder issue IDs (XXXXX, <issue>, TODO, TBD)
    • GitHub issue URLs with non-numeric paths
    • Closes/Fixes/Resolves lines referencing unverified issues
  2. Strengthen skill wording — explicitly forbid placeholder refs and label examples as non-copyable in the pr-writer skill

Action taken on behalf of Nick Meisenheimer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions