Skip to content

feat(claude-ops): morning-brief serves sections 1-4 from REST when non-review GraphQL is blocked #4039

Description

@kyle-sexton

Summary

When non-review GraphQL is blocked (the HTTP 403 shape #3170 documented for cloud sessions), morning-brief.sh cannot read any section because every one of its gh subcommands rides GraphQL. Serve sections 1-4 from repository-scoped REST endpoints in that case, and let section 5 report UNREADABLE, so a cloud session gets a mostly complete brief instead of an honest empty one.

Depends on the degraded-mode contract in #4038 landing first, so a REST failure degrades the same way a GraphQL failure does.

Motivation

The daily operator pass increasingly runs from cloud sessions. #3234 documented REST substitutes for other skills; morning-brief has none. Note the limit: in the session that surfaced this, REST was also 403 (the org GitHub App was not connected to the gh proxy). This change helps #3170-shaped sessions where REST works, not that one.

Design decisions (from interview)

  • gh-subcommand-first stays the primary path. REST is a fallback keyed on the observed 403 shape, not a rewrite.
  • Section 5 (stranded findings) needs reviewThreads, which is GraphQL-only and not in the served pinned set. It renders UNREADABLE under the fallback. Never an all-clear.
  • Merge-ready via REST needs one GET /repos/{o}/{r}/pulls/{n} per open PR for mergeable_state. Cap it (a --pr-limit default is the implementer's call) and say when the cap truncated the read.
  • Queue counts via REST use GET /repos/{o}/{r}/issues?labels=...&state=open with pagination; search/issues is not repository-scoped and is blocked in cloud sessions.
  • Parked decisions and telemetry via REST use the repository issues and comments endpoints.

Acceptance criteria

  • WHILE non-review GraphQL is blocked, sections 1-4 are served from REST and section 5 renders UNREADABLE.
  • The header names the transport in use when it is not the default.
  • Live and REST paths render byte-identical output for identical data (fixture-proven with a REST-shaped fixture per section).
  • The merge-ready REST path states when the per-PR cap truncated the read; a truncated read is never rendered as complete.
  • No new sections.

Verification

Out of scope

  • A model-side MCP rebuild of the brief.
  • Widening the served GraphQL set (not owned by this repo).

Related

Activity

  1. added
    needs-triage
    on Sep 10, 2026
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

    needs-triage

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions