Skip to content

feat: add staged rollout for rule-pack updates - #1279

Merged
mijinummi merged 1 commit into
MDTechLabs:mainfrom
rhemy-arc:feat/rule-pack-staged-rollout
Oct 18, 2026
Merged

mijinummi merged 1 commit into
MDTechLabs:mainfrom
rhemy-arc:feat/rule-pack-staged-rollout

Conversation

@rhemy-arc

Copy link
Copy Markdown

Ship a candidate rule-pack version to a growing, deterministic cohort of tenants in gated stages, with automatic rollback when a stage's candidate scan failure ratio breaches its gate.

  • Cohort membership from SHA-256(pack, candidate version, tenant): stable across processes, monotonic across stages, rotating between releases.
  • Allow/deny lists, pause/resume/rollback, forced advance requires a reason.
  • Per-scan pins keep retries on the same rule-pack versions; the pin fingerprint belongs in scan-result cache keys.
  • Unregistered packs are unmanaged, so existing scan paths are unchanged.
  • Kill switch (RULE_PACK_ROLLOUT_ENABLED=false) withdraws candidates instantly while honouring existing pins.
  • Tenant-scoped pins; channel writes use optimistic concurrency; outcome counters use an atomic store primitive so concurrent workers never lose increments.
  • In-memory and file stores, Prometheus metrics with bounded labels, and sanitized structured logs that never include store errors or content.
  • Fixtures: realistic Soroban AMM repository rollout and a frozen cohort assignment regression snapshot.
  • Docs: docs/RULE_PACK_STAGED_ROLLOUT.md

Closes #1270
Closes #1269
Closes #1267
Closes #1268

Ship a candidate rule-pack version to a growing, deterministic cohort of
tenants in gated stages, with automatic rollback when a stage's candidate
scan failure ratio breaches its gate.

- Cohort membership from SHA-256(pack, candidate version, tenant): stable
  across processes, monotonic across stages, rotating between releases.
- Allow/deny lists, pause/resume/rollback, forced advance requires a reason.
- Per-scan pins keep retries on the same rule-pack versions; the pin
  fingerprint belongs in scan-result cache keys.
- Unregistered packs are unmanaged, so existing scan paths are unchanged.
- Kill switch (RULE_PACK_ROLLOUT_ENABLED=false) withdraws candidates
  instantly while honouring existing pins.
- Tenant-scoped pins; channel writes use optimistic concurrency; outcome
  counters use an atomic store primitive so concurrent workers never lose
  increments.
- In-memory and file stores, Prometheus metrics with bounded labels, and
  sanitized structured logs that never include store errors or content.
- Fixtures: realistic Soroban AMM repository rollout and a frozen cohort
  assignment regression snapshot.
- Docs: docs/RULE_PACK_STAGED_ROLLOUT.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@rhemy-arc Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mijinummi
mijinummi merged commit 4d19be2 into MDTechLabs:main Oct 18, 2026
10 of 13 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

3 participants