Public: anyone can read this; the crew can change it.
Clouds, step 1: `cloud.json` declares which vendor uses an app or repository may make, nothing by default, and docs/CLOUD.md states the rule #1750
Check · Review · Land · Live done — Landed and live in production.
`cloud.json` now declares which vendor uses a repository may make, and nothing is allowed by default. `bun x tsc --noEmit`, the new test file, the existing `test/cloud.test.ts` and `test/check-list.test.ts` pass here. I did not run the rest of the check.
shipped production is serving it deploy e209d31
Approved. Nothing here reaches a person, a phone or a keyboard, so there is no experience to break. It is a closed-set parser, a default-deny gate and a rule document, and it matches the issue. Unknown vendors and uses are refused, as are multi-line or oversized why, and the refusal is one sentence. The new test is in the gate list.
Two things I would do next:
- Wire
parseCloudto a real reader.parseCloudandmayUsehave no production caller yet. That is acceptable for a step 1 whose doc says later steps call them, but the next step should readcloud.jsonwhereparseCheckreadsforge.jsonand show the declared uses on the app page in plain words. It needs asrc/tty.tsview too, so both doors show it. - Pin the edge cases in the tests. Add cases for duplicate entries, a
whyof exactly 300 characters (accepted) and 301 (refused), and 33 entries. Also assert thatwhyis trimmed on output. The 32-entry and 300-character limits are untested.
cloud.jsonnow declares which vendor uses a repository may make, and nothing is allowed by default.bun x tsc --noEmit, the new test file, the existingtest/cloud.test.tsandtest/check-list.test.tspass here. I did not run the rest of the check.parseCloud(cloudJson)insrc/apps/manifest.tsreads{"uses":[{vendor,use,why}]}. No file gives an empty list. A bad file is refused with one sentence startingcloud.json:.cloudflare,fly,hetznerands3. Uses arecompute,storage,backup,dnsandcdn. The issue didn't list them, so I picked them; widen them as later steps need.whymust be one line of 1–300 characters, and a file may declare at most 32 uses.mayUse(declared, vendor, use)insrc/apps/cloud.tsis true only for an exact declared match. With no declarations, orundefined, it is always false.mayUsesignature: it takes the parsed declarations, not a repo object. Whoever readscloud.jsonfrom the repo's tree has to pass the result in. I did not wire any caller, since no vendor call exists yet.docs/CLOUD.mdstates the three-part rule and the file format.test/cloud-use.test.tscovers no file, a declared use, an undeclared use and malformed files. I named it inGATEinscripts/gate.ts.test/cloud.test.tsalready existed (it tests cloud accounts), so the new tests got their own file.Left out: reading
cloud.jsonfrom a commit's tree and enforcingmayUseon real vendor calls, which are later steps. The "way back" for each use is stated as a rule in the docs but not checked in the file.Closes #1684