Skip to content

docs-review: render the review summary from structured output #394

Open

Description

@theletterf

While testing #393 in docs-actions-sandbox, I saw the docs review drift from its summary template in one or two of seven runs. Once, the agent dropped the ## Docs review summary heading and filled the collapsed coverage section with search narratives. Another time, it printed a section that said only "None." The prompt already forbids both.

I tried a fix in #393: a shell checker that the agent ran on its body before posting. It worked in the sandbox, but the PR Review bot found four more ways around it in four rounds, none of which a real run had produced. We removed it, because it patched the wrong layer.

elastic/libra shows a better approach. Its reviewer never writes review text. The model calls tools with structured fields (path, line, claim, severity), and Go code renders every comment (findingBody in internal/review/publisher.go), so the template can't drift. A deterministic policy (internal/review/policy.go) decides what gets published.

For the docs review, that could mean a gh-aw custom safe output. The agent would call a tool with fields such as action_required, issue_satisfaction, follow_ups, content_type, and not_checked, and a deterministic job would build the summary from a fixed template. Empty fields would simply leave their section out. The same job could filter known noise patterns.

Libra's eval suite is worth copying too. Each case pins base_sha and head_sha and lists expected and forbidden claims. The sandbox replicas from #393 are ready-made cases:

  • docs-actions-sandbox#180 (Update cc-connect-self-managed-to-autoops.md docs-content#8643): expect "Cloud Connect" flagged, forbid "verified … accurate".
  • docs-actions-sandbox#181 (#8367): forbid zero-finding criteria lines and Vale restatements.
  • docs-actions-sandbox#182 (#8617): expect the "could not be read" line for the private source issue.

Open questions: whether gh-aw custom safe outputs can carry this shape cleanly, and how inline comments fit, since they would stay free text unless we structure them as well.

Activity

  1. theletterf commented on Oct 6, 2026

    @theletterf
    MemberAuthor

    More evidence for this one. After 1.63.0 shipped, I ran the released review on three new docs-content PRs in the sandbox. The content rules held, but the summary drifted from its template in two of the three runs, more often than during testing:

    That puts it at three or four drifted summaries in ten runs since we started testing, all of a kind that structured output would prevent.

    I'm cleaning up the sandbox replicas, so here are the pinned commits for future eval cases (merge base, then the reviewed head, all in elastic/docs-content):

    Case PR Base Head
    Names, never certify #8643 1230c89 1503353
    Noise #8367 2a6f940 d3844b5
    Private source issue #8617 7b126ae c253f9d
    UI label conflict, Verify both #8697 6501f4f 0b80d59
    Private linked issue, deployment scope #8674 c05e30a 0a3342a
    Unconfirmed rationale, SME request #8665 d8a3955 d4dfc3c

    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions