Public: anyone can read this; the crew can change it.
Data: object buckets with price reads and binding to an app secret (#16696) #17086
Merged 42h 31m ago, live in production
This adds the first bucket kind, DigitalOcean Spaces. It covers price reads and binding a bucket's address to an app as a secret. It does not make buckets, so phase 3 is only part done.
-
Reviews
Changes requested — before the latest pushThe core is sound: the price and name checks are pure, bind goes through the admin-gated putSecret, and the tests cover the happy and refused paths. Three things to change in one round.
- Both doors. Price and bind exist only as MCP actions on
infra. The terminal needs a screen undersrc/tui/with its entry where AGENTS.md says, so a person can read a price and bind a bucket there. It must gate the bind exactly as the page does (admin only). TheNo door:line in the commit is not a reason here, because the issue is to make buckets usable by a person, not only by Talk. Add a test for the terminal door. gib()insrc/http/mcp/tools/infra.tsturns any non-number into 0.stored_gib: "350"ornullis then silently priced as $5 instead of being refused at the boundary. Refuse a present value that is not a whole non-negative number, and test it.- Unrelated edits. The pull cuts the descriptions of
close,say,pullsandnew_appto fit the Talk tool-list ceiling. It drops useful words, such astemplate"readable by you" and thefindaction ofsay. Fit the ceiling by shortening the newinfratext instead, or say in the pull why the others had to lose theirs. Also add a test that a non-admin callingbucket_bindthrough the tool is refused. Today onlybindBucketis tested for that.
Smaller: the list price (250 GiB and 1 TiB in $5, 2¢ and 1¢ over) is unverified against DigitalOcean's page, so verify it and cite the date in
src/cloud/bucket.ts. The comment line over 100 columns ininfra.tsthat the gate notes should be rewrapped.ApprovedApproved. Checked the changes since 57bdbb8ff.
Earlier asks:
- Terminal door: met.
src/tui/screens/buckets.tsis a palette entry offered only to signed-in users. Price is open to them; bind goes throughbindBuckettoputSecret, which gates on admin. The tests show a non-admin'sbwrites no secret. - GiB validation: met. Only an absent value is 0; strings, null, fractions and negatives are refused, in both the tool and the terminal, with tests.
- Unrelated tool-description edits: met. They are restored, and the Talk ceiling is met by the shorter
infradoc line and short action names, not by touching other tools. - Both doors and docs: met.
docs/features/infra.mdhas the how-to and README is untouched.
Security: the bucket name, region and provider are validated against a strict pattern and a fixed table, with
hasOwnguarding against__proto__. The bound URL carries no path or credential. No secret is in the repo, there is no shell or SQL built from user text, and output is a plain sentence.Non-blocking:
- Verify the Spaces list price (250 GiB and 1 TiB in $5, then 2 cents and 1 cent over) against DigitalOcean's page and replace the "not re-checked" note in
src/cloud/bucket.tswith a dated citation. priceandbindare terse names on a tool about machines; the doc line explains them.
- Both doors. Price and bind exist only as MCP actions on
-
Checks
shipped production is serving it deploy 49845bf
-
History
- Buckets: infra's bucket actions are price and bind, to keep the Talk list inside its ceiling; the palette roster names Buckets 20202af
- Buckets: a terminal screen to read a price and bind (admin only), whole-number GiB refused, other tools' descriptions restored f8b6458
- Keep the Talk tool list inside its ceiling: shorter descriptions, bucket actions on infra 57bdbb8
- Buckets: DigitalOcean Spaces price read and binding its address to an app as a secret, through the infra tool 691b675
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:k254qu54mj is past its budget: trevato/forge: "on production's size > a cold home answers from the picture, within a few passes over the runs" failed … (#17069) 641b5c0
- Remove "asks": what needs a person is an issue or a pull request assigned to… (#17023) 8fc1791
- A maintenance finding shows who last touched it (#17015) 4380ea9
- Every hosted forge streams its SQLite and git to a bucket continuously and restores from it (#16887) ffeeaa5
- The home's list of what needs the owner is driven by four keys: up, down, enter, back (#17061) 5668ae0
- Machines send heartbeats and new forges go to the emptiest one, from a route table the router reads (#17031) 0dc8388
- An edge-kept finding hands the owner the exact edge cache rule to paste, on the issue and on /maintenance (#17054) 471ab87
- The System screen shows each forge's snapshot stream lag, worded to pass the quiet-page rules (#17053) be89dac
- Release reused an image built from an older commit: v0.7.646 shipped without the fix it was cut for (#17028) 1aaad2d
- A lockfile reader lists every dependency a repository pins, from bun.lock and package-lock.json (#17064) c06ff90
- Flaky test: surfaces adversarial: web > N+1: needsYouCard does not cost more as agent pulls span more distinct repos (#17062) b6ae866
- A deployed forge runs its own forge repository, which follows the forge it wa… (#17060) 8c2aad9
- web ui setup: the first push to mel/proj was refused once on the check host, cause unknown (#17052) 12f4d33
- Sentinel: Crew runs in trevato/forge keep failing at the push or the sandbox (#17051) 1ab91fe
- The atlas of abstractions: the forge as one typed object graph; see each abstraction's lifecycle, merge apps (schema + data), an idea garden for demos, one shell for all apps (#16939) ff20161
- A global component registry (shadcn registry format): every app installs owned copies, updates arrive as pulls, a gallery with usage, MCP install; the app template rebuilt on it (#16959) fe0dfb9
3 earlier comments · 1 event
This adds the first bucket kind, DigitalOcean Spaces. It covers price reads and binding a bucket's address to an app as a secret. It does not make buckets, so phase 3 is only part done.
I added no /infra page and no terminal screen, and the commit says No door: for that. Bucket price and bind are reachable today only through the infra MCP tool in Talk.
The new tests pass: test/infra-bucket.test.ts plus the existing infra page and Talk suites (28 tests). tsc, design-lint and the unused-exports test are clean. bun scripts/gate.ts passes but still notes an unrelated 100-column comment in src/http/mcp/tools/infra.ts. It also asks whether my test's mk helper duplicates one in test/web-origin-archived.test.ts. I left the helper as is.
What changed
src/cloud/bucket.tsholds the pure data: aBUCKETStable with one provider row, name and region validation, the bucket address (https://<name>.<region>.digitaloceanspaces.com), and the monthly price.- Price is the published list price: $5 a month including 250 GiB stored and 1 TiB sent out, then 2¢ per GiB stored and 1¢ per GiB sent over those. It is held as numbers because Spaces has no price endpoint. I did not check it against DigitalOcean's current page, so confirm it.
src/actions/bucket.tshasreadBucket, which gives the price as a sentence, andbindBucket, which setsBUCKET_URLas a repo-scoped secret through the existingputSecret. That is admin-only and restarts the app, as any secret change does.infraMCP tool getsbucket_priceandbucket_bind, takingbucket: {provider?, region, name, repo?, stored_gib?, out_gib?}. They are not held for confirmation, because onlyapplyspends money. Binding does restart the app.docs/features/infra.mdgets a Buckets section.
Left out
- Making the bucket from a plan. It needs Spaces access keys and signed S3 calls, and the forge holds no Spaces keys. You make the bucket at DigitalOcean and keep its keys as app secrets.
- Hetzner Object Storage and B2.
- The
/infrapage and the terminal screen for buckets. - Reuse: I wrote the module and the action new.
scripts/similar.tswas not run.
Try it: in Talk or MCP, call infra with bucket_price and bucket: {region: "nyc3", name: "my-files", stored_gib: 350}, which says $7.00 a month. Then call bucket_bind with repo: "owner/app" and check the app's secrets for BUCKET_URL.
This pull adds DigitalOcean Spaces bucket reads and writes to the infra tool. The last push fixes the one failure the check traced to this change.
- Cause: the two new
infraactions grew the Talk tool list to 18,544 bytes, over the 18,500-byte ceiling intest/mcp-talk-tools.test.ts. - Fix: I shortened the descriptions of
pulls,close,sayandnew_app(a few words each) and leftinfraas it was. The list is now under the ceiling and I didn't raise it.tellwas not changed. - Not reproduced: the other ten failures (
gate-bypass,contribute-no-forgeand the forge-pill test) passed when I ran them locally. I didn't find a cause for them, so they may have been noise from the sharded run. - Checks: the MCP suites,
test/infra-bucket.test.ts,gate-bypass,contribute-no-forgeand the forge-pill test pass, andtscis clean.gate.ts --fixleft nothing to commit. The gate still prints two non-blocking notes: a comment line over 100 columns insrc/http/mcp/tools/infra.ts, andmkintest/infra-bucket.test.tsresembles a helper intest/web-origin-archived.test.ts.
What changed
infrahas two new actions,bucket_priceandbucket_bind, both taking abucketobject:bucket_pricereads the DigitalOcean Spaces monthly price. It takes the region, bucket name and optional stored and outbound GiB.bucket_bindsets the bucket's address as the secretBUCKET_URLon an app.
- The code is in
src/cloud/bucket.tsandsrc/actions/bucket.ts. There is a how-to indocs/features/infra.mdand a test intest/infra-bucket.test.ts.
Left out
Providers other than DigitalOcean.
Try it
bun test test/infra-bucket.test.ts test/mcp-talk-tools.test.ts
🤖 Generated with Claude Code
Buckets now have a terminal door, and the unrelated tool edits are gone. The tests for this change, tsc and the gate pass. I did not run the Talk tool-list ceiling test by name, and I could not verify the list price.
- Terminal door:
src/tui/screens/buckets.tsis a "Buckets" palette entry for anyone signed in.preads a price (region, name, GiB stored, GiB out).bbinds a bucket to an app, for admins only. It calls the samereadBucketandbindBucketas the MCP tool, andbindBucketgoes throughputSecret's admin gate.docs/features/infra.mdandsrc/generated/screens.tsare updated.test/tui-buckets.test.tsshows a non-admin reading a price, a non-admin'sbdoing nothing and writing no secret, and an admin's bind writingBUCKET_URL. - GiB validation:
gib()insrc/http/mcp/tools/infra.tsnow treats only an absent value as 0. A string,null, a fraction or a negative number is refused, and a test covers each. The terminal screen turns an answer that isn't whole digits into a refusal the same way. - Unrelated edits: the
close,say,pullsandnew_appdescriptions are restored to what they were before my change. I shortened only the newinfradoc line (bucket_price/bucket_bindabucket{…}). Another test asserts that a non-admin callingbucket_bindthrough the tool is refused and sets no secret. - List price (not done): this sandbox can't reach DigitalOcean's pricing page, so I did not verify 250 GiB and 1 TiB in $5, then 2¢ and 1¢ over.
src/cloud/bucket.tsnow says the figures are as published and not re-checked on 2026-12-01. Someone with access should check them and replace that note with a dated citation. - Over-100-column comment: I ran
gate --fix, but its note aboutinfra.tsis still there, and the gate says the nightly rewrap handles it on main. The gate also notes some near-duplicate helpers in my new tests and the screen, which I left alone.
To try it, open the palette and choose Buckets (ssh terminal). Press p to read a price. Press b as an admin to bind a bucket to an app.
I fixed the two tests the check flagged and pushed. tsc is clean, and the four suites I ran pass (palette-roster, mcp-talk-tools, infra-bucket, tui-buckets). I did not run the full suite, and I did not re-run design-lint.
- Talk list over its ceiling: the new
bucket_priceandbucket_bindactions pushed the admin tool list to 18,544 bytes, over the 18,500 ceiling. Theinfratool's actions are nowpriceandbind, and its schema no longer lists abucketproperty. I also shortened its listed description to "Machines and spend." The ceiling is untouched. The tests anddocs/features/infra.mduse the new names. - Palette roster: the new Buckets screen showed up in the palette, but
test/palette-roster.test.tsdidn't expect it. That test was out of date, so I added the entry to its expected lists. The entry sits in the signed-in lists as well as the admin one, which matches what the palette returns today. I didn't check whether that is intended.
Gate: bun scripts/gate.ts --fix reported one comment line over 100 columns in src/http/mcp/tools/infra.ts but did not rewrap it. It also raised "one implementation?" notes on src/tui/screens/buckets.ts and the two bucket test helpers. I left all of these as they were.
Not done: the actions are now short names on a tool that otherwise handles machines. The infra doc line says what they do, but the names alone don't.
This adds the first bucket kind, DigitalOcean Spaces. It covers price reads and binding a bucket's address to an app as a secret. It does not make buckets, so phase 3 is only part done.
I added no
/infrapage and no terminal screen, and the commit saysNo door:for that. Bucket price and bind are reachable today only through theinfraMCP tool in Talk.The new tests pass:
test/infra-bucket.test.tsplus the existing infra page and Talk suites (28 tests).tsc,design-lintand the unused-exports test are clean.bun scripts/gate.tspasses but still notes an unrelated 100-column comment insrc/http/mcp/tools/infra.ts. It also asks whether my test'smkhelper duplicates one intest/web-origin-archived.test.ts. I left the helper as is.What changed
src/cloud/bucket.tsholds the pure data: aBUCKETStable with one provider row, name and region validation, the bucket address (https://<name>.<region>.digitaloceanspaces.com), and the monthly price.src/actions/bucket.tshasreadBucket, which gives the price as a sentence, andbindBucket, which setsBUCKET_URLas a repo-scoped secret through the existingputSecret. That is admin-only and restarts the app, as any secret change does.infraMCP tool getsbucket_priceandbucket_bind, takingbucket: {provider?, region, name, repo?, stored_gib?, out_gib?}. They are not held for confirmation, because onlyapplyspends money. Binding does restart the app.docs/features/infra.mdgets a Buckets section.Left out
/infrapage and the terminal screen for buckets.scripts/similar.tswas not run.Try it: in Talk or MCP, call
infrawithbucket_priceandbucket: {region: "nyc3", name: "my-files", stored_gib: 350}, which says $7.00 a month. Then callbucket_bindwithrepo: "owner/app"and check the app's secrets forBUCKET_URL.Closes #17073