ReviewOS

also looking at this

stacks/ts-cloud

feat(consolidation): report an attach's credential radius, and rename a server in place

#175
Merged glennmichael123 wants to merge feat/consolidation-credential-reach-and-rename into main
12 files +1138 -14
docs/config.mdmodified+26-3
Changes to docs/config.md
@@ -149,9 +149,32 @@ own provider project cannot be attached at all, because its token cannot see the
149149owner's box. Co-hosting trades credential isolation for a shared box; that trade
150150is often worth making, but it should be a decision rather than a surprise.
151151
152`describeCredentialReach()` and `formatCredentialReach()` report what a given
153token actually reaches, separating the owner's boxes from the ones no one asked
154for, so the radius can be shown before an attach is approved.
152Every attach deploy states this radius before it acts on it, splitting the
153owner's boxes from the ones nobody asked for:
154
155```
156Attaching to 'statushq' shares one provider project, so this deploy's credential
157can write to all 4 server(s) it can see.
1583 of them belong to neither project:
159 bughq: bughq-production-app
160 stacks: stacks-production-app
161 not managed by ts-cloud: some-legacy-box
162A compromised CI run or a mistargeted teardown in this project now reaches those.
163Keep the app in its own provider project instead if that is not acceptable, which
164rules out attaching.
165```
166
167It is reported, never enforced the trade is frequently worth making, and a
168deploy that started failing on upgrade would teach operators to silence it
169rather than read it. When the reach is exactly the two projects being joined it
170is one quiet line, because a warning that fires every time is a warning nobody
171reads.
172
173The radius comes from the driver (`CloudDriver.listReachableResources()`), not
174from a global assumption about tokens: a provider whose credential can be
175scoped per-resource simply enumerates less, and the same report comes out
176correct without a special case. `describeCredentialReach()` and
177`formatCredentialReach()` are exported for building your own plan output.
155178
156179### It cannot install services on the owner's box
157180