Skip to content

fix: skip pre-auto-upgrade agents in rollout, clearer aggregation budget log - #1016

Merged
fclairamb merged 2 commits into
mainfrom
feat/todos-2026-11-24
Nov 24, 2026
Merged

fclairamb merged 2 commits into
mainfrom
feat/todos-2026-11-24

Conversation

@fclairamb

Copy link
Copy Markdown
Owner

Two fixes from the dev logs review.

  • Agent auto-upgrade: agents predating auto-upgrade (≤ 0.53, no autoUpgrade field) are now skipped by the rollout like pinned agents, instead of being asked to upgrade (which they ignore) and holding their region's turn. The timeout WARN now says when it asks the same (only) agent again, with the attempt number.
  • Aggregation job: a run that only exhausts its 30 s budget logs Aggregation stopped on its run budget; "behind its raw retention" is kept for a real lag > 1 h.

Closes fclairamb/solidping-business#109
Closes fclairamb/solidping-business#110

🤖 Generated with Claude Code

fclairamb and others added 2 commits November 24, 2026 10:13
…lidping-business#109)

Agents older than the rolling upgrade send no autoUpgrade field and ignore
the upgrade frame, yet the server asked them anyway (VersionPinned read an
absent field as "follow", protocol.go:217): each request burned an attempt,
held the region's slot for the 10 min timeout, and ended in a misleading
"giving up (check imagePullPolicy)" WARN. Such agents are now withdrawn from
the rollout like pinned ones (upgrade.go noteAgentVersion), logged once per
connection at INFO "agent predates auto-upgrade: upgrade it by hand".

The timeout WARN now says "asking it again" with the attempt when the agent
that timed out is the next candidate (single-agent region), carries the
slot's deadline (the expiry is only seen when an agent next contends), and
names next_agent when it really moves on.

Tests: upgrade_legacy_test.go (a claim without autoUpgrade never gets an
upgrade frame, and does not hold up its region) and
TestUpgradeTimeoutAsksTheOnlyAgentAgain; all fail before the fix.

Closes fclairamb/solidping-business#109

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ind (fclairamb/solidping-business#110)

A run that spent its 30 s budget with no raw lag logged "Aggregation is
behind its raw retention" at INFO, every few minutes on a busy deployment,
although it was keeping up (logAggregationRun, job_aggregation.go:287 used
the message for budget_exhausted || lag > 1h). The "behind" message now
needs the lag past the threshold; a budget-only stop logs "Aggregation
stopped on its run budget" (INFO, same attributes).

Test: TestLogAggregationRun_BudgetWithoutLagIsNotBehind, fails before the fix.

Closes fclairamb/solidping-business#110

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fclairamb fclairamb added autopilot frozen Batch PR under review: takes only its own fixes, new work goes to the next batch labels Nov 24, 2026
@codecov

codecov Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.03%. Comparing base (c5d384d) to head (e8924f4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1016      +/-   ##
==========================================
+ Coverage   91.00%   91.03%   +0.02%     
==========================================
  Files        1413     1413              
  Lines      146786   146807      +21     
==========================================
+ Hits       133585   133646      +61     
+ Misses      13193    13153      -40     
  Partials        8        8              
Files with missing lines Coverage Δ
server/internal/agents/protocol.go 100.00% <100.00%> (ø)
server/internal/handlers/agentws/handler.go 88.48% <100.00%> (+0.20%) ⬆️
server/internal/handlers/agentws/upgrade.go 96.44% <100.00%> (+0.25%) ⬆️
server/internal/jobs/jobtypes/job_aggregation.go 96.64% <100.00%> (+0.18%) ⬆️

... and 21 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fclairamb
fclairamb merged commit 599fee6 into main Nov 24, 2026
41 checks passed
@fclairamb
fclairamb deleted the feat/todos-2026-11-24 branch November 24, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge autopilot frozen Batch PR under review: takes only its own fixes, new work goes to the next batch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant