Skip to content

fix(harness-ops): morning-brief renders failed or capped reads as all-clear #7144

Closed

Description

@kyle-sexton

Audited against the six rules in Building effective agent automations: read from a bookmark, not a fixed window; a failed read is never a quiet day; least privilege for read-only work.

Gaps

  1. Stranded section renders an all-clear on failure. A jq failure in the stranded computation prints "(none — every merged PR in the window is clear)" (plugins/harness-ops/skills/morning-brief/scripts/morning-brief.sh:1139). || echo 0 turns a failed count into "(none parked)" (:828) and an empty telemetry section (:950).
  2. Fixed 3-day stranded window. Findings older than --stranded-days drop out if the brief is not run, and the skill says this section is the only place they appear.
  3. Silent caps. pr list --limit 200 on the GraphQL path (:653; the REST path checks), decisions --limit 200 (:786), counts --limit 1000 (:577), labels --limit 500 (:365), telemetry issue search with gh's default limit (:887-889), none reporting a cap hit.
  4. Unbounded paging and no tool scope. The stranded --paginate walks every merged PR rather than stopping at the cutoff; SKILL.md frontmatter has no allowed-tools.

Fix

  • Render UNREADABLE (and exit non-zero or flag) when a read or jq step fails, never the empty state.
  • Emit PARTIAL when a result length equals its limit.
  • Replace the fixed window with a per-repo bookmark (last-run mergedAt), keeping --stranded-days as a floor.
  • Stop paging once results pass the cutoff; scope allowed-tools to the script.

Activity

  1. github-actions commented on Oct 11, 2026

    @github-actions
    Contributor

    Thanks for the detailed audit. I confirmed the referenced behavior in plugins/harness-ops/skills/morning-brief/scripts/morning-brief.sh: the stranded-PR, decisions, and count sections do fall back to an "all clear" or zero state on a read/jq failure, several gh calls cap results (labels 500, counts 1000, PRs/decisions 200, telemetry search default) without surfacing a cap hit, the stranded window is a fixed --stranded-days rather than a per-repo bookmark, and SKILL.md has no allowed-tools scoping the script.

    This looks related to #4038 (closed), which reported a similar fail-open pattern for GraphQL 403s on this same script — this issue covers different failure paths (jq failures, caps, paging, tool scope) so it isn't a strict duplicate, but may be worth cross-referencing.

    No missing information — the proposed fix list (render UNREADABLE/PARTIAL, bookmark-based window, cap-exceeded reporting, bounded paging, scoped allowed-tools) is clear and actionable.

    Automated triage. A maintainer reviews it.

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

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions