Public: anyone can read this; the crew can change it.

Clouds as capacity, never as dependency: Cloudflare, Vercel and GitHub attached through Cloud accounts, used in the vendor's own flavor, declared and auditable, and the forge whole without any of them #1448

Closed opened this in answer to
Closed without merging

This pull adds no new code. The branch already had the cloud work from the earlier pull, and this push only merges current main into it. I can't tell whether that merge fixes the earlier check failure, because I never reproduced it.

Notes

stopped closed without shipping deploy dd34357

opened this

This pull adds no new code. The branch already had the cloud work from the earlier pull, and this push only merges current main into it. I can't tell whether that merge fixes the earlier check failure, because I never reproduced it.

  • The failure: the test that failed last time is "a proposal names only what is actually ahead: work the parent already has is not listed again", in test/following.test.ts. I ran that file after merging main (60 commits ahead) and all 20 tests pass. The cloud code doesn't touch the following code, so my guess is main has moved on since then.
  • Not run: I did not run the TypeScript type check or the full gate. Locally bunx tsc errors with "Cannot find type definition file for 'bun'", which looks like a sandbox problem rather than a code one. The forge's check will run both on this push.

What the branch delivers (from the earlier commits, for review):

  • Providers and audit: cloud.json declares which of Cloudflare, Vercel and GitHub a repository or app may use. Nothing is allowed by default, and an undeclared use is refused. Every vendor call is audited.
  • Settings and plans: The Cloud accounts page has a "bring it home" plan per account. The plan is also available in the terminal.
  • Cloudflare KV: Declared files are published to KV on push. The unused Vercel and GitHub clients were cut.
  • Docs: docs/CLOUD.md.

What the branch leaves out:

  • GitHub Actions gate shards, with the generated GitHub twin of .forgejo/workflows.
  • Vercel Sandboxes as burst capacity for check cells.
  • Token rotation from the page.

The issue lists all three, so the issue is only partly done. They are good candidates for separate smaller issues.

To try it: run FORGE_TEST_SOCKET=port bun test test/cloud* (20 tests pass).

🤖 Generated with Claude Code

Closes #1146

Show 4 earlier items

7 earlier comments
commented

I merged origin/main into the branch and pushed it. The only conflict was in README.md. Both sides had added a section there, so I kept both: the Cloudflare publish text from this branch and main's "Share to the forge" section. No code files conflicted.

Tests: bun x tsc --noEmit printed nothing. The full bun test run reported 8 failures across 3353 tests, and I didn't capture which tests failed. I did not investigate the 8, so I can't say whether they come from the merge. The cloud tests pass (30 pass, 2 skipped), and the forge's own check on this push will show the rest.

I'm not changing the cloud feature itself in this update. Its description is unchanged:

  • A Cloudflare account can publish a file from a repository's default branch into one Workers KV namespace, declared in that repository's cloud.json.
  • The admin lists which public repositories may use the account and its one target, from the page, forge cloud use, or POST /api/v1/admin/cloud/:provider/:name/use. Every call is audited.
  • Publishes run one at a time per repository, and a commit that is no longer the default branch's tip is skipped.
  • "Bring it home" gives the plan to stop.
  • Docs are in docs/CLOUD.md; try it from the admin cloud page.
commented

The check failed because test/cloud-vendors.test.ts wasn't listed in scripts/gate.ts. I added it to GATE, next to test/cloud.test.ts, and pushed.

I ran test/cloud-vendors.test.ts and tsc --noEmit locally. All 16 tests pass and the type check reports nothing. I didn't run scripts/test-shards.ts, so the gate bookkeeping that failed is untested here. The forge's re-run will show whether it passes.

No other files changed.

🤖 Generated with Claude Code

commented

Parked by the crew: this issue started its day's share of runs without landing, so nothing more starts here until a person says what to try.

commented

scout only (reviewers: review the head as usual): one more round, from the owner. Sentinel's last review names one concrete gap; fix exactly that on this branch and push, and say in one line what you changed. If you think the review is wrong, say why in one line instead.

commented

Sentinel's last review said the limit = 500 cap made the Bring it home numbers stop growing at 500 uses. That was already fixed on this branch in 25506a81. The plan now counts in SQL with totalsSince, so there is no row cap.

What was missing was a test that would catch the cap coming back. I added one that records 600 uses and checks the plan counts all of them (test/cloud-vendors.test.ts). bun test test/cloud passes (28 tests), and I did not run the type check or the full gate.

I changed no source code, and the other review comments were already handled in earlier commits.

Try it with FORGE_TEST_SOCKET=port bun test test/cloud.

🤖 Generated with Claude Code

commented

I fixed the failing check by merging origin/main into the branch and pushing; the new check run hasn't reported yet. The check failed because test/crew-sandbox-real.test.ts was in neither GATE nor EXCLUDED in scripts/gate.ts. Main had already fixed that in commit 08f24838 (released as 0.7.104), which lists it in EXCLUDED. I made no code changes of my own.

Locally, after the merge, tsc --noEmit is clean and test/cloud-vendors.test.ts passes (17 tests). I did not run the whole suite.

This pull is still the clouds-as-capacity change from issue 1146. It also includes the cloud-vendors test now listed in the gate and the test that the "Bring it home" plan counts past 500 uses.

commented

I fixed the two asks-bulk test failures and pushed; the forge's check on that push hasn't reported yet. test/asks-bulk.test.ts now passes (21 tests) and tsc --noEmit is clean.

Both tests were stale. They failed the same way on origin/main, so my changes didn't cause them. I changed the tests, not the code:

  • Card request test: it asserted id="asks-link", the Asks button that main removed in 0.7.104. I deleted that assertion.
  • Muted repository test: it asserted the card does not contain "muted". The undo bar carries a muted small CSS class, so that check broke once an earlier test had closed some asks. It now asserts that "repository muted" is absent, which is what the test means.

The forge's check log also showed shards 2 and 4 exiting 143 without naming a test. I didn't investigate those and don't know if they will recur.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs