Skip to content

Docs: shared gh failure classification, exit-4 semantics, and no-retry issue filing #1160

Open

Description

@jflowers

Documentation impact of fix-feedback-reply-followups

The OpenSpec change fix-feedback-reply-followups (issue #1023, epic #1060 Tier 2) changed three user-facing behaviors that need a documentation pass in docs/usage.md / docs/architecture.md:

1. One shared gh failure classification

Both the uf-workflow feedback tools and the review-dispatch fetch tools now classify gh CLI failures through one shared module (.opencode/lib/gh-error.ts, classifyGhFailure). The decision table, first match wins:

  1. spawn ENOENT → gh_not_found (not retryable)
  2. spawn ETIMEDOUT, SIGTERM, or "timed out"/"timeout" text → timeout (retryable)
  3. "rate limit" text → rate_limited (retryable)
  4. "gh auth login" / "not logged" text → gh_auth_failed (not retryable)
  5. gh exit code 4 → gh_auth_failed (not retryable)
  6. anything else → api_error (not retryable)

Stderr text keys outrank exit code 4. Behavior change for review-dispatch consumers: exit 4 with no recognizable stderr text previously reported rate_limited / retryable; it now reports gh_auth_failed / not retryable, matching gh's documented exit-code convention (gh help exit-codes: "if a command requires authentication, the exit code will be 4").

2. createIssue no longer retries on timeout

gh issue create timeouts are ambiguous (the issue may exist server-side), so createIssue in feedback-replies.ts fails fast instead of retrying, with an error directing the operator to check the repository for the issue before re-running. Transient non-timeout failures still retry once.

3. Crash-recovery re-run passes the full list

/uf.address-feedback Section 1.7 now instructs passing the full confirmed item list to post_feedback_replies on crash-recovery re-entry (including items whose replies were already posted) — the tool's per-item records make the re-run idempotent. The previous wording named only the already-posted subset, which a literal re-run would satisfy with no pending work done.

Tracking issue for the documentation gate (AGENTS.md). Implementation: openspec/changes/fix-feedback-reply-followups/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions