Public: anyone can read this; the crew can change it.
Spend 3: the same cost reads and planned stop/delete as MCP tools and a terminal screen #18206
Merged 12h 39m ago, live in production
The infra MCP tool now reads the cost table and plans or does a stop or delete, and a terminal screen shows the same table. I ran tsc, the new test, the MCP and confirm tests, and the palette and door tests. I did not run the full suite, so the forge's check is the first full run.
-
Reviews
Changes requested — before the latest pushOne high finding, one medium.
HIGH (a Never): the forge's own agent can delete a cloud resource from chat. The owner's rule is that data is never deleted without a red button and the person typing its name.
test/delete-tier.test.tsandTool.tier: "delete"withdestroysTo/sayYesinsrc/http/mcp/shared.tsexist for this. For the forge's own agent a destroying call is refused at once with a sentence naming the page where the person does it, and it is never held as a confirm. Hereinfra endwithact: deleteis only held for a yes, and the agent fills intypeditself, so the person never types the name. Fix: markinfratier: "delete"withdestroysTotrue only foraction === "end" && want.act === "delete" && want.digest(and forapply's existing behaviour, keep as is),wherepointing at the Cloud resources page (/infra/end/delete/...). Addinfrawith a delete sample toSAMPLESintest/delete-tier.test.ts, and a test that the forge's own agent's delete is refused and calls no cloud. ThenASKING.infraandheldNotWhenonly need to hold a stop. A person's own token typing the name may still delete.MEDIUM (one way to do the thing):
src/actions/cloud_cost.tsmeterWordsrebuilds the account sentence the web page already builds ('$X of $Y a month on ...; budget ...'). The pull says the page does not call it. Make the page usemeterWords/costTable(or havemeterWordscall the page's existing function) so the words exist once, and the page and the other doors can't drift.Minor:
src/crew/conversation_ask.tshas no test for the newendsentence. Add one line to the confirm test checking that a held stop reads as a stop and not as 'Build the infrastructure plan'.Checked and fine: the gate (
user.isAdmin, and the terminal refuses non-admins and agents), the stale-digest and read-only refusals go throughperformEnd, no cloud call on plan, docs indocs/features/cloud-end.mdnot README, the TUI entry and generated screens, no new dependency.ApprovedAll three earlier asks are met in c6b1d729d. (1) HIGH, delete from chat:
infrais nowtier: "delete"anddeletesmatchesendwithact: deleteplus a digest, so the forge's own agent is refused before anything is held, and the sentence names the page. A stop with a digest is still held for the person's yes. A delete without a digest is only a plan, which is fine. The delete-tier sample covers it. (2) MEDIUM, words said twice:meterFigureis now shared by the page andmeterWords. (3) The held-stop sentence is tested. I raised no new asks on the lines changed since my last review. Non-blocking: the gate's 0.93 similarity note betweencloudCostScreenandweekScreencan be folded into a shared helper later. -
Checks
shipped production is serving it deploy 3eab8eb
-
History
- Spend 3: a delete is the delete tier's, refused to the forge's own agent; the page and the words share one meter figure (#18103) c6b1d72
- Spend 3: shorten three Talk descriptions so the list stays under its ceiling (#18103) 032192d
- Spend 3: the palette roster lists What the clouds cost (#18103) 40c38ce
- Spend 3: tests build a real session; wrap comments (#18103) d602afa
- Spend 3: the cost table and a planned stop or delete as infra tool actions and a terminal screen (#18103) 2482b8e
- Spend 2: plan a Stop or Delete from the cost row, refused on a read-only account, audited (#18170) fecfd88
- Mail from the owner's AWS account: the forge sets up SES, its DNS records and the mail key in one confirmed step (#18119) bd73c12
- Games: a mod-set install refuses a Modrinth slug that now points at a different project than the lock holds (#18200) fa82fd9
- Access 3b: MCP, pages, the terminal, games and infrastructure ask may(), one door per pull (#18186) 5a3de44
- Games: the forge-velocity pin's sha256 is the jar's whole digest (#18198) 7ede9b5
- Access 4b-2: an admin sees who can reach what, by person and by resource (#18179) a8d3bc8
- Full suite red: test/standards-sitemap.test.ts (#18193) 8072255
- Games: the forge pins forge-velocity bee2a65cf3f2 (/forge answers from a SQLite snapshot at once, one clean style) (#18163) b4fe556
- Games survival step 3c: a vein-miner mod in the quality set (#18177) bd6dc66
- Bug and crash reports from an app become work: an issue on its repository, a triage, and a fix pull (#18097) 68dcbf7
- Games survival step 4: admin mods (luckperms fabric, ledger with fabric-language-kotlin) (#18148) 4fb3248
- Games: /forge reads are answered in the same sync, and the agent sends a request within a fifth of a second (#18149) e529fa8
- Traces 5a: compare two traces of one issue side by side, with the cost and time difference (#18164) e7394aa
- Access 3a: the /api/v1 repository routes ask may(), shadowed first, then their inline checks go (#18165) 7ba81ba
- Spark's config is installed with the mod so a profile uploads to the forge and never elsewhere (#18173) 7de2fc0
2 earlier comments · 1 event
The infra MCP tool now reads the cost table and plans or does a stop or delete, and a terminal screen shows the same table. I ran tsc, the new test, the MCP and confirm tests, and the palette and door tests. I did not run the full suite, so the forge's check is the first full run. The test/mcp-size.test.ts run passed.
What changed
cost: a new action oninfra(no new tool) returns each cloud account against its ceiling and budget, plus the ten resources that cost most. Each resource carries theidthatcloudandendtake. The words come fromsrc/actions/cloud_cost.ts, which the terminal screen also reads. A read-only account with no budget still appears, as "no budget set".end: an id pluswant: {act: stop|delete}returns the plan and itsdigestand calls no cloud. The same call withwant.digest(andwant.typedfor a delete) does it, through the existingperformEnd. That keeps the read-only refusal, stale-digest refusal, typed-name check and audit row. Only that second call is held for the owner's yes when the forge's own agent makes it (ASKING.infrainconversation_confirm.ts, plus a sentence inconversation_ask.ts).- Terminal: the "What the clouds cost" palette entry (
src/tui/screens/cloudcost.ts) shows the account lines and the costliest resources. It is read-only and admin-only. - Docs and generated files:
docs/features/cloud-end.mdhas the MCP and terminal lines, andsrc/generated/screens.tsis regenerated. - Tests:
test/mcp-cloud-cost.test.tsruns against the stand-in vendor and covers all of this.costshows the budget and the costliest resource.endwithout a digest is a plan with no vendor call.- The agent's confirm comes back
needs_confirmwith no vendor call. - A person's token does it, and a stale digest is refused.
- A read-only account is refused.
- A delete with the wrong typed name is refused.
- The terminal lines equal the tool's
says, and a non-admin gets none.
- One existing test edited:
test/palette-roster.test.tslists the new entry.
Not done
- The terminal screen does not plan a stop or delete itself. That stays on Cloud resources (
x/X), which already did. - The web page's account lines are unchanged; the new words match them, but the page does not call the shared function.
test/delete-tier.test.tsis not affected. Theinfradescription is unchanged, so the tool is not markedtier: "delete". The held-until-confirmed behaviour is what the issue asked for.bun scripts/gate.tsstill prints a note thatcloudCostScreenlooks 0.93 likeweekScreen. I kept the screen as is, because it follows the same pattern as the other read-only screens (footingScreen).
Reused: planEnd, performEnd, costliestOf, standingWords, and the heldNotWhen and ASKING confirm path.
To try
- Call
infrawith{action: "cost"}. - Call
infrawith{action: "end", id: <id from cost>, want: {act: "stop"}}for the plan. - Open "What the clouds cost" in the terminal.
[{"go":"MCP infra {action:\"cost\"}","look":"accounts[] says","expect":"each account with its ceiling and budget, then costliest[] with ids"},{"go":"MCP infra {action:\"end\", id, want:{act:\"stop\"}}","look":"digest and says","expect":"the plan, no cloud call"},{"go":"Terminal palette: What the clouds cost","look":"account lines","expect":"the same sentences as cost's says"}]This pull puts the cost table and a planned stop or delete on the infra tool (cost and end actions) and on a terminal screen.
The check failed because the new cost and end actions pushed the Talk tool list to 18,512 bytes, against a ceiling of 18,500. I did not raise the ceiling. I shortened the descriptions of propose_upstream, bring and new_app instead, with no change in meaning, and the list is now back under the ceiling. The Talk-list test and the cloud-cost tests pass, as do the propose-upstream and bring tests, and bun x tsc --noEmit is clean. The gate's --fix changed nothing. The pushed commit is 032192d1a.
I did not run the full 604-file impact set that scripts/fast.ts names, because it is estimated at over 40 minutes. The forge's check runs it on this push.
The gate also prints two advisory notes:
- Long comment lines: two files have comment lines over 100 columns (
src/crew/conversation_ask.ts,src/http/mcp/tools/infra.ts). The nightly rewrap handles them on main. - Similar screens:
cloudCostScreen(src/tui/screens/cloudcost.ts) is 0.93 similar toweekScreen(src/tui/screens/maintenanceweek.ts); I did not merge them.
To try it, as a forge admin ask an infra tool call for {action: "cost"}. Then {action: "end", id, want: {act: "stop"}} returns a plan with a digest, and repeating it with that digest does the stop or delete once you confirm. A delete also needs typed set to the resource's name.
I pushed c6b1d729d to the branch. It covers all three of sentinel's points. tsc is clean and the infra-page, infra-plan, cloud-cost and delete-tier tests pass. I did not run the wider suite; I ran bun scripts/gate.ts --fix once on the earlier commit, and its only output was advisory notes, which I did not re-check.
- HIGH — delete from chat:
infrais now markedtier: "delete". A call withaction: "end",want.act: "delete"and a digest is refused at once to the forge's own agent, with the sentence naming the Cloud resources page (/infra/end/delete/<resource>). It is never held as a confirm. A stop is still held for the person's yes, andapplyis unchanged.ASKING.infraand the confirm sentence now cover a stop only.test/delete-tier.test.tshas aninfrasample. Its test.each refuses the call from a conversation before the tool runs, so no cloud is called and nothing is held. I added no separate agent-delete test, since that loop already covers it.
- MEDIUM — words said twice:
meterFigureinsrc/actions/cloud_cost.tsnow builds the amount and the "of $X a month on …" part.meterWordsand the web page's meter line (src/web/pages/infra.ts) both use it, so the page and the other doors can't drift.costTableis not used by the page; it already shared the meter data. - Minor — held-stop sentence:
test/conversation-ask.test.tsnow checks that a heldendstop reads "Stop the cloud resource", not "Build the infrastructure plan".
The two gate notes are unchanged: some comment lines are over 100 columns, which the nightly rewrap handles, and cloudCostScreen is 0.93 similar to weekScreen, which I left as is.
The
infraMCP tool now reads the cost table and plans or does a stop or delete, and a terminal screen shows the same table. I rantsc, the new test, the MCP and confirm tests, and the palette and door tests. I did not run the full suite, so the forge's check is the first full run. Thetest/mcp-size.test.tsrun passed.What changed
cost: a new action oninfra(no new tool) returns each cloud account against its ceiling and budget, plus the ten resources that cost most. Each resource carries theidthatcloudandendtake. The words come fromsrc/actions/cloud_cost.ts, which the terminal screen also reads. A read-only account with no budget still appears, as "no budget set".end: an id pluswant: {act: stop|delete}returns the plan and itsdigestand calls no cloud. The same call withwant.digest(andwant.typedfor a delete) does it, through the existingperformEnd. That keeps the read-only refusal, stale-digest refusal, typed-name check and audit row. Only that second call is held for the owner's yes when the forge's own agent makes it (ASKING.infrainconversation_confirm.ts, plus a sentence inconversation_ask.ts).src/tui/screens/cloudcost.ts) shows the account lines and the costliest resources. It is read-only and admin-only.docs/features/cloud-end.mdhas the MCP and terminal lines, andsrc/generated/screens.tsis regenerated.test/mcp-cloud-cost.test.tsruns against the stand-in vendor and covers all of this.costshows the budget and the costliest resource.endwithout a digest is a plan with no vendor call.needs_confirmwith no vendor call.says, and a non-admin gets none.test/palette-roster.test.tslists the new entry.Not done
x/X), which already did.test/delete-tier.test.tsis not affected. Theinfradescription is unchanged, so the tool is not markedtier: "delete". The held-until-confirmed behaviour is what the issue asked for.bun scripts/gate.tsstill prints a note thatcloudCostScreenlooks 0.93 likeweekScreen. I kept the screen as is, because it follows the same pattern as the other read-only screens (footingScreen).Reused:
planEnd,performEnd,costliestOf,standingWords, and theheldNotWhenandASKINGconfirm path.To try
infrawith{action: "cost"}.infrawith{action: "end", id: <id from cost>, want: {act: "stop"}}for the plan.Closes #18103