Skip to content

Commit dc3b6e4

Browse files
Merge pull request #107 from codefly-dev/dependabot/github_actions/github-actions-8236830756
fix(runtime): adopt Core 0.19.10 native ownership
2 parents 5bf6627 + 246a3e0 commit dc3b6e4

7 files changed

Lines changed: 425 additions & 63 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ concurrency:
1212

1313
jobs:
1414
ci:
15-
uses: codefly-dev/core/.github/workflows/go-service-ci.yml@v0.19.6
15+
uses: codefly-dev/core/.github/workflows/go-service-ci.yml@v0.19.10
1616
with:
1717
# The Python runtime tests drive `uv` on the host (dependency sync,
1818
# pytest); it isn't on the runner by default.
@@ -35,8 +35,8 @@ jobs:
3535
race:
3636
runs-on: ubuntu-latest
3737
steps:
38-
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
39-
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
38+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
39+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
4040
with:
4141
go-version-file: go.mod
4242
# Same reason as the shared workflow: setup-go's cache tar corrupts
@@ -58,8 +58,8 @@ jobs:
5858
nix:
5959
runs-on: ubuntu-latest
6060
steps:
61-
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
62-
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
61+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
62+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
6363
with:
6464
go-version-file: go.mod
6565
# Same reason as the race job above.

‎.github/workflows/releaser.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
test:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
13-
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
12+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
13+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
1414
with:
1515
go-version-file: go.mod
1616
# go.mod pins a `toolchain` newer than the `go` line, so setup-go
@@ -29,7 +29,7 @@ jobs:
2929
needs: test
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
32+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3333
with:
3434
fetch-depth: 0
3535
# ARCHITECTURE: the shared core release workflow runs goreleaser-action
@@ -45,7 +45,7 @@ jobs:
4545
# first goreleaser-cross tag whose Go equals go.mod's `go` line.
4646
- name: Install Syft for archive SBOMs
4747
id: syft
48-
uses: anchore/sbom-action/download-syft@3ad7283483fc7af8ff2b4ea19663c2d5ca935e26 # v0.24.2
48+
uses: anchore/sbom-action/download-syft@66cbf4bc1f1c0d2edc94016e65bc221b6bb0ad6c # v0.24.3
4949
with:
5050
syft-version: v1.44.0
5151
- name: Run CGO-capable GoReleaser

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ within reach.
6767
## Build and test
6868

6969
Derived from `.github/workflows/ci.yml`, which delegates to core's shared
70-
`go-service-ci.yml`, pinned to the linked core's tag (`@v0.19.6`; move it with
70+
`go-service-ci.yml`, pinned to the linked core's tag (`@v0.19.10`; move it with
7171
the core bump), and adds a `race` job of its own. Go comes from `go.mod`
7272
(1.27.3). All of it runs locally:
7373

@@ -197,4 +197,4 @@ carried here:
197197
each skill's frontmatter are asserted in `conformance_test.go`, so `go test
198198
./...` enforces them with no workflow change.
199199
- There is no `CLAUDE.md`; if one is added, it is a one-line `@AGENTS.md` pointer.
200-
- Treat this file as code: the PR that changes a process updates it.
200+
- Treat this file as code; native ownership qualification: [procedure](docs/native-qualification.md).

‎docs/native-qualification.md‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Native FastAPI ownership qualification
2+
3+
FastAPI owns its uvicorn lifecycle; generic `service-python` supplies shared
4+
Python tooling and retains its own no-op Runtime. Native FastAPI launches use
5+
Core's `NewNativeEnvironment` and `NativeProc`, which owns authenticated process
6+
group registration, birth checks and termination. Core v0.19.10 is the published
7+
dependency; explicit orphan recovery remains Core's protocol consumed by CLI.
8+
No registry, process matcher or recovery implementation belongs in this agent.
9+
10+
Use the maintained `codefly agent deps --pin v0.19.10` operation to adopt the
11+
published module, and `codefly agent build --native-only` to package/install the
12+
agent and adjacent SBOM. Keep the manifest version unchanged for local builds.
13+
Use a disposable OS `HOME` and `CODEFLY_HOME` for those commands; do not use an
14+
incident or shared agent home. The installed binary is local qualification,
15+
not evidence that a version bearing the same label was published or adopted.
16+
17+
The opt-in gate consumes that installed binary and an existing CLI with
18+
`recover process-group --preview/--expect`:
19+
20+
```sh
21+
FASTAPI_NATIVE_AGENT_HOME=/absolute/disposable/codefly-home \
22+
FASTAPI_QUALIFICATION_CLI=/absolute/qualified/codefly \
23+
GOWORK=off go test -count=1 -v -run '^TestNativeAgentOwnershipLifecycle$' .
24+
```
25+
26+
The test creates a separate temporary OS home for registry authentication and
27+
two disposable services. Core's authenticated manager starts each actual agent;
28+
gRPC Load/Init/Start run real uvicorn workloads. Core resolves temporary network
29+
mappings. Each workload reports its own PID and process group; Core authenticates
30+
that group and its exact process birth. Ordinary Stop must remove the first
31+
group and registration while the independent sibling birth and live owner stay
32+
intact. FastAPI Stop releases its environment, so restart uses Init then Start.
33+
At manager load the test captures the authenticated agent-group leader identity.
34+
After restart it requires the current full owner identity to equal that original
35+
birth before Core's identity-bound signal kills only the disposable agent owner.
36+
A stale-birth negative must be refused by that guard, with both original owners
37+
and uvicorn workload births still alive, before the valid owner-death case.
38+
The existing CLI previews that exact authenticated-v2 orphan, then consumes its
39+
unchanged receipt to recover it. The sibling must still retain its exact birth
40+
and live owner, and its ordinary Stop must also remove its registration.
41+
42+
Record source revision/dirty state, module origin and sum, binary and SBOM hashes,
43+
CLI identity, actual test output, and any skipped checks. The test does not prove
44+
Linux operation, sandbox/principal policy, Docker, Nix, full CLI composition,
45+
Wiki `model/model` adoption, or publication. Default tests skip this opt-in gate;
46+
a default green run alone does not qualify an installed agent. Run container and
47+
image-scanning checks only with the fleet's allocated Docker slot.

‎go.mod‎

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/codefly-dev/service-python-fastapi
33
go 1.27.3
44

55
require (
6-
github.com/codefly-dev/core v0.19.7-0.20261025070021-a3bf508a5e55
6+
github.com/codefly-dev/core v0.19.10
77
github.com/codefly-dev/service-python v0.0.66
88
github.com/pelletier/go-toml/v2 v2.4.3
99
github.com/stretchr/testify v1.12.1
@@ -19,8 +19,8 @@ require (
1919
dario.cat/mergo v1.0.2 // indirect
2020
github.com/Masterminds/semver v1.5.0 // indirect
2121
github.com/Masterminds/semver/v3 v3.5.0 // indirect
22-
github.com/Microsoft/go-winio v0.6.2 // indirect
23-
github.com/ProtonMail/go-crypto v1.4.1 // indirect
22+
github.com/Microsoft/go-winio v0.6.3-0.20251027160822-ad3df93bed29 // indirect
23+
github.com/ProtonMail/go-crypto v1.5.2 // indirect
2424
github.com/VividCortex/ewma v1.2.0 // indirect
2525
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
2626
github.com/blang/semver v3.5.1+incompatible // indirect
@@ -32,6 +32,7 @@ require (
3232
github.com/codefly-dev/gortk v0.2.0 // indirect
3333
github.com/containerd/errdefs v1.0.0 // indirect
3434
github.com/containerd/errdefs/pkg v0.3.0 // indirect
35+
github.com/containerd/log v0.2.0 // indirect
3536
github.com/cyphar/filepath-securejoin v0.7.0 // indirect
3637
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3738
github.com/dekobon/tree-sitter-groovy v0.3.0 // indirect
@@ -56,7 +57,7 @@ require (
5657
github.com/go-openapi/jsonreference v1.0.2 // indirect
5758
github.com/go-openapi/loads v0.25.3 // indirect
5859
github.com/go-openapi/spec v1.0.1 // indirect
59-
github.com/go-openapi/strfmt v0.27.2 // indirect
60+
github.com/go-openapi/strfmt v0.27.3 // indirect
6061
github.com/go-openapi/swag v0.29.2 // indirect
6162
github.com/go-openapi/swag/cmdutils v0.29.2 // indirect
6263
github.com/go-openapi/swag/conv v0.29.2 // indirect
@@ -85,10 +86,11 @@ require (
8586
github.com/mattn/go-isatty v0.0.24 // indirect
8687
github.com/mattn/go-pointer v0.0.1 // indirect
8788
github.com/mattn/go-runewidth v0.0.28 // indirect
88-
github.com/mitchellh/mapstructure v1.5.0 // indirect
8989
github.com/moby/docker-image-spec v1.3.1 // indirect
9090
github.com/moby/patternmatcher v0.6.1 // indirect
91+
github.com/moby/sys/sequential v0.7.0 // indirect
9192
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
93+
github.com/morikuni/aec v1.1.0 // indirect
9294
github.com/oklog/ulid/v2 v2.1.2 // indirect
9395
github.com/opencontainers/go-digest v1.0.0 // indirect
9496
github.com/opencontainers/image-spec v1.1.1 // indirect
@@ -119,22 +121,23 @@ require (
119121
github.com/yusufpapurcu/wmi v1.2.4 // indirect
120122
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
121123
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.72.0 // indirect
122-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.71.0 // indirect
124+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0 // indirect
123125
go.opentelemetry.io/otel v1.47.0 // indirect
126+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0 // indirect
124127
go.opentelemetry.io/otel/log v1.47.0 // indirect
125128
go.opentelemetry.io/otel/metric v1.47.0 // indirect
126129
go.opentelemetry.io/otel/trace v1.47.0 // indirect
127130
go.yaml.in/yaml/v2 v2.4.4 // indirect
128131
go.yaml.in/yaml/v3 v3.0.5 // indirect
129-
golang.org/x/crypto v0.57.0 // indirect
130-
golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba // indirect
131-
golang.org/x/mod v0.41.0 // indirect
132-
golang.org/x/net v0.60.0 // indirect
132+
golang.org/x/crypto v0.58.0 // indirect
133+
golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e // indirect
134+
golang.org/x/mod v0.42.0 // indirect
135+
golang.org/x/net v0.61.0 // indirect
133136
golang.org/x/sys v0.49.0 // indirect
134-
golang.org/x/term v0.46.0 // indirect
135-
golang.org/x/text v0.42.0 // indirect
136-
google.golang.org/genproto/googleapis/api v0.0.0-20260928230214-8a89bd6388cc // indirect
137-
google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc // indirect
137+
golang.org/x/term v0.47.0 // indirect
138+
golang.org/x/text v0.43.0 // indirect
139+
google.golang.org/genproto/googleapis/api v0.0.0-20261012220534-4341edf3f941 // indirect
140+
google.golang.org/genproto/googleapis/rpc v0.0.0-20261005182115-fad411399dd8 // indirect
138141
google.golang.org/protobuf v1.36.12 // indirect
139142
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
140143
gopkg.in/warnings.v0 v0.1.2 // indirect

0 commit comments

Comments
 (0)