Commit 8b652eb
* feat(workflow): add Values type, LoadValues, and MergeInputs helpers
Implements Task 1-3 for issue #53 (environment variables and promotion).
Adds values file parsing with unknown-key validation and env key
normalization, plus a three-layer MergeInputs helper (defaults <
values file < inline flags).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(workflow): use valid input types in MergeInputs test fixtures
* feat: add valuesEnv layer to CEL evaluator for values-file env overrides
Inserts a values-file precedence layer between config env and MANTLE_ENV_*
OS variables (config < values < MANTLE_ENV_*), exposed via SetValuesEnv.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: wire --values flag into CLI run and plan commands
Add --values <file> flag to both `mantle run` and `mantle plan`.
The run command merges values file inputs (lower priority than --input
flags) and applies env overrides via CEL.SetValuesEnv. The plan command
validates the values file early for fast failure feedback.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add environments table migration and EnvironmentStore CRUD
Adds migration 018 creating the environments table with team-scoped
unique name constraint, and implements Store with Create/Get/List/Delete
backed by testcontainers integration tests (all 5 passing).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add env subcommands and wire --env flag into run/plan commands
Implements `mantle env` (create/list/show/delete) backed by the
environment.Store, and adds --env to `mantle run` (4-source input merge:
named env < values file < --input flags) and `mantle plan` (existence
validation only).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: wire MergeInputs 4-layer support, add env name validation, clarify plan help text
- Extend MergeInputs to 4 layers (defaults < env < values < inline) and update
all call sites in values_test.go; add TestMergeInputs_FourLayerPrecedence
- Refactor run.go to use workflow.MergeInputs instead of manual merge loops
- Add environment name validation (^[a-z][a-z0-9-]*$) in Store.Create with test
- Clarify plan --values and --env flag descriptions to note they do not affect diff
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: address code review feedback
- Sort map keys in `env show` output for deterministic display
- Move values file loading before DB open in run.go (fail-fast)
- Detect env key collisions during uppercase normalization in values.go
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test: rename TestMergeInputs_FullPrecedence to ThreeLayerPrecedence
The test passes nil for envInputs, exercising only 3 of the 4 merge
layers. Rename to accurately reflect actual coverage; the full 4-layer
test already exists as TestMergeInputs_FourLayerPrecedence.
https://claude.ai/code/session_01ScMbDdk1f4m7HGyjfTrmv1
* docs: add docstrings to env CLI command builder functions
Resolves CodeRabbit docstring coverage warning on PR #127. All six
functions in cli/env.go now have Go doc comments, bringing coverage
from ~17% to 100% for that file.
https://claude.ai/code/session_01E2yrXXhJW7Jt7ZPt7JYMWF
* fix: address coderabbitai review feedback on PR #127
- Add UTC indicator to env list timestamp output
- Add missing godoc comments to credentials, health, db, and metrics packages
https://claude.ai/code/session_01KiE3FJpfF6XE2y3Tyth2r3
* fix: address coderabbitai review feedback on PR #127
- Add cobra.NoArgs to env list command to reject accidental extra args
- Add package doc comments to health, db, metrics, and cli packages
https://claude.ai/code/session_01Kt2cz2tqC28r9b6bM1c7LE
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 821a97c commit 8b652eb
17 files changed
Lines changed: 1248 additions & 25 deletions
File tree
- packages/engine/internal
- api/health
- cel
- cli
- db
- migrations
- environment
- metrics
- workflow
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| 324 | + | |
324 | 325 | | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| 329 | + | |
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
| |||
340 | 342 | | |
341 | 343 | | |
342 | 344 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
| 345 | + | |
347 | 346 | | |
348 | 347 | | |
349 | 348 | | |
| |||
355 | 354 | | |
356 | 355 | | |
357 | 356 | | |
| 357 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | | - | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
229 | 230 | | |
230 | 231 | | |
231 | 232 | | |
232 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
233 | 242 | | |
234 | 243 | | |
235 | 244 | | |
236 | 245 | | |
237 | | - | |
238 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
239 | 249 | | |
240 | 250 | | |
241 | | - | |
| 251 | + | |
242 | 252 | | |
243 | 253 | | |
244 | | - | |
| 254 | + | |
245 | 255 | | |
246 | 256 | | |
247 | 257 | | |
248 | 258 | | |
249 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
250 | 265 | | |
251 | 266 | | |
252 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
| |||
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| 51 | + | |
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
| |||
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
| 64 | + | |
| 65 | + | |
57 | 66 | | |
58 | 67 | | |
59 | 68 | | |
| |||
0 commit comments