Skip to content

Add structured progress logging to cr review and review pipeline #364

Description

@rianjs

Summary

Add structured progress logging to cr review and the review pipeline so long-running GitHub and LLM operations emit regular stderr breadcrumbs with symmetric start/finish timing and stable structured fields.

This follows the non-review progress logging slice already shipped in #363 and extends the same contract to the review path, which is now the highest-value gap.

Scope

Add review-path progress breadcrumbs for:

  • top-level cr review command envelope
  • GitHub IO in and around PR metadata, installation/auth, checkout/diff/fetch, threads/comments, and posting
  • LLM task lifecycle events, including provider, harness/adapter, model, reasoning effort, and task/session ids
  • major review stages such as selection, slicing, per-agent execution, synthesis, and outbox/posting
  • failure/retry/resume breadcrumbs, including resumed task/session identifiers where available

Logging contract

  • progress writes to stderr only
  • result payloads stay on stdout
  • --quiet suppresses progress only
  • progress lines stay single-line, structured, and easy to substring-parse
  • every meaningful IO/LLM/stage operation should be wrapped in symmetric start / finish or error events with duration

Waypoints

  1. Review command envelope logging
  2. GitHub IO breadcrumbs
  3. LLM task/session lifecycle breadcrumbs
  4. Review stage breadcrumbs
  5. Resume / retry / error breadcrumbs and quiet-mode validation

Required empirical checks

Each waypoint commit must include a real local-binary verification that inspects stderr output from the built CLI before moving to the next waypoint. Unit tests alone are not sufficient.

Expected checks include:

  • local cr review ... --dry-run stderr contains the new waypoint breadcrumbs
  • stdout payload shape is unchanged
  • --quiet suppresses progress while preserving stdout and ordinary error behavior
  • resume/failure paths emit the expected stderr markers when reproducible locally

Acceptance criteria

  • running cr review in the terminal gives regular feedback during long GitHub and LLM operations
  • stderr includes stable structured fields for command/op/target/duration and relevant LLM metadata
  • failures and resumes leave visible breadcrumbs instead of silent stalls
  • the implementation is covered by focused tests around the shared logging component and the review-path integration points

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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