Skip to content

The quality-reviewer prompt lists no report_incomplete tool although the manifest and instructions provide it #76450

Done

Description

@soarkit

Summary

The generated reviewer prompt declares the safe-output tools available to the agent in a fixed list, and that list omits report_incomplete. The corresponding manifest still exposes the tool, and the markdown instructions added by the change tell the agent to run safeoutputs report_incomplete, so the instruction references a tool the prompt does not grant.

Actual behavior

The lock file lists the available safe-output tools as:

create_pull_request_review_comment(max:10), submit_pull_request_review,
create_check_run, report_missing_tool, report_missing_data, noop(max:2)

report_incomplete is absent. The same change adds instructions that invoke it:

printf ... | safeoutputs report_incomplete .

and the manifest continues to declare report_incomplete. Effects:

  • the agent is told to call a tool that the prompt's tool list does not contain, so the instruction cannot be satisfied and the completion path degrades to a noop or an error;
  • regenerating the lock from the workflow reproduces the mismatch, because the prompt list and the manifest are produced from different sources;
  • because both artifacts are generated, the inconsistency is stable and invisible in review: each file looks self-consistent, and only a cross-file comparison exposes it.

Expected behavior

Every safe-output tool declared by the manifest and referenced by the reviewer instructions must appear in the <safe-output-tools> list of the generated lock. Regenerating the lock must preserve that agreement, and a consistency check must fail if an instruction references a tool that the prompt does not grant.

Reproduction

  1. On the target commit, inspect the <safe-output-tools> list in the generated reviewer lock: report_incomplete is missing.
  2. Inspect the manifest: report_incomplete is declared.
  3. Inspect the reviewer instructions: the agent is told to pipe content into safeoutputs report_incomplete.
  4. Regenerate the lock and observe the same omission.

Relevant code

# .github/workflows/pr-code-quality-reviewer.lock.yml
<safe-output-tools>
  create_pull_request_review_comment(max:10), submit_pull_request_review,
  create_check_run, report_missing_tool, report_missing_data, noop(max:2)
</safe-output-tools>

Root cause

The prompt's tool list is emitted by a template that enumerates tools independently of the manifest. When the instruction and manifest gained report_incomplete, the template was not extended, so the generated lock advertises a set that is a strict subset of what the rest of the configuration assumes.

Because both the lock and the manifest are generated artifacts, the mismatch survives regeneration: nothing derives the prompt list from the manifest, and no check compares the two. The failure therefore depends on a cross-file invariant that is currently unenforced.

Suggested fix

Derive the prompt tool list from the manifest, or add report_incomplete to the template that emits it, then regenerate the lock. Add a consistency check that every tool referenced by the reviewer instructions appears in the prompt's safe-output list, so a future instruction cannot reference an ungranted tool.

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions