Skip to content

fix: two inert defects, before something copies them - #76

Merged
aicayzer merged 1 commit into
mainfrom
fix/precedence-and-reconfiguring-health
Sep 5, 2026
Merged

fix: two inert defects, before something copies them#76
aicayzer merged 1 commit into
mainfrom
fix/precedence-and-reconfiguring-health

Conversation

@aicayzer

@aicayzer aicayzer commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Closes #68 and #69. Neither has ever fired; both are fixed because they are cheap and because one of them has already tried to propagate.

#69, precedence. RUNPOOL_SETTLE_SECS was defined outside the snapshot-source-restore block, so a value in the config file beat one in the environment, inverting the documented order and every other setting's behaviour. Nothing outside scheduler.sh reads it and nobody sets it twice, so it never bit. It matters as a pattern: it is the nearest neighbour of the next setting anybody adds, and while designing the stuck-queue guard the obvious move was to copy it.

#68, the health check. It did not consult the reconfiguration lock, so a check landing while set-count, reregister or rename was rewriting registrations could report a deliberate operation as an outage, at critical, to the person holding the lock. Unreachable for an org pool, whose reg count spans the whole organisation, and reachable only for a repo pool in the seconds between a deregister and its re-register. Now skipped with the same predicate autoscale and up already use.

Verification

Two cases added to tests/pool-settling-window.sh, both offline. The precedence one sources the library in a subshell per case, since precedence is decided once at load. The health one asserts by API call count, because the point is that GitHub is not asked at all rather than asked and forgiven; it holds the lock with a real live pid, since $$ reads as our own lock and an unsignallable pid reads as a dead holder.

Reverting either library change fails its case. bash -n, shellcheck --severity=warning and all ten tests pass.

RUNPOOL_SETTLE_SECS was defined outside the snapshot-source-restore
block, so a value in the config file beat one in the environment, the
opposite of every other setting and of what the documentation says.
Nothing outside scheduler.sh reads it and nobody sets it twice, so this
never bit. It is fixed because it is the nearest neighbour of any
setting added next: designing the stuck-queue guard, the obvious move
was to copy it.

The health check did not consult the reconfiguration lock, so a check
landing while registrations were being rewritten could call a deliberate
operation an outage, at critical. Unreachable for an org pool, whose
registration count spans the whole organisation, and now unreachable
full stop.

Both cases fail without their fix.

Closes #68
Closes #69
@aicayzer
aicayzer merged commit 1645114 into main Sep 5, 2026
2 checks passed
@aicayzer
aicayzer deleted the fix/precedence-and-reconfiguring-health branch September 5, 2026 20:48
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.

health check can report a pool unregistered while it is being reconfigured

1 participant