Skip to content

Throttle repeated rollout compression runs#25659

Merged
jif-oai merged 2 commits into
mainfrom
jif/simplify-compression-marker
Jun 1, 2026
Merged

Throttle repeated rollout compression runs#25659
jif-oai merged 2 commits into
mainfrom
jif/simplify-compression-marker

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented Jun 1, 2026

Why

#25089 introduced the background worker that compresses cold archived rollouts, and #25654 made that pass faster once it starts. But the worker still deleted rollout-compression.lock on successful exit, so the existing six-hour staleness window only helped with overlapping or crashed workers. Each new local thread-store initialization could immediately rescan archived rollouts even if a full pass had just finished.

This change keeps the existing marker around long enough to throttle redundant reruns. The worker is still best-effort, but it no longer does repeated startup scans when nothing new is eligible for compression.

What Changed

  • Replace the drop-scoped CompressionLock with a CompressionRunMarker that claims the existing .tmp/rollout-compression.lock path and leaves it in place after success.
  • Reuse the existing six-hour staleness window to block both overlapping starts and immediate reruns, while still letting a stale marker be reclaimed.
  • Update the worker docs and debug logging to describe the new "already running or recently ran" behavior.
  • Extend the rollout compression tests to assert that a successful run leaves the marker behind and that a fresh marker suppresses a new run.

Validation

  • just test -p codex-rollout

@jif-oai jif-oai changed the title chore: simplify compression marker Throttle repeated rollout compression runs Jun 1, 2026
@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented Jun 1, 2026

The failure is due to an unrelated flake

@jif-oai jif-oai merged commit c3cdf3c into main Jun 1, 2026
29 of 30 checks passed
@jif-oai jif-oai deleted the jif/simplify-compression-marker branch June 1, 2026 18:46
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant