Skip to content

Commit 7f010f6

Browse files
fix: consume core's merged invocation framing (#4)
The Runnable framing landed on core main as 34d3539, one commit past the b3470f0 pinned here. That commit added Observation.ResultPresent, because a nil result and an empty one are one value in Go and only one of them means the harness wrote nothing. Reading the result path now records whether a document was there, so a successful invocation is classified from a result core agrees is present instead of being refused as an observation that carries one without reporting it. The old pin also resolved only while core's feature branch survived deletion: that branch was squash-merged, so its commit is on no main line. Refs #1. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 15d351e commit 7f010f6

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ 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.20260913013542-b3470f0096cd
6+
github.com/codefly-dev/core v0.3.28-0.20260913182029-34d35397ac69
77
github.com/stretchr/testify v1.11.1
88
google.golang.org/grpc v1.82.1
99
google.golang.org/protobuf v1.36.11

‎go.sum‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg
3838
github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4=
3939
github.com/codefly-dev/core v0.3.28-0.20260913013542-b3470f0096cd h1:SuB+IbQhgWiybxXxhSc2IzXiqTIXl21bpIa6roVpuBY=
4040
github.com/codefly-dev/core v0.3.28-0.20260913013542-b3470f0096cd/go.mod h1:s3e5uut1GseXvtmBanN9J6wcfnTSFTJfAolIMef+41w=
41+
github.com/codefly-dev/core v0.3.28-0.20260913182029-34d35397ac69 h1:flynzbZBFtxWL6zhV/Qdsa8W0SEQmKppQafTcYNNbq4=
42+
github.com/codefly-dev/core v0.3.28-0.20260913182029-34d35397ac69/go.mod h1:s3e5uut1GseXvtmBanN9J6wcfnTSFTJfAolIMef+41w=
4143
github.com/codefly-dev/gortk v0.2.0 h1:7bOlS5valYz2zil+fZctQNcPCYBcPj86abcw9N8h1hQ=
4244
github.com/codefly-dev/gortk v0.2.0/go.mod h1:dDWUMFgAP063OCGhTEpV7FFUj9+zTcxxO/nV80VKEwg=
4345
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=

‎qualification_test.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,13 +341,14 @@ func invoke(t *testing.T, root string, argv []string, pkg *basev0.RunnablePackag
341341
require.NotNil(t, process.ProcessState, "start process: %v", runErr)
342342
result := invocation{exit: process.ProcessState.ExitCode(), stdout: stdout.String(), stderr: stderr.String()}
343343
recorded, err := os.ReadFile(resultPath)
344+
present := err == nil
344345
if err != nil {
345346
require.True(t, os.IsNotExist(err), "%v", err)
346347
}
347-
observed := corerunnable.Observation{Result: recorded, ExitCode: int32(result.exit), StartedAt: started, EndedAt: time.Now()}
348+
observed := corerunnable.Observation{ResultPresent: present, Result: recorded, ExitCode: int32(result.exit), StartedAt: started, EndedAt: time.Now()}
348349
result.classified, err = corerunnable.Complete(inv, pkg, observed)
349350
require.NoError(t, err)
350-
if recorded != nil {
351+
if present {
351352
parsed, err := corerunnable.ParseResult(recorded, inv, pkg)
352353
require.NoError(t, err, string(recorded))
353354
result.completion = map[string]any{}

0 commit comments

Comments
 (0)