voyage/tests/fixtures/review-version/review-1-2.md

4.9 KiB

type review_version created task slug project_dir brief_path scope_sha_start scope_sha_end reviewed_files_count verdict round round_base review_policy review_policy_note review_policy_sha256 finalized findings
trekreview 1.2 2026-11-02 Add a retry to the HTTP client http-retry .claude/projects/2026-10-30-http-retry/ .claude/projects/2026-10-30-http-retry/brief.md 9c7415404313b37eb41902654837df5c93d2b5d7 801dd95f7372095cc06b9a6a1984f86038c5886b 2 WARN 1 null applied max-minor 10, two skip paths 823412d1eacb67956220e532959f0104603057c88704863ca38e7cd188fda812 true
77bc675af2ef7b4524b6a21b6fb23190bb56a32f
e1fa7656c24e23e316f96169884da5f15059beb9
bd517c3b965addbf8db5fdc6c04478e3e0f3c6cb

Review: Add a retry to the HTTP client

Executive Summary

Verdict: WARN. Two MAJOR findings on lines this range changed, one answered accepted and one fixed; one pre-existing MAJOR on a line the range did not change.

Coverage

File Treatment Reason
lib/http.mjs deep-review risk
lib/config.mjs summary-only default

Findings (MAJOR)

77bc675af2ef7b4524b6a21b6fb23190bb56a32f

  • Rule: CODE_REVIEW_DEFECT
  • Location: lib/http.mjs:41
  • Title: The retry loop has no total time limit
  • Recommended action: Stop retrying once the total wait passes the configured limit.

e1fa7656c24e23e316f96169884da5f15059beb9

  • Rule: CODE_REVIEW_DEFECT
  • Location: lib/http.mjs:58
  • Title: A 429 answer is retried without reading Retry-After
  • Recommended action: Wait at least the Retry-After value before the next attempt.

bd517c3b965addbf8db5fdc6c04478e3e0f3c6cb

  • Rule: CODE_REVIEW_DEFECT
  • Location: lib/config.mjs:12
  • Title: The timeout default is read as seconds and used as milliseconds
  • Pre-existing: yes (the range did not add or change this line)

Pre-existing

Severity Count
MAJOR 1
  • The timeout default is read as seconds and used as milliseconds (lib/config.mjs:12)

Declined to Judge

None.

Trimmed: 0

Remediation Summary

Two counting MAJOR findings, both answered; no BLOCKER.

Remediation Steps

Step R1: Honour Retry-After on a 429 answer

  • Files: lib/http.mjs
  • Source finding: e1fa7656c24e23e316f96169884da5f15059beb9
  • Test first: a 429 with Retry-After: 2 waits at least two seconds before the next attempt
  • Verify: re-run /trekreview → finding e1fa7656c24e23e316f96169884da5f15059beb9 absent
  • On failure: revert

Answers

Finding Answer Reason Record Carried from
77bc675af2ef7b4524b6a21b6fb23190bb56a32f accepted The caller sets its own deadline; a total limit here is a follow-up. c97c121a37e664a6ccbe874f9b0afb22e21661305772e0c2939e61ddfdb74924 -
e1fa7656c24e23e316f96169884da5f15059beb9 fixed Fixed by Step R1. 191904440c3a567c054e56ee1831204c422553732b255ad562f7034e54543554 -
{
  "verdict": "WARN",
  "counts": {
    "BLOCKER": 0,
    "MAJOR": 3,
    "MINOR": 0,
    "SUGGESTION": 0
  },
  "pre_existing_counts": {"BLOCKER": 0, "MAJOR": 1, "MINOR": 0, "SUGGESTION": 0},
  "resolved": [],
  "ran": {
    "engines": ["code-review", "security-review"],
    "reviewers": ["brief-conformance-reviewer", "code-correctness-reviewer"]
  },
  "allow_blocked_by": [],
  "findings": [
    {
      "id": "77bc675af2ef7b4524b6a21b6fb23190bb56a32f",
      "severity": "MAJOR",
      "rule_key": "CODE_REVIEW_DEFECT",
      "file": "lib/http.mjs",
      "line": 41,
      "title": "The retry loop has no total time limit",
      "detail": "A server that keeps answering 503 keeps the caller waiting without end.",
      "recommended_action": "Stop retrying once the total wait passes the configured limit.",
      "engine": "code-review",
      "reviewer": "claude-code-review",
      "pre_existing": false
    },
    {
      "id": "e1fa7656c24e23e316f96169884da5f15059beb9",
      "severity": "MAJOR",
      "rule_key": "CODE_REVIEW_DEFECT",
      "file": "lib/http.mjs",
      "line": 58,
      "title": "A 429 answer is retried without reading Retry-After",
      "detail": "The client retries a 429 at once, so a rate-limited server is hit again before it allows it.",
      "recommended_action": "Wait at least the Retry-After value before the next attempt.",
      "engine": "code-review",
      "reviewer": "claude-code-review"
    },
    {
      "id": "bd517c3b965addbf8db5fdc6c04478e3e0f3c6cb",
      "severity": "MAJOR",
      "rule_key": "CODE_REVIEW_DEFECT",
      "file": "lib/config.mjs",
      "line": 12,
      "title": "The timeout default is read as seconds and used as milliseconds",
      "detail": "The default of 30 becomes a 30 ms timeout.",
      "recommended_action": "Multiply the default by 1000 where it is read.",
      "engine": "code-review",
      "reviewer": "claude-code-review",
      "pre_existing": true
    }
  ]
}