Repository navigation
Description
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
- On the target commit, inspect the
<safe-output-tools>list in the generated reviewer lock:report_incompleteis missing. - Inspect the manifest:
report_incompleteis declared. - Inspect the reviewer instructions: the agent is told to pipe content into
safeoutputs report_incomplete. - 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.
Activity