Skip to content

feat(server): store divergences in Redis - #73

Merged
alecthomas merged 2 commits into
mainfrom
feat/server-redis-storage
Oct 28, 2026
Merged

alecthomas merged 2 commits into
mainfrom
feat/server-redis-storage

Conversation

@alecthomas

@alecthomas alecthomas commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

The SPECTRE server kept divergences only in memory, so a restart lost every reported quarantine and several server replicas could not share them.

This puts storage behind an interface with two backends. Memory stays the default. Redis is selected with --storage=redis and --redis-url. The server still validates reports and filters and sorts listings, so both backends only keep the latest quarantine of each mirror direction. The Redis backend keeps every divergence in one hash and uses an optimistic transaction so a stale retry never replaces a newer quarantine. Its tests run against an in-process Redis fake.

It also gives the response comparison integration test more time. On a loaded CI runner it ran past its one-minute deadline without any check failing, so the overall deadline is now five minutes and the process readiness timeouts are 90 seconds.

🤖 Generated with Claude Code

@alecthomas
alecthomas marked this pull request as ready for review October 28, 2026 08:48
@alecthomas

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T08:50:49.716971Z bfffed2 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: bfffed2c15

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The SPECTRE server kept divergences only in memory, so a restart lost every
reported quarantine and replicas could not share them. A storage interface
keeps the in-memory behaviour as the default and lets the server use Redis
when divergences must persist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alecthomas
alecthomas force-pushed the feat/server-redis-storage branch 2 times, most recently from 66160ba to b56086d Compare October 28, 2026 10:09
On a loaded runner the response comparison integration test ran past its
one-minute deadline with no failed check, and the supervisor used most of
its readiness timeout. The same code passed in under a minute elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alecthomas
alecthomas merged commit 3d9fcf2 into main Oct 28, 2026
6 checks passed
@alecthomas
alecthomas deleted the feat/server-redis-storage branch October 28, 2026 10:30
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