Skip to content

feat: make treasury the governed budget control plane #1905#1939

Open
svelderrainruiz wants to merge 2 commits into
issue/upstream-1905-budget-headroom-guardfrom
issue/upstream-1905-treasury-control-plane
Open

feat: make treasury the governed budget control plane #1905#1939
svelderrainruiz wants to merge 2 commits into
issue/upstream-1905-budget-headroom-guardfrom
issue/upstream-1905-treasury-control-plane

Conversation

@svelderrainruiz
Copy link
Copy Markdown
Contributor

Summary

  • make treasury the authoritative budget control plane instead of letting the GitHub comment hook own budget decisions
  • project treasury state into governor summary, portfolio summary, and handoff output
  • add treasury policy, schemas, scripts, docs, and focused contract coverage

Testing

  • node --test tools/priority/tests/treasury-control-plane.test.mjs tools/priority/tests/treasury-control-plane-schema.test.mjs tools/priority/tests/github-comment-budget-hook.test.mjs tools/priority/tests/github-comment-budget-hook-schema.test.mjs tools/priority/tests/autonomous-governor-summary.test.mjs tools/priority/tests/autonomous-governor-summary-schema.test.mjs tools/priority/tests/autonomous-governor-portfolio-summary.test.mjs tools/priority/tests/autonomous-governor-portfolio-summary-schema.test.mjs
  • Invoke-Pester tests/AgentHandoff.Local.Tests.ps1 -Output Detailed
  • node tools/npm/run-script.mjs docs:manifest:validate
  • node tools/npm/run-script.mjs priority:cost:treasury
  • pwsh -NoLogo -NoProfile -File tools/Test-AgentHandoffEntryPoint.ps1 -Quiet
  • node tools/npm/run-script.mjs lint:md:changed
  • git diff --check

@svelderrainruiz
Copy link
Copy Markdown
Contributor Author

Treasury control plane slice is up.

Key result:

  • budget governance now lives in tools/priority/treasury-control-plane.mjs
  • governor/portfolio/handoff surfaces project treasury state directly
  • the GitHub comment budget hook now consumes treasury instead of acting like the authority

Focused validation passed locally:

  • treasury tests + schemas
  • comment-hook tests + schemas
  • governor summary + portfolio tests + schemas
  • AgentHandoff.Local.Tests.ps1
  • docs:manifest:validate
  • tools/Test-AgentHandoffEntryPoint.ps1 -Quiet
  • git diff --check

Budget hook: blended lower bound $0.020100; operator $0.000000 of $50000.000000 cap (spendable remaining unreconciled; observed upper bound $50000.000000); window invoice-turn-2026-03-HQ1VJLMV-0027 spent $0.020100 remaining $399.979900; account est $468.000000 remaining from 11700 credits @ $0.040000 per credit; operational headroom $368.000000 (healthy); safe spend $368.000000; treasury cautious-delivery (lower-bound-only); pressure cautious; turns 1 total (0 live, 0 background); 1 turn(s) still pending labor timing; calibration reserve $100.000000 across 1 held window(s). Receipt: tests/results/_agent/cost/github-comment-budget-hook.json.

@svelderrainruiz svelderrainruiz enabled auto-merge (squash) March 24, 2026 15:50
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.

1 participant