feat(vloer): warn when Runs hold budget Ploeg cannot release #211
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ryangr0/replace/201-unsettled-accounts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces #201 (feat: list and warn about Runs whose spend Ploeg cannot settle) after the Ploeg separation in #206. Its Ploeg part is ploeg-hq/ploeg#50; this PR moves Unfold's pin to that branch and carries the rest.
Commits
d0058978build(ploeg): pin ploeg-hq/ploeg#50 to list Runs whose spend cannot settleeff0d28ffeat(vloer): warn when Runs hold budget Ploeg cannot release (from8de8151274)61737d66chore(site): re-record the demo replay for the unsettled summary fields (from857397edb0)Merge order
build(ploeg)commit to the merge commit on Ploeg'smain, then merge. Until then theploeg-pincheck is red by design: it requires the pinned commit on Ploeg'smain.Verification (local, at
61737d66with Ploege683eba0)mise run verifywith the result cache, as a pull request runs it: all gates passed. That includes the Ploeg group (its ownscripts/verify.shat the pin), Vloer, the extension, the demo replay check, integration (managed qualification) and docs.What happened to each commit of #201
5cb8ee814f8de8151274eff0d28f857397edb0mise run demo-recordas61737d66The original had no reviews or comments. Its checks were red because
developmentitself failed atmise install --locked; #206 fixes that lock. No earlier check result carries over.Original description of #201
Summary
Ploeg, VIK-1634 (https://vikunja.webgrip.dev/tasks/1634): new read-only
GET /api/v1/operator/unsettled-accounts. It lists finished Runs whose account is stillminting,issuedorunknown. These are the Runs the block sweep retries and logs asmanaged key block retry unresolved.runId, workItemId, team, accountState, heldUsd(fromrun_budget_holds.reserved) andsince(run_llm_accounts.updated_at). Rows are oldest first, at most 200.{count, heldUsd}come from a window sum, so they also count matching Runs beyond the 200 on the page.invalid_request. No run token, alias or key is returned.PendingLLMBlocksand the new query share one selection constant, so the two cannot drift.operator-api.v1schema gainsunsettledAccountsResponse, and step 6 ofinvestigate-a-runs-spend.mdnames the endpoint.Vloer, VIK-1635 (https://vikunja.webgrip.dev/tasks/1635):
PloegClient.summaryreadsunsettled-accountsin its own try. It filters rows by the user's Teams, sums the count and total from those rows, and addsunsettledandunsettledErrorto the summary.format.moneytotal, a "Show the 3 Runs" disclosure linking#work/<id>, and the runbookapps/ploeg/docs/ops/managed-workers.md, "Reconcile uncertainty".chore(site)commit, because the demo summary gained the two fields.Billing-adjacent: a human should review this.
What was reused from the 2026-10-01 branches
Nothing was carried over. I read both branches:
fix/ploeg-unsettled-holds-park: the floor sweep waits for unsettled holds, a new close reason, the Vikunja link and ADR-0048.fix/vloer-work-item-clarity: the "Budget held, not spent" wording and Run counts.Both change settlement behaviour, close reasons or Work Item page wording. That work is outside these tickets and overlaps the VIK-1755 settlement logic. Only their diagnosis was used: finished Runs keep holding budget. No ADR or ADR status change is included.
Tests
pkg/store/llm_unsettled_test.go: the selection equalsPendingLLMBlocks, holds equalrun_budget_holds, rows are oldest first, totals include Runs beyond the page, plus scope, empty and limit cases.pkg/httpapi/operator_unsettled_test.go: schema validation, silver scope, no token, alias or key in the body, empty 200, 400 for a query, 405 for POST.test/ploeg.test.ts,test/now-view.test.mjsandtest/ploeg-activity.test.mjs.cd apps/ploeg && go test -count=1 ./... && go vet ./...: all ok.apps/vloer:npm test704/704 pass,npm run checkok.mise run verify: all gates passed (vloer, demo-replay, vloer-extension, ploeg, brand, site, site-demo, helm, release, integration, docs).Checks left to CI
None. Live-provider tests stay opt-in.
🤖 Generated with Claude Code
🤖 Generated with Claude Code
61737d668ab6d2f25fa1b6d2f25fa146819e9723