Skip to content

PR Review Slop stage emits template/runtime errors (CommentReview/SuggestRemoval) #54

Description

@taras

Summary

The Slop section of PR Review can fail with raw template/runtime errors instead of structured feedback.

Repro Context (baseline)

Observed Errors

In the Slop section, the bot outputs:

  • <!-- ERROR: Assignment to constant variable. -->
  • <!-- ERROR: Failed to evaluate expression prop "dismissedReplies={newDismissReplies}" on <SuggestRemoval />: newDismissReplies is not defined -->

Likely Source Path

  • .reviews/policies/SlopPolicy.md includes <CommentReview pr={pr} />
  • .reviews/components/CommentReview.md computes newDismissReplies and passes it to <SuggestRemoval ... />
  • .reviews/components/SuggestRemoval.md consumes dismissedReplies

The second error likely cascades from an earlier failure that prevents newDismissReplies from being defined.

Expected Behavior

  • Slop policy should produce stable output or cleanly skip optional steps.
  • Runtime/template errors should not leak into PR comments.

Suggested Fix Directions

  • Make CommentReview resilient when earlier eval blocks fail.
  • Guard SuggestRemoval invocation with safe defaults/defined checks.
  • Add diagnostics in workflow logs for template-eval failures.

Replay / Compare

Re-run the PR Review workflow on commit 0eca22e02bd43a14ed3eff26428f68c4ff868db5 and compare produced comment output against the linked baseline comment.

Note: output may drift if prompts/templates/workflow changed since baseline run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions