Skip to content

fix(review): retry a 503 REES startup ping before escalating (#5006) - #5043

Merged
JSONbored merged 1 commit into
mainfrom
fix/5006-rees-ping-503-retry
Jul 11, 2026
Merged

fix(review): retry a 503 REES startup ping before escalating (#5006)#5043
JSONbored merged 1 commit into
mainfrom
fix/5006-rees-ping-503-retry

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (Closes #5006).

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • test:coverage (full unsharded): not run end-to-end — ran scoped vitest --coverage for test/unit/enrichment-wire.test.ts (51 tests) and confirmed via lcov that every changed line and both branches of the new retry loop are covered.
  • actionlint / test:workers / build:mcp / test:mcp-pack / ui:openapi:check / ui:lint / ui:typecheck / ui:build / npm audit: not run — this change touches only src/review/enrichment-wire.ts (existing fire-and-forget startup probe, no new API/schema/binding/dependency surface) and its tests; no workflow, MCP, UI, or dependency-manifest surface changed.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests. (N/A — this is a startup diagnostic probe, not an auth surface; a persistent-503 negative test and a genuine-401/403-mismatch test are both preserved/unaffected.)
  • API/OpenAPI/MCP behavior is updated and tested where needed. (N/A.)
  • UI changes use live API data or real empty/error/loading states. (N/A.)
  • Visible UI changes include a UI Evidence section. (N/A.)
  • Public docs/changelogs are updated where needed. (N/A — internal engine behavior; changelog is not edited in a normal PR.)

Notes

Part of a batch of 13 bug fixes filed from a Sentry-issue triage this session (#4994#5006). This is #13 and the last by priority.

REES's own /v1/ping returns 503 specifically to mean "not configured/
ready yet" (server.ts checks its own REES_SHARED_SECRET before
anything else) -- the same benign startup-ordering race the engine's
probe already extends grace to for a refused connection, just via an
HTTP response instead of a connection failure. All 7 GITTENSORY-1J
events clustered in one ~5h window and never recurred, consistent
with a one-time deploy/restart race rather than a persistent
misconfiguration. Retry a 503 up to twice (500ms apart) before
logging rees_ping_error; any other status is still final immediately,
and a persistent 503 still escalates after the retries exhaust.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.29%. Comparing base (34437c9) to head (942b74f).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5043   +/-   ##
=======================================
  Coverage   94.28%   94.29%           
=======================================
  Files         462      462           
  Lines       39367    39376    +9     
  Branches    14363    14364    +1     
=======================================
+ Hits        37119    37128    +9     
  Misses       1593     1593           
  Partials      655      655           
Flag Coverage Δ
shard-1 46.66% <20.00%> (-0.03%) ⬇️
shard-2 33.25% <20.00%> (-0.12%) ⬇️
shard-3 31.27% <20.00%> (-0.19%) ⬇️
shard-4 32.52% <20.00%> (-0.27%) ⬇️
shard-5 34.42% <100.00%> (+0.95%) ⬆️
shard-6 45.28% <20.00%> (+0.21%) ⬆️

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.35% <100.00%> (+0.08%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 8f10e83 into main Jul 11, 2026
17 checks passed
@JSONbored
JSONbored deleted the fix/5006-rees-ping-503-retry branch July 11, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

fix(rees): investigate a REES /v1/ping 503 (7 Sentry events)

1 participant