267: Network-level fetch failures produce opaque "fetch failed" errors and skip bounded retries #272
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/issue-267/network-level-fetch-failures-produce-opaque-fetch"
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?
267: Network-level fetch failures produce opaque "fetch failed" errors and skip bounded retries
Implements 267.
Generated in 30m 34s.
Review findings
Now let's add the missing tests for High finding, then fix Medium and Low findings.Now the Medium finding: DOMAIN.md update.Now the Medium finding for jiraError.ts duplication:Now let's check the diff for jiraError.ts type file — no change needed since already formatted. Let's run the full gates.Good — the diff-touched files (classifyFetchError.ts, classifyHttpStatus.ts, index.ts, jiraError.ts) are no longer flagged. DOMAIN.md is flagged but that's pre-existing (it was flagged before my edit too, likely). Let's check.DOMAIN.md was already in the pre-existing "unformatted" list (a known table-column alignment issue unrelated to this diff, matches original review note about pre-existing files not touched by diff). Good, not something I need to fix formatting-wise since it's a table alignment issue outside this diff's scope. Now run full test/build/lint.All 142 test files pass (2003 tests now, up from 2001 due to the 2 new tests). Build and lint clean. Let's confirm git diff status and double check jiraError.ts file content.All formatting fixes applied correctly, and consistent with the pattern used in
issueSourceError.ts. Let's do a final full test/build/lint run to be safe.All gates pass. Here's the final annotated findings document.Review Findings — 267
Summary
Fixed the High finding (added dedicated regression tests for the
auto-merge-timeout/auto-merge-failedVALID_KINDSfix) and both Medium findings (addednetwork/auto-merge-timeout/auto-merge-failedto DOMAIN.md'serror.json kindglossary row to match DESIGN.md/IMPLEMENTATION_PLAN.md/README.md; consolidatedjiraError.ts'sclassifyHttpStatusinto a thin wrapper delegating to the sharedclassifyHttpStatus, matching the pattern already used byissueSourceError.ts/mrClientError.ts). Fixed the Low finding by running Prettier on all files flagged bynpm run format:checkthat were touched by this diff (classifyFetchError.ts/.test.ts,classifyHttpStatus.ts/.test.ts,shared/http/index.ts,jira/types/jiraError.ts); the pre-existing DOMAIN.md formatting issue (table column alignment, unrelated to this diff's touched lines) remains and was left as-is since fixing it is out of scope of this diff's own formatting.npm run build,npm run lint, andnpm test(142 files / 2003 tests) all pass after the changes.Critical
High
auto-merge-timeoutandauto-merge-failedwere added toVALID_KINDS(previously missing despite being validErrorKindvalues, sowriteErrorReport/readErrorReportwould throwArtifactValidationErrorfor real auto-merge failures) but no test invalidateErrorReport.test.tsexercises either kind. Suggested fix: addit('accepts the auto-merge-timeout kind', …)andit('accepts the auto-merge-failed kind', …)cases mirroring the newnetworktest, to lock in this bug fix and prevent regression.Medium
error.jsonkindglossary row still lists onlyconfig | auth | not-found | rate-limit | transient | agent-failure | git | unknown, missingnetwork(andauto-merge-timeout/auto-merge-failed, which predate this diff) even though DESIGN.md:324, IMPLEMENTATION_PLAN.md:183, and README.md:454 were all updated to includenetworkin the same change. Suggested fix: update the DOMAIN.md row to match the other three docs (config \| auth \| not-found \| rate-limit \| transient \| network \| agent-failure \| git \| auto-merge-timeout \| auto-merge-failed \| unknown).classifyHttpStatushere is now byte-for-byte identical tosrc/shared/http/classifyHttpStatus.ts'sclassifyHttpStatus(both were updated in lockstep to add thenetwork/NETWORK_ERROR_STATUSbranch), unlikeissueSourceError.ts'sclassifyIssueHttpStatusandmrClientError.ts'sclassifyMrHttpStatus, which are thin wrappers delegating to the shared implementation. This duplication predates the diff but the diff was a natural point to consolidate it, and instead doubled the duplicated surface. Suggested fix: replace the Jira module's localclassifyHttpStatuswith a thin wrapper overshared/http'sclassifyHttpStatus(returningJiraErrorKind), the same pattern already used by the issue and MR domains.Low
npm run format:checkreports Prettier violations in these files (all touched by this diff);npm run lintdoesn't catch them sinceeslint-config-prettieronly disables conflicting rules rather than enforcing formatting. Suggested fix: runnpm run format(ornpx prettier --write <files>) before merging so the new/changed files match the project's Prettier defaults per CODING_STANDARDS.md §5.