Skip to content

fix: reject legacy compaction on owned and draining rollout tables - #420

Merged
beinan merged 2 commits into
mainfrom
codex/guard-owned-worker-compaction
Oct 21, 2026
Merged

beinan merged 2 commits into
mainfrom
codex/guard-owned-worker-compaction

Conversation

@beinan

@beinan beinan commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

The worker rollout compaction endpoint currently accepts untracked base-table rewrites even when the table is draining or configured for owned maintenance. That bypass can race the master’s fenced recovery and handoff.

Apply the existing legacy admission check before opening the table or acquiring its write lock. Owned/draining tables use the master’s fenced maintenance path. The regression test holds a live reader while checking immediate rejection for both protected states, and exercises successful compaction for an ordinary legacy table.

Validation: formatting and diff checks passed. The first Clippy run found unused response values in the regression test; the final commit now checks the create status and compaction result explicitly. Rebased onto main after #418 merged. The focused local regression passed on the initial functional patch (1 passed, 0 failed); response assertions were tightened afterward. Final-head CI must pass before merge.

This closes an HTTP compaction bypass; automatic hotspot enrollment and durable legacy worker admission remain separate unfinished work.

@beinan
beinan force-pushed the codex/guard-owned-worker-compaction branch from 9b11285 to 2e95586 Compare October 20, 2026 23:14
@beinan
beinan changed the base branch from codex/legacy-merge-progress to main October 20, 2026 23:14
@beinan
beinan marked this pull request as ready for review October 20, 2026 23:18
@beinan
beinan merged commit 84e686f into main Oct 21, 2026
13 of 14 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