feat(canary,ha-proof): adopt liveness selector revision - #89
Conversation
Bump the internal select-runner pins to 3415de3 and adapt the direct-output assertions from idle semantics (reason=idle, idle-runner-count) to liveness semantics (reason=online, online-runner-count). Topology idle-capacity proofs keep their own REST-derived idle counts; only the selector contract changes. Part of melodic-software/github-iac#79. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EPDbXgonTuFwFwdTtHaCmw
Points both private-caller templates at commit 169e3a4 (the liveness-selector canary and HA-proof implementation), records the superseded revisions in the contract tests, and updates the CI pin fetch to the new commit. Part of melodic-software/github-iac#79. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EPDbXgonTuFwFwdTtHaCmw
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_15f32e0d-994d-415f-a341-1e0b468ee92e) |
|
Claude finished @kyle-sexton's task in 1m 59s —— View job PR Review: feat(canary,ha-proof): adopt liveness selector revision
This is a clean mechanical follow-through of the idle→online semantic rename introduced in #86. No correctness issues found. Notes below. SHA pinningThe two-layer pin strategy holds throughout:
|
| Old | New |
|---|---|
idle-runner-count output |
online-runner-count |
IDLE_RUNNER_COUNT env |
ONLINE_RUNNER_COUNT env |
SELECTED_IDLE_COUNT env |
SELECTED_ONLINE_COUNT env |
idleRunnerCount property |
onlineRunnerCount property |
reason=idle gate |
reason=online gate |
Dual drain-hold in production-ha-proof.yml
The workflow contains two inline drain-hold script blocks (at lines ~704 and ~1465), both generated from production-ha-proof.cjs. Both are updated identically — and --check passing clean confirms the CJS source and rendered YAML are in sync. No concern.
Intentionally retained idle references
The remaining idle occurrences in production-ha-proof.cjs — idleCount, desktop-idle/laptop-idle outputs, and the summary line "Laptop retained at least one online idle runner." — are correct. These belong to the REST-based topology proof, which separately validates idle capacity at the group level. The PR description makes this explicit ("Topology proofs keep their own REST-derived idle counts"). The mixed phrasing "online idle runner" in that summary line accurately describes the laptop group invariant (must have at least one runner that is both online and idle per the REST query).
Rerun guard message
- [[ "$RUN_ATTEMPT" = 1 ]] || fail "reruns must route hosted; start a new dispatch"
+ [[ "$RUN_ATTEMPT" = 1 ]] || fail "canary evidence needs a fresh dispatch, not a rerun"Good improvement. The old message was inaccurate post-rename (reruns no longer guarantee a hosted route under the online selector) and the new message correctly explains why the guard exists (fresh evidence), not just what happens.
Test coverage
Both test files properly reflect the new contracts:
local-runner-canary.test.cjs:doesNotMatchregex updated fromidle-runner-counttoonline-runner-count, and the two assertion regexes updated forSELECTED_REASON=onlineandONLINE_RUNNER_COUNT.production-ha-proof.test.cjs:implementationShaupdated; bothselect-runner.yml@…assertions updated to the new selector SHA.
Overall: LGTM. The rename is complete and consistent, pin hygiene is maintained, the test suite covers the contracts, and the fetch consolidation is a clean improvement.
## Summary #89 updated the immutable-pin fetch step in `ci.yml` but missed the identical step in `selector-conformance.yml`. On main-push runs the squashed PR branch commits are unreachable from a plain full-history checkout, so `git show 169e3a4` inside the pin tests fails — the post-merge `selector-conformance` run on main is red. PR runs passed because the PR merge ref still reached those commits, which hid the gap. One-line fix: fetch `169e3a4287211a536eddcd3a757dd06132fb556e` (the liveness canary/HA-proof implementation commit) instead of the two superseded pins. Part of melodic-software/github-iac#79, epic #78. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EPDbXgonTuFwFwdTtHaCmw <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > CI workflow-only change to which git objects are fetched; no runtime, auth, or application logic. > > **Overview** > Aligns **`selector-conformance.yml`** with **`ci.yml`** by updating the **Fetch immutable workflow pins under test** step to shallow-fetch a single commit (`169e3a4…`) instead of two superseded SHAs. > > That commit is the current liveness canary / HA-proof implementation pin exercised by the immutable-pin tests. After squashed merges, those old commits are not reachable from a full-history checkout on **main**, so `git show` in the tests failed on post-merge runs even though PR runs still passed. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 061172d. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>


Summary
Internal-consumer follow-through for the liveness selector (ci-workflows#86, merged at
3415de3):local-runner-canary.yml+production-ha-proof.yml: selector pin66e3e97→3415de3ff2fafee40e4d087eb6073d2f6952b595; direct-output assertions adapted from idle semantics (reason=idle,idle-runner-count) to liveness semantics (reason=online,online-runner-count). Topology proofs keep their own REST-derived idle counts — only the selector contract changes.production-ha-proof.cjsdrain-hold:SELECTED_IDLE_COUNT→SELECTED_ONLINE_COUNT, reason gateidle→online; generated workflow blocks re-rendered (--checkclean).169e3a4(two-commit flow: implementation first, then repin referencing its SHA, matching the existing pin-fetch pattern in ci.yml).Test plan
node --test .github/scripts/*.test.cjs: 169 pass, 0 fail (includes pinned-revision contract tests viagit show 169e3a4).render-production-ha-proof-workflow.cjs --check: clean.Part of melodic-software/github-iac#79, epic melodic-software/github-iac#78.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EPDbXgonTuFwFwdTtHaCmw
Note
Medium Risk
Changes pinned self-hosted routing contracts for acceptance workflows; misalignment with fleet or selector behavior could block canary/HA proof until live acceptance runs.
Overview
Adopts the liveness
select-runnerrevision (3415de3) inlocal-runner-canary.ymlandproduction-ha-proof.yml, replacing the prior pin. Canary and production validation now require selector outputs withreason=onlineandonline-runner-countinstead of idle semantics; REST topology inventory in HA proof still uses its own idle/online counts from the API.production-ha-proof.cjsand the generated workflow embeds useSELECTED_ONLINE_COUNTand the same reason gate; private seed templates and contract tests repin the reviewed implementation commit169e3a4, withci.ymlfetching that SHA for pinned-revision tests. Canary preflight copy clarifies that attempt 1 is still required for evidence quality, not because reruns force hosted routing.Reviewed by Cursor Bugbot for commit e7376e3. Bugbot is set up for automated code reviews on this repo. Configure here.