fix: avoid double-counting fetch failures #33
Reference in New Issue
Block a user
Delete Branch "codex/issue-15-fetch-metrics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Addresses #15.\n\nChanges:\n- Records exactly one fetch metric per network attempt in safeFetch and safeFetchText.\n- Preserves HTTP failure status, body byte count, duration, and error text without a second catch metric.\n- Records HTML/non-JSON 200 responses as failed JSON-shape errors instead of successful fetches.\n- Adds regression coverage for HTTP failure, HTML response, and retry attempt accounting.\n\nValidation:\n- git diff --check (only Windows CRLF warnings).\n- Runner-only constraint honored; no local npm/node tests executed.