Skip to content

Commit 816631b

Browse files
authored
fix(yield): accept generated Go module pins (#293)
Disclosure-Reviewed: reviewed — public-safe only, private facet kept out of this commit
1 parent fdedaeb commit 816631b

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

labs/22-yield/yield/cmd/yskill/agents.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ func localRuntimeInstallCommand(language, expected string) string {
660660

661661
var pinnedVersionPatterns = map[string]*regexp.Regexp{
662662
"python": regexp.MustCompile(`(?m)^yieldskill==([^\s]+)$`),
663-
"go": regexp.MustCompile(`(?m)^\s*github\.com/operatorstack/yield\s+v([^\s]+)`),
663+
"go": regexp.MustCompile(`(?m)^\s*(?:require\s+)?github\.com/operatorstack/yield\s+v([^\s]+)`),
664664
"rust": regexp.MustCompile(`(?m)yieldskill\s*=\s*\{[^\n]*version\s*=\s*"=([^"]+)"`),
665665
}
666666

labs/22-yield/yield/cmd/yskill/agents_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,23 @@ func TestWorkflowSDKVersionMustMatchRuntime(t *testing.T) {
405405
}
406406
}
407407

408+
func TestGoWorkflowSDKVersionAcceptsGeneratedAndBlockForms(t *testing.T) {
409+
repo := t.TempDir()
410+
manifest := skillManifest{Version: 1, Language: "go", Run: []string{"go", "run", "."}}
411+
for name, goMod := range map[string]string{
412+
"generated": "module review\n\ngo 1.26.5\n\nrequire github.com/operatorstack/yield v0.1.23\n",
413+
"block": "module review\n\ngo 1.26.5\n\nrequire (\n\tgithub.com/operatorstack/yield v0.1.23\n)\n",
414+
} {
415+
t.Run(name, func(t *testing.T) {
416+
skill := filepath.Join(repo, name)
417+
writeTestFile(t, filepath.Join(skill, "go.mod"), goMod)
418+
if err := verifyWorkflowSDKVersion(manifest, skill, repo, "0.1.23"); err != nil {
419+
t.Fatal(err)
420+
}
421+
})
422+
}
423+
}
424+
408425
func TestDoctorReportsSDKRuntimeAndAdapterVersionProblemsTogether(t *testing.T) {
409426
repo := t.TempDir()
410427
writeTestFile(t, filepath.Join(repo, ".git", "keep"), "")

labs/22-yield/yield/evals/results/latest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"schema_version": 2,
33
"methodology_version": "1.1",
4-
"generated_at": "2026-08-02T14:30:09.305Z",
5-
"source_digest": "6a2ad2cc8d59a7226c966bdf71015a3d959a7f57ecf29d661d195c2f8ea79604",
4+
"generated_at": "2026-08-02T14:55:09.652Z",
5+
"source_digest": "0c8520275d4bd2d0e607c6dbcb0ebf7696106451f2a7fd2acb71ea2c1ed16286",
66
"status": "passed",
77
"workflow_conformance": {
88
"passed": 40,

0 commit comments

Comments
 (0)