Skip to content

Refuse oversized blocking rules before scoring and retain pod eviction details - #1492

Merged
athvin merged 2 commits into
mainfrom
fix/block-pair-budget-eviction
Nov 30, 2026
Merged

athvin merged 2 commits into
mainfrom
fix/block-pair-budget-eviction

Conversation

@athvin

@athvin athvin commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Closes #1477

What

Check each blocking rule against the tenant’s candidate-pair budget before scoring. The default is 100 million pairs per rule. Errors identify the rule, the observed count or lower bound, and the configured limit. Preserve the Kubernetes reason, message, and observed container exit code on both the task and its archived attempt when eviction or an OOM ends a pod.

Why

An er-dev match spent 8.5 minutes and reached 387 GiB of spill before Kubernetes evicted it. The task record then lost the eviction detail. Grouping symmetric blocking keys lets preflight detect this case without constructing the pairs.

Proof

Local make check and make check-e2e passed before rebasing on main. The block census refused 499,999,500,000 candidate pairs from one million records sharing a compound key. DuckLake integration coverage verifies that a rejected replacement preserves all 19 active pairs. Kubernetes status fixtures and PostgreSQL executor tests cover the failure detail. The original live eviction is recorded in #1477.

Risk & rollback

Tenants that intentionally score a larger block can set max_candidate_pairs_per_rule in their config. Generic predicates may still spend time finding matching pairs before reaching the threshold. Revert the merge to restore the previous admission and reporting behavior.

Post-merge ledger

Closed by: Codex · session 01a22617-fe23-7d41-a7bc-1b35070cc8bd on Mac · 2026-11-30T07:50:03Z

  • main is green with this change on it — the merge SHA, and the run
    that proves it. A later head SHA with this commit as an ancestor counts;
    a cancelled run with zero jobs does not: Descendant e1b7ef0d contains merge 70f2efb1 and passed Rust, frontend and infra.
  • images built, or correctly never ran because nothing that goes into
    an image changed: Images for the exact merge built er-api. ECR identifies sha256:31ba2256d5555ad8559ea51e84566cec52df28a8ce18122431beea037342e091 with tag 70f2efb19aa1215c9ede5093c4625d7aa420fff5.
  • deploy converged — proved by a line the running process emitted, not
    by the image digest and not by the workflow conclusion: The active er-dev/ci service selected green. Its er-server container used the merge image above and emitted er-server listening at 0.0.0.0:8000 on 2026-11-30T07:37:41.310887Z. Both deployment jobs passed.
  • the push-only surface no pull request can pre-test (deploy, drift,
    kind's nightly leg) is green, or knowingly red for a reason that is not
    this change: Deploy and the latest Kind passed. The earlier drift check reported a subscriber gap and pre-existing prod/core drift.
  • the board card reached Done through the automation rather than by
    hand, and the issue closed: fix(match): a blocking key that explodes is found by eviction 8 minutes in — no pair budget, and the eviction reason never reaches the task record #1477 closed and reached Done on both project boards.
  • follow-ups are open for everything deferred here — numbers: 10M-scale spill run without eviction #558 tracks the 10-million-record run and its spill measurements.
  • what was learned is written down where the next session will find it
    (a skill, a reference, memory) — or nothing new was learned: The er-matching customer rules reference in this merge documents the per-rule limit and its override.

Specific to this change

  • The active server started with the exact merge image. The preflight refused 499,999,500,000 pairs before scoring. Kubernetes fixtures and the real PostgreSQL executor suite verified reason, detail and observed exit code on the task and archived attempt. Original er-dev eviction and verification.
Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

This branch was previously deployed

1 inactive deployment
marketing-preview — 175c80c9 Deployed Nov 30, 2026 by athvin via remove closed PR previews #191
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.

fix(match): a blocking key that explodes is found by eviction 8 minutes in — no pair budget, and the eviction reason never reaches the task record

2 participants