Skip to content

Commit 207c50f

Browse files
fix: align harness with current Runnable contracts (#5)
* fix: align Python harness with merged Runnable contracts * chore: pin the verified core v0.3.29 release * docs: describe the native release contract
1 parent 7f010f6 commit 207c50f

10 files changed

Lines changed: 250 additions & 215 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The Codefly language agent for typed, finite Python operations: generate a handler, prepare its dependencies, and produce identified native packages and container build recipes.
44

5-
**Status: native authoring and packaging are implemented through the real Builder gRPC lifecycle using core #474's shared handoff. No agent version is released yet.** [Milestone 3](docs/milestone_3_builder_grpc.md) records this checkpoint; [issue #1](https://github.com/codefly-dev/runnable-python/issues/1) still tracks durable native and Kubernetes execution.
5+
**Status: native authoring and packaging are implemented through the real Builder gRPC lifecycle on core v0.3.29.** Agent 0.0.2 includes the shared invocation/result framing and signal-cancellation contract; published binaries appear on the [releases page](https://github.com/codefly-dev/runnable-python/releases). [Milestone 3](docs/milestone_3_builder_grpc.md) records the Builder checkpoint; [issue #1](https://github.com/codefly-dev/runnable-python/issues/1) still tracks durable native and Kubernetes execution.
66

77
The review corrections and current validation are recorded in [milestone 2](docs/milestone_2_review_fixes.md). Earlier image/k3d observations are historical and do not qualify the Codefly/Orchestration path.
88

‎docs/protocol.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This input decodes to `{"text":"one two three"}`. An invocation must match the
3939
release embedded by the Builder. Standalone generation, which has no owning
4040
workspace, checks the declaration's name and version. `invocation_id` and
4141
`intent_id` are required and at most 128 characters. `effect_id` is required for
42-
`receipt` recovery and absent for `recompute`.
42+
`receipt` recovery and optional for `recompute`.
4343

4444
## Results and certainty
4545

@@ -60,11 +60,13 @@ raise HandlerFailure("unavailable", "The operation was refused")
6060

6161
This writes `status: FAILED` with `error: {code, message}` and no output. Use it
6262
only when the operation knows its effect's disposition. An unexpected exception,
63-
invalid payload, invalid return, import failure, timeout or interruption writes
64-
no result. Core therefore cannot mistake an unknown external effect for a known
65-
failure.
63+
invalid payload, invalid return, import failure or timeout writes no result.
64+
When the generated contract declares signal cancellation, a handled interruption
65+
writes `status: INTERRUPTED` without output. Core classifies it as `CANCELED`,
66+
which leaves the effect uncertain; it is never a certain operation failure.
67+
A contract declaring no cancellation does not install interruption handlers.
6668

67-
Because those outcomes write nothing, the harness removes any document at the
69+
To prevent an earlier result from surviving an outcome that writes nothing, the harness removes any document at the
6870
result path before it reads the request, and refuses to start if it cannot. A
6971
document at that path is always this invocation's, so a launcher reusing the
7072
path cannot read an earlier attempt's result as this one's. The result is

‎go.mod‎

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ module github.com/codefly-dev/runnable-python
33
go 1.27.1
44

55
require (
6-
github.com/codefly-dev/core v0.3.28-0.20260913182029-34d35397ac69
7-
github.com/stretchr/testify v1.11.1
8-
google.golang.org/grpc v1.82.1
9-
google.golang.org/protobuf v1.36.11
6+
github.com/codefly-dev/core v0.3.29
7+
github.com/stretchr/testify v1.12.1
8+
google.golang.org/grpc v1.83.1
9+
google.golang.org/protobuf v1.36.12
1010
)
1111

1212
require (
13-
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1 // indirect
14-
buf.build/go/protovalidate v1.2.0 // indirect
15-
cel.dev/expr v0.25.1 // indirect
13+
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.12-20260825204119-511051f7f437.2 // indirect
14+
buf.build/go/protovalidate v1.4.0 // indirect
15+
cel.dev/cel-go v0.32.0 // indirect
16+
cel.dev/expr v0.25.3 // indirect
1617
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
1718
github.com/Masterminds/semver v1.5.0 // indirect
1819
github.com/Masterminds/semver/v3 v3.5.0 // indirect
@@ -22,65 +23,65 @@ require (
2223
github.com/blang/semver v3.5.1+incompatible // indirect
2324
github.com/blang/semver/v4 v4.0.0 // indirect
2425
github.com/cespare/xxhash/v2 v2.3.0 // indirect
25-
github.com/cheggaaa/pb/v3 v3.1.7 // indirect
26+
github.com/cheggaaa/pb/v3 v3.2.1 // indirect
2627
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
2728
github.com/codefly-dev/gortk v0.2.0 // indirect
2829
github.com/containerd/errdefs v1.0.0 // indirect
2930
github.com/containerd/errdefs/pkg v0.3.0 // indirect
3031
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3132
github.com/distribution/reference v0.6.0 // indirect
3233
github.com/docker/docker v28.5.2+incompatible // indirect
33-
github.com/docker/go-connections v0.7.0 // indirect
34+
github.com/docker/go-connections v0.8.1 // indirect
3435
github.com/docker/go-units v0.5.0 // indirect
3536
github.com/fatih/color v1.19.0 // indirect
36-
github.com/felixge/httpsnoop v1.0.4 // indirect
37-
github.com/fsnotify/fsnotify v1.9.0 // indirect
37+
github.com/felixge/httpsnoop v1.1.0 // indirect
38+
github.com/fsnotify/fsnotify v1.10.1 // indirect
3839
github.com/go-errors/errors v1.4.2 // indirect
39-
github.com/go-logr/logr v1.4.3 // indirect
40+
github.com/go-logr/logr v1.4.4 // indirect
4041
github.com/go-logr/stdr v1.2.2 // indirect
4142
github.com/go-ole/go-ole v1.3.0 // indirect
42-
github.com/go-openapi/analysis v0.25.0 // indirect
43-
github.com/go-openapi/errors v0.22.7 // indirect
44-
github.com/go-openapi/jsonpointer v0.23.1 // indirect
45-
github.com/go-openapi/jsonreference v0.21.5 // indirect
46-
github.com/go-openapi/loads v0.23.3 // indirect
47-
github.com/go-openapi/spec v0.22.4 // indirect
48-
github.com/go-openapi/strfmt v0.26.1 // indirect
49-
github.com/go-openapi/swag v0.23.0 // indirect
50-
github.com/go-openapi/swag/conv v0.26.0 // indirect
51-
github.com/go-openapi/swag/jsonname v0.26.0 // indirect
52-
github.com/go-openapi/swag/jsonutils v0.26.0 // indirect
53-
github.com/go-openapi/swag/loading v0.26.0 // indirect
54-
github.com/go-openapi/swag/mangling v0.26.0 // indirect
55-
github.com/go-openapi/swag/stringutils v0.26.0 // indirect
56-
github.com/go-openapi/swag/typeutils v0.26.0 // indirect
57-
github.com/go-openapi/swag/yamlutils v0.26.0 // indirect
43+
github.com/go-openapi/analysis v1.0.0 // indirect
44+
github.com/go-openapi/errors v0.22.8 // indirect
45+
github.com/go-openapi/jsonpointer v1.0.1 // indirect
46+
github.com/go-openapi/jsonreference v1.0.2 // indirect
47+
github.com/go-openapi/loads v0.25.3 // indirect
48+
github.com/go-openapi/spec v1.0.1 // indirect
49+
github.com/go-openapi/strfmt v0.27.2 // indirect
50+
github.com/go-openapi/swag v0.28.0 // indirect
51+
github.com/go-openapi/swag/cmdutils v0.28.0 // indirect
52+
github.com/go-openapi/swag/conv v0.29.1 // indirect
53+
github.com/go-openapi/swag/fileutils v0.28.0 // indirect
54+
github.com/go-openapi/swag/jsonutils v0.29.1 // indirect
55+
github.com/go-openapi/swag/loading v0.29.1 // indirect
56+
github.com/go-openapi/swag/mangling v0.29.1 // indirect
57+
github.com/go-openapi/swag/netutils v0.28.0 // indirect
58+
github.com/go-openapi/swag/pools v0.29.1 // indirect
59+
github.com/go-openapi/swag/stringutils v0.29.1 // indirect
60+
github.com/go-openapi/swag/typeutils v0.29.1 // indirect
61+
github.com/go-openapi/swag/yamlutils v0.29.1 // indirect
5862
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
59-
github.com/gofrs/flock v0.13.0 // indirect
60-
github.com/google/cel-go v0.28.0 // indirect
63+
github.com/gofrs/flock v0.13.1 // indirect
6164
github.com/google/gnostic-models v0.6.9 // indirect
6265
github.com/google/go-github/v89 v89.0.0 // indirect
6366
github.com/google/go-querystring v1.2.0 // indirect
6467
github.com/google/uuid v1.6.0 // indirect
6568
github.com/hashicorp/errwrap v1.1.0 // indirect
6669
github.com/hashicorp/go-multierror v1.1.1 // indirect
67-
github.com/josharian/intern v1.0.0 // indirect
70+
github.com/kr/text v0.2.0 // indirect
6871
github.com/lufia/plan9stats v0.0.0-20260330125221-c963978e514e // indirect
69-
github.com/mailru/easyjson v0.7.7 // indirect
70-
github.com/mattn/go-colorable v0.1.14 // indirect
71-
github.com/mattn/go-isatty v0.0.21 // indirect
72-
github.com/mattn/go-runewidth v0.0.23 // indirect
72+
github.com/mattn/go-colorable v0.1.15 // indirect
73+
github.com/mattn/go-isatty v0.0.24 // indirect
74+
github.com/mattn/go-runewidth v0.0.27 // indirect
7375
github.com/mitchellh/mapstructure v1.5.0 // indirect
7476
github.com/moby/docker-image-spec v1.3.1 // indirect
75-
github.com/moby/patternmatcher v0.6.0 // indirect
77+
github.com/moby/patternmatcher v0.6.1 // indirect
7678
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
77-
github.com/oklog/ulid/v2 v2.1.1 // indirect
79+
github.com/oklog/ulid/v2 v2.1.2 // indirect
7880
github.com/opencontainers/go-digest v1.0.0 // indirect
7981
github.com/opencontainers/image-spec v1.1.1 // indirect
8082
github.com/pkg/errors v0.9.1 // indirect
81-
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
8283
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
83-
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
84+
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 // indirect
8485
github.com/shirou/gopsutil/v3 v3.24.5 // indirect
8586
github.com/shoenig/go-m1cpu v0.2.1 // indirect
8687
github.com/tklauser/go-sysconf v0.3.16 // indirect
@@ -89,20 +90,20 @@ require (
8990
github.com/yoheimuta/go-protoparser/v4 v4.14.2 // indirect
9091
github.com/yusufpapurcu/wmi v1.2.4 // indirect
9192
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
92-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 // indirect
93-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect
94-
go.opentelemetry.io/otel v1.44.0 // indirect
95-
go.opentelemetry.io/otel/metric v1.44.0 // indirect
96-
go.opentelemetry.io/otel/trace v1.44.0 // indirect
93+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0 // indirect
94+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0 // indirect
95+
go.opentelemetry.io/otel v1.46.0 // indirect
96+
go.opentelemetry.io/otel/metric v1.46.0 // indirect
97+
go.opentelemetry.io/otel/trace v1.46.0 // indirect
9798
go.yaml.in/yaml/v2 v2.4.2 // indirect
98-
go.yaml.in/yaml/v3 v3.0.4 // indirect
99-
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f // indirect
100-
golang.org/x/net v0.56.0 // indirect
101-
golang.org/x/sys v0.47.0 // indirect
102-
golang.org/x/term v0.44.0 // indirect
103-
golang.org/x/text v0.39.0 // indirect
104-
google.golang.org/genproto/googleapis/api v0.0.0-20260420184626-e10c466a9529 // indirect
105-
google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529 // indirect
99+
go.yaml.in/yaml/v3 v3.0.5 // indirect
100+
golang.org/x/exp v0.0.0-20260820142414-ca536658362e // indirect
101+
golang.org/x/net v0.58.0 // indirect
102+
golang.org/x/sys v0.48.0 // indirect
103+
golang.org/x/term v0.45.0 // indirect
104+
golang.org/x/text v0.41.0 // indirect
105+
google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 // indirect
106+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688 // indirect
106107
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
107108
gopkg.in/yaml.v3 v3.0.1 // indirect
108109
k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect

0 commit comments

Comments
 (0)