Skip to content

fix(gateway): boot-seed backends so site-api survives restart - #164

Open
echobt wants to merge 1 commit into
mainfrom
fix/site-api-empty-registry
Open

fix(gateway): boot-seed backends so site-api survives restart#164
echobt wants to merge 1 commit into
mainfrom
fix/site-api-empty-registry

Conversation

@echobt

Copy link
Copy Markdown
Contributor

Summary

  • Prod chain.joinbase.ai/v1/site/* went empty after a 12:38 UTC gateway+prism image pull: the in-memory challenge registry was wiped, so site-api soft-failed while Postgres still had 488 Prism submissions and 11k Design runs.
  • Gateway now boot-seeds prism + design from BASE_GATEWAY_BACKENDS (compose default), so a restart cannot leave /challenge/* at 503.
  • Migration 0020 allows scoring_mode=benchmarks on prism_eval_run (v4 finalize was hitting prism_eval_run_mode_check).
  • Adds base-reseed-backends.timer as a 2-minute fallback for older images (already enabled on the prod master).

Test plan

  • Prod reseed: /v1/site/arenas/prism/leaderboard returns epoch 24519 / 30 rows; design 340; network 482 agents
  • cargo test -p gateway-registry --lib (parse/seed + existing registry tests)
  • cargo test -p gateway --lib
  • CI green on this PR
  • After merge/tag: confirm a gateway restart still serves /challenge/prism/health 200 without a manual POST

A gateway image pull left the in-memory registry empty, so /v1/site/*
soft-failed while Postgres still had hundreds of Prism/Design rows.
Seed prism+design from compose env, allow scoring_mode=benchmarks on
prism_eval_run, and keep a 2-minute reseed timer as fallback.
@coderabbitai

Copy link
Copy Markdown

Warning

Review limit reached

@echobt, you've reached your PR review limit, so we couldn't start this review.

Next review available in:45 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3646c030-6fbc-4316-90bf-6e0560755e69

📥 Commits

Reviewing files that changed from the base of the PR and between c3377e9 and fcbd012.

📒 Files selected for processing (11)
  • crates/db/migrations/0020_prism_eval_scoring_benchmarks.sql
  • crates/gateway-registry/src/lib.rs
  • crates/gateway/src/lib.rs
  • deploy/AGENTS.md
  • deploy/scripts/prod-reseed-backends.sh
  • deploy/scripts/register-challenge-backends.sh
  • deploy/scripts/remote-deploy.sh
  • deploy/systemd/base-reseed-backends.service
  • deploy/systemd/base-reseed-backends.timer
  • docker-compose.yml
  • docs/SITE_API.md

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.

Sign up for freeto 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

@echobt