Skip to content

pm-stack: pin POOL_STATE_PATH in the quota-gatherer unit (#12718) - #12720

Merged
dezren39 merged 1 commit into
mainfrom
felix/12718-pool-state-path
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
felix/12718-pool-state-path

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Refs #12718 (does not close it — the deployment step remains, see below).

Change

  • nixos/services/pm-stack/default.nix: the quota-gatherer unit's Environment gains POOL_STATE_PATH=${home}/.local/state/opencode-claimant/pool-state.json, pinning the babysitter pool-state feed's writer path explicitly. The unit already pinned every QUOTA_* path; this was the one path left to the code default (gather-quota.ts resolves the identical path from $HOME, so behaviour is unchanged — the contract is now visible in the unit definition and immune to a HOME change).
  • doc/fleet-schedule-registry.md: quota-gatherer.timer row review date updated to 2026-11-22, per the registry rule for unit-definition changes.

Evidence

  • Fail-before: POOL_STATE_PATH has 0 matches in the unit definition at origin/main; the deployed unit on the laptop (Nix-store binary pm-aggregator-0.1.0, store path 369fydsa…) likewise carries no POOL_STATE_PATH and predates feat(pm-stack): quota gatherer writes the babysitter pool-state feed (#1338) #12689.
  • Pass-after: the variable is present in the definition; nix-instantiate --parse on the edited module passes (run on the laptop at this branch's head).
  • Writer→reader contract re-verified with live production data (laptop, 2026-11-22T23:45Z, scratch dirs only, production state untouched): projectPoolState from current main over the production quota-current.json projected 29 pools; babysitter.read_pool_state parsed the result with status read, including pools currently walled at 100% (cline-pass, opencode-go, _openai, opendesign). With every entry's measuredAt aged 2h, the projection asserts zero walls, null percents, stale states — feat(pm-stack): quota gatherer writes the babysitter pool-state feed (#1338) #12689's stale contract.

Remaining deployment step (not in this PR)

The deployed aggregator binary itself still predates #12689 (merged 2026-11-22T22:10Z, after the laptop's 2026-11-22 morning rebuild). Redeploying it is the laptop's NixOS/home rebuild, which is Drewry's ./rebuild — recorded on #12718 rather than run by this lane. Once a rebuild picks up a code source at or after 690bbc7e999 (any current main), one gather tick writes pool-state.json and the next babysitter round records pool_state: "read"; that verification closes #12718.


Run Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The quota-gatherer unit set every QUOTA_* path explicitly but not
POOL_STATE_PATH, so the babysitter pool-state feed (#12689, #1338)
depended on the gather-quota.ts default. Pin it to the claimant state
dir the babysitter reads. Registry row for quota-gatherer.timer
reviewed in the same pass.
@dezren39
dezren39 requested a review from a team as a code owner November 23, 2026 00:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T00:03:54.050256Z f7e2ed9 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.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 368a0e49-575e-4cb8-abd5-c1369b36eeac
Commits

Reviewing files that changed from the base of the PR and between 56ad4c4 and f7e2ed9.

Files selected for processing: 2

  • doc/fleet-schedule-registry.md
  • nixos/services/pm-stack/default.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit 671dcd1 into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the felix/12718-pool-state-path branch November 23, 2026 00:02
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.

deploy: babysitter pool-state feed not live on the laptop (aggregator predates #12689, no POOL_STATE_PATH)

1 participant