Skip to content

fix(review): downgrade REES 413 response to warn, not error#7988

Merged
JSONbored merged 1 commit into
mainfrom
loopover-2j-warn-log-413
Jul 22, 2026
Merged

fix(review): downgrade REES 413 response to warn, not error#7988
JSONbored merged 1 commit into
mainfrom
loopover-2j-warn-log-413

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • A large diff/context exceeding REES's own request-size cap is an expected, already-handled degradation (review proceeds with no enrichment brief, same as any other http_error outcome) -- not a broken REES instance.
  • Logging it at error was paging/alerting on routine oversized payloads instead of genuine REES failures, and was flagged by a new Sentry issue surfacing as noise.
  • Fix: 413 now logs at warn; every other non-2xx status still logs at error as before.

Test plan

  • Added a regression test asserting a 413 logs at warn (not error) with the correct structured payload, and that metrics are unaffected
  • npm run test:ci full local gate green
  • npm run test:coverage (unsharded) confirms 100% patch coverage on the changed lines/branches

A large diff/context exceeding REES's own request-size cap is an
expected, already-handled degradation (review proceeds with no
enrichment brief, same as any other http_error outcome) -- not a
broken REES instance. Logging it at error paged/alerted on routine
oversized payloads instead of genuine REES failures.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jul 22, 2026
@JSONbored
JSONbored merged commit f6b2869 into main Jul 22, 2026
10 checks passed
@JSONbored
JSONbored deleted the loopover-2j-warn-log-413 branch July 22, 2026 01:40
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.26%. Comparing base (b9aa25f) to head (6d3f385).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7988      +/-   ##
==========================================
- Coverage   91.91%   89.26%   -2.66%     
==========================================
  Files         739       95     -644     
  Lines       75845    22050   -53795     
  Branches    23016     3834   -19182     
==========================================
- Hits        69712    19682   -50030     
+ Misses       5041     2187    -2854     
+ Partials     1092      181     -911     
Flag Coverage Δ
shard-1 28.57% <0.00%> (-25.71%) ⬇️
shard-2 9.18% <0.00%> (-44.51%) ⬇️
shard-3 95.91% <100.00%> (+40.68%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/review/enrichment-wire.ts 98.46% <100.00%> (+<0.01%) ⬆️

... and 644 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant