Skip to content

fix: prevent @fill from inferring wrong Linear ticket references#73

Open
factory-nizar wants to merge 1 commit intodevfrom
fix/fill-wrong-linear-tickets
Open

fix: prevent @fill from inferring wrong Linear ticket references#73
factory-nizar wants to merge 1 commit intodevfrom
fix/fill-wrong-linear-tickets

Conversation

@factory-nizar
Copy link
Copy Markdown
Contributor

@factory-nizar factory-nizar commented Apr 14, 2026

Summary

`` was associating PRs with incorrect Linear tickets. The LLM was inferring ticket IDs from commit messages and other indirect sources, sometimes guessing wrong. This fix adds an explicit instruction to the fill prompt to prevent speculative ticket association.

Changes

  • Added an explicit instruction in the fill prompt telling the LLM to never infer, guess, or add ticket references (Linear, Jira, GitHub issues, etc.) that are not already present in the PR description, PR comments, or branch name — and specifically to never extract ticket IDs from commit messages or other indirect sources.
  • Removed ## Related Issues from the default output structure to avoid prompting the LLM into speculative ticket association.

Implementation Details

The change is scoped to src/create-prompt/templates/fill-prompt.ts, which defines the prompt template used by `` to generate PR descriptions. Two targeted edits were made:

  1. A new guardrail instruction was inserted into the "Use the gathered information to write the description" section, explicitly forbidding ticket inference from indirect sources.
  2. The ## Related Issues heading was removed from the default output structure template, so the LLM is no longer prompted to fill in a section that encourages guessing.

Testing

[To be filled by author]

Related

FAC-18468

@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid bot commented Apr 14, 2026

Droid finished @factory-nizar's task —— View job


Explicitly instruct the LLM not to guess ticket IDs from commit messages
or other indirect sources. Only ticket references already present in the
PR description, comments, or branch name are preserved.

Removes ## Related Issues from the default output structure to avoid
prompting the LLM to fill it speculatively.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@factory-nizar factory-nizar force-pushed the fix/fill-wrong-linear-tickets branch from d96be44 to cb2b94f Compare April 14, 2026 17:30
@factory-nizar factory-nizar marked this pull request as ready for review April 14, 2026 17:31
@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid bot commented Apr 14, 2026

Droid encountered an error —— View job


Droid is running a security check…

@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid bot commented Apr 14, 2026

Droid encountered an error —— View job


Droid is running a security check…

@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid bot commented Apr 14, 2026

Droid finished @factory-nizar's task —— View job


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant