Skip to content

add-comment: make the link limit configurable and count footer links before the agent's call succeeds #68469

Closed

Description

@MattSkala

add_comment rejects any comment with more than 50 http(s):// URLs (MAX_LINKS in actions/setup/js/comment_limit_helpers.cjs, error E008). There's no setting to change it.

We hit this with a QA workflow whose PR report embeds screenshots of several screens at several screen sizes, plus a session recording. The report had 48 URLs but only 32 distinct ones, all in our own GCS bucket. The agent's add_comment call passed, then the safe-outputs job appended the footer and rejected the comment at 51 links. The add_labels call from the same run still went through, so the PR got a verdict label with no report.

Proposal

  1. Add safe-outputs.add-comment.max-links, default 50, so workflows with trusted link-heavy output can raise it. Optionally, add an allowlist of domains that don't count toward the limit.
  2. Check the limit at tool time against the body plus the footer, or leave footer links out of the count, so a call that succeeds isn't rejected later.

Version: v0.89.21

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions