Repository navigation
Commit 4cd9cb6
feat(resource): data-plane resource layer — Provisioner family + resources: block (spec 27) (#87)
* feat(resource): Stage A substrate — Provisioner family + crypto/rand cred + RemoveProvisioned (spec 27)
Behavior-preserving generalization of Postgres provisioning:
- internal/resource: Resource model, Provisioner interface + Registry, Postgres
provisioner wrapping provision.EnsureProject verbatim (same guarded/idempotent
SQL, predictable dev-cred), plus engine->kinds catalog.
- internal/secrets: RandomPassword(n) via crypto/rand for the 'generated' policy.
- internal/state: RemoveProvisioned(project,kind,name) single-resource teardown.
The up-saga provision phase is untouched; all orchestrate tests still pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(resource): Stage B config resources: block + up-saga resources phase (spec 27)
- internal/config: additive ResourceDecl on Project, cross-ref validated (uses
targets a declared shared instance, kind supported by the engine, no
(engine,kind,name) collision); forward-tolerant to unknown keys.
- internal/orchestrate: new 'resources' saga phase provisions every declared
resource via the engine Provisioner under the flock, records ledger + event,
and REPORTS drift without auto-dropping. Wired into BuildUp after the implicit
postgres provision phase; gated on --no-provision. Provision phase untouched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(resource): Stage B step 6 — resource list|show|create|rm|gc + workspace destroy --purge-data (spec 27)
- internal/orchestrate: imperative CreateResource/DropResource/GCResources ops
(lock -> overlay -> provisioner -> ledger -> event), mirroring the saga phase.
- internal/cli: engine-agnostic 'resource' command group (list/show are lock-free
reads; create/rm/gc drive the ops; secrets masked unless --show-secrets), and a
new destructive 'workspace destroy --purge-data' flag beside the data-preserving
default. Registered under root.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 7bdc714 commit 4cd9cb6
20 files changed
Lines changed: 2197 additions & 13 deletions
File tree
- internal
- cli
- config
- orchestrate
- resource
- secrets
- state
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
66 | 71 | | |
67 | 72 | | |
68 | | - | |
69 | | - | |
| 73 | + | |
| 74 | + | |
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
76 | | - | |
| 81 | + | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| |||
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
89 | 97 | | |
90 | 98 | | |
91 | 99 | | |
92 | | - | |
93 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
94 | 106 | | |
95 | 107 | | |
96 | 108 | | |
| |||
99 | 111 | | |
100 | 112 | | |
101 | 113 | | |
| 114 | + | |
102 | 115 | | |
103 | 116 | | |
104 | 117 | | |
105 | 118 | | |
106 | 119 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
111 | 125 | | |
112 | 126 | | |
113 | 127 | | |
114 | 128 | | |
115 | 129 | | |
116 | 130 | | |
117 | | - | |
| 131 | + | |
118 | 132 | | |
119 | 133 | | |
120 | 134 | | |
121 | 135 | | |
122 | 136 | | |
123 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
124 | 171 | | |
125 | 172 | | |
126 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
0 commit comments