Skip to content

fix(soak): size an autoscaler step after the status shows its target - #318

Merged
Saremox merged 1 commit into
mainfrom
claude/soak-judge-step-size
Oct 16, 2026
Merged

Saremox merged 1 commit into
mainfrom
claude/soak-judge-step-size

Conversation

@Saremox

@Saremox Saremox commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Changes proposed on the PR:

  • The soak judge of the autoscaler step size no longer compares the limit before a step with itself. In the reconcile that starts a step, the operator writes the state (phase Applying, the new lastStep), and the status still shows the old effectiveMemory (or none, when it equals the spec limit). The template and the status get the target one reconcile later. The soak run of main 740f2c9e raised a false autoscale_step_size finding at every step ("the step from 128Mi to 128Mi, want 192Mi"), although the operator steps were correct.
  • At the start of a step the judge only remembers the limit before the step, the spec limit and memoryMax. It checks the size in Applying as soon as effectiveMemory differs from that limit, and at Done or Held for a step that is first seen late. A Reverted step gets no check. A change of the spec limit or of memoryMax during the step drops the check, because the limit then moves for another reason.
  • A wrong size is still a finding (512Mi to 576Mi with the target 640Mi, a Done step that still shows the old limit). Each step is counted once. The "started" log line no longer quotes a target limit.
  • The other judges do not read effectiveMemory in the first round of a step (cooldown and budget use lastStep; shrink, maxmemory, restart and handover use the pod limits).

Possible operator change, not in this PR: the status pairs the new lastStep and Applying with the old effectiveMemory for one reconcile. Showing the target during Applying would change the meaning of effectiveMemory (the limit of the StatefulSet), so it needs a decision.

Tests: TestStepSizeAfterTheFirstRound (11 cases: the production status sequence, a wrong size, a fast step first seen as Done, Held, Reverted, a spec or memoryMax change during the step). 8 of the 11 fail on main. Not tested: a kind or e2e run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G4mmyo3sqLwf23m5FE2nBE


Generated by Claude Code

… step

The operator writes a step to its state first. The status shows the limit
of the pods, and the StatefulSet gets the step limit one reconcile later.
Thus the first status of a step can show the limit before the step, and
the judge reported a correct step from 128Mi to 192Mi as a step to 128Mi.

The size check waits until effectiveMemory moves in Applying, or the step
is Done or Held. A revert, and a user change of the spec limit or of
memoryMax in the step, give no check.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G4mmyo3sqLwf23m5FE2nBE
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-16T09:19:48.031477Z 70028a4 PR opened
ℹ️ 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.

@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Saremox
Saremox merged commit db08783 into main Oct 16, 2026
17 checks passed
@Saremox
Saremox deleted the claude/soak-judge-step-size branch October 16, 2026 09:37
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.

2 participants