Repository navigation
Commit 7c59ddf
refactor: own deployment contracts and configuration rendering in CLI (#766)
* fix: adopt core v0.3.42's coordinate contract
Core replaced the cell-contract wrapper with codefly/coordinate/v1: the
schema string changed, the `cell` field is gone, and the parser keeps
KnownFields(true), so the superseded cell/v1 and cell/v2 descriptors now
fail at parse rather than importing a wrong shape.
`--cell-contract` stays as the former spelling for one release. Passing
both spellings is refused rather than resolved to one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: deep-copy the environment service config and repin the matrix
Core v0.3.42 adds Environment.ServiceConfig, the home for a coordinate's
resolved non-secret values. cloneEnvironment enumerates the fields it
copies, so a new pointer field is shared until it is named: concurrent
flows would hand each other the same map and one flow's override would
surface in another.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: keep an absent coordinate from stamping a dangling provenance label
The coordinate is an optional provenance label in core's contract, and the
cell identifier that used to sit beside it in these two messages is gone,
so a producer that omits it left "imported from coordinate contract on
<time>" in the user's workspace.codefly.yaml.
cloneEnvironment guarded the services map on length rather than nil, so an
explicitly empty map stayed a shared header and the first flow to add a
service would contaminate the other.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs: state what core v0.3.42 changed, not what a review concluded
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: copy every empty environment map and check the whole type graph
cloneEnvironment guarded its maps on length, so an explicitly empty map
stayed a shared header between flows. This is reachable from an ordinary
workspace: "managed-services: {}" decodes to a non-nil empty map, and the
first flow to add an entry contaminates the other. ManagedServices,
ServiceSecrets.Services and the per-service RemoteKeys all had it.
The canary that exists to catch exactly this only enumerated top-level
Environment fields, so marking a field deep-copied stopped any inspection
of what it contained -- EnvironmentServiceConfigMapping was never examined
at all. It now walks the type graph and names each path, so a field added
to a nested contract type fails it too.
The two remaining length guards are slices, not maps. A zero-length slice
can only alias through append when it carries spare capacity; yaml decodes
an empty sequence at cap 0 and the sole allocation here takes an exact
length, so neither is reachable.
contractFlag now reports which spelling it read, so an empty
--cell-contract no longer reports --coordinate-contract as required.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* chore: pin the released core v0.3.42 tag
Core's version-tag workflow cut v0.3.42 from version/info.codefly.yaml at
34ad95991f33, the commit this branch was built and tested against as a
pseudo-version. The extracted modules are byte-identical and the go.sum
go.mod hash is unchanged, so this relabels the dependency rather than
moving it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs: finish renaming the contract in prose
Three descriptions still called it a cell contract after the type, flag and
command help moved to codefly/coordinate/v1, leaving the rename visibly
half-applied in the command list and the publish guidance.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: fail environment import when readiness validation refuses the workspace
PostImportValidate had no error return, so `codefly environment import`
printed "Workspace is NOT ready" and still exited 0 — a CI step gating on
the exit status proceeded on a workspace the CLI had just refused.
Give the seam an error return and propagate it. The merged file is still
written before validation runs, so the printed diagnostics can be read
against it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* refactor: own deployment contracts and configuration rendering in CLI
* fix(gitops): validate secret delivery and bind declared service identities
The renderer trusted container names, unscoped ServiceAccounts and unchanged secretKeyRefs even when an overlay redirected the ExternalSecret. Bind through CODEFLY__SERVICE, validate namespace-scoped identity and the complete effective secret delivery specification, and pin Core's lossless YAML repair.
Add regressions for scalar spellings, agent-owned container names, secret redirects, identity namespaces and preserving published output on rejection. Remove unrelated DNS-label and zero-port policies; retain the narrowing checks required by the moved code's G115 gate.
* fix(ci): qualify runnable lifecycle with a protocol-advertising agent
The prior source pin returns a nil AgentContract and is correctly rejected before Builder.Load. Consume the owner fix from runnable-python#11, tested through the real create/build/relocate/invoke lifecycle, without weakening host admission or changing required checks.
---------
Co-authored-by: Antoine Toussaint <312536060+antoinetoussaint-byte@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent c4817dd commit 7c59ddf
108 files changed
Lines changed: 5545 additions & 755 deletions
File tree
- .github/workflows
- cmd
- build
- ci
- common
- composition
- deploy
- environment
- expose
- provider
- run
- test
- docs
- pkg
- composition
- conformance
- control
- deployments
- engine
- environments
- testdata
- coordinates
- gitops
- orchestration
- platform
- remotenetwork
- routing
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | | - | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | | - | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | | - | |
10 | | - | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | | - | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | | - | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments