Skip to content

fix(feed): raise backend snapshot deadline to 120 seconds - #53531

Merged
Mathis (echobt) merged 1 commit into
mainfrom
fix/snapshot-deadline
Oct 16, 2026
Merged

Mathis (echobt) merged 1 commit into
mainfrom
fix/snapshot-deadline

Conversation

@echobt

@echobt Mathis (echobt) commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Production get_weights has returned 503 (backend public snapshot deadline exceeded) since epoch 25747 (2026-10-16 01:40 UTC), so the master burned the whole bounty share to UID 0.

A full read of the public feed from inside the running container succeeds in 37.3 s for 20,877 reports, above the 30 s global deadline.

This raises _SNAPSHOT_TIMEOUT_SECONDS to 120 s and updates docs/architecture.md. The companion CortexLM/cortex PR raises the master get_weights HTTP timeout to 180 s so it stays above this deadline.

Follow-up: an incremental cached snapshot when the report set approaches this ceiling.

Local: ruff format, ruff check, mypy, pytest (169 passed).

Summary by CodeRabbit

  • Behavior Changes
    • Public feed snapshot requests can now take up to 120 seconds before reporting that the backend is unavailable. The maximum of three attempts and immediate failure for stable gates remain unchanged.
  • Documentation
    • Updated the architecture guide to reflect the 120-second retry window.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e5f75a59-b5eb-4f09-bc8b-ddf64bf175bf
📥 Commits

Reviewing files that changed from the base of the PR and between 28a3c79 and 754c646.

📒 Files selected for processing: 2
  • docs/architecture.md
  • src/bounty_challenge/feed.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The public snapshot timeout increases from 30 to 120 seconds. The architecture documentation reflects the updated retry deadline. The maximum of three attempts and immediate failure for stable gates remain unchanged.

Changes: Snapshot timeout

Layer / File(s) Summary
Update snapshot deadline
src/bounty_challenge/feed.py, docs/architecture.md
PublicBackend._SNAPSHOT_TIMEOUT_SECONDS changes to 120 seconds. The architecture documentation updates the retryable feed error deadline. The retry limit and stable-gate behavior remain unchanged.

Priority: ⬆️ High

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 754c6

Public-feed snapshots now have a 120-second deadline, matching the architecture documentation. No concrete merge-blocking risk is evident.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: increasing the backend snapshot deadline from 30 to 120 seconds.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@echobt
Mathis (echobt) merged commit f2790a6 into main Oct 16, 2026
4 checks passed
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