From 863abf43bf9c4253fb492728fb148b18fe36462a Mon Sep 17 00:00:00 2001 From: Kevin Tang <73975146+vt128@users.noreply.github.com> Date: Sat, 7 Nov 2026 03:48:37 +0800 Subject: [PATCH 1/2] [ci] restore supported macOS runners (STAR-100) --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e960dd0..db950bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: # Star* module's pipeline. Pinned to a commit SHA for supply-chain safety; # bump the pin when meta's workflow changes (Dependabot github-actions can # automate this). - uses: 1set/meta/.github/workflows/go-ci.yml@23f088bcd6dce16c93e0056d7b70b4f4434208e8 + uses: 1set/meta/.github/workflows/go-ci.yml@6b334e6a2762acaeefcea9fc7d3e86964e9246be with: go-floor: "1.20" doc-coverage: true From 3573114352c64efed0032c7e9c203e948383fa09 Mon Sep 17 00:00:00 2001 From: Kevin Tang <73975146+vt128@users.noreply.github.com> Date: Sat, 7 Nov 2026 04:11:59 +0800 Subject: [PATCH 2/2] [test] keep transaction alive in timeout regression (STAR-100) --- example_test.go | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/example_test.go b/example_test.go index c095c0a..b8e67e5 100644 --- a/example_test.go +++ b/example_test.go @@ -8,6 +8,7 @@ import ( "net/http/httptest" "os" "path/filepath" + "runtime" "strings" "sync" "sync/atomic" @@ -2626,19 +2627,38 @@ func TestNestedBeginHonorsTimeout(t *testing.T) { } begin := beginV.(*starlark.Builtin) th := &starlark.Thread{} // Background context, like a default starlet Run - if _, err := starlark.Call(th, begin, nil, nil); err != nil { - t.Fatalf("first begin: %v", err) // holds the sole connection + first, err := starlark.Call(th, begin, nil, nil) + if err != nil { + t.Fatalf("first begin: %v", err) } + defer func() { + rollback, err := first.(starlark.HasAttrs).Attr("rollback") + if err != nil { + t.Errorf("rollback attr: %v", err) + return + } + if _, err := starlark.Call(th, rollback.(*starlark.Builtin), nil, nil); err != nil { + t.Errorf("rollback first transaction: %v", err) + } + }() + // An abandoned transaction is finalized and releases its connection. Keep + // this handle live while the second begin waits, and force a collection so + // the assertion does not depend on when the runtime happens to run GC. + runtime.GC() + done := make(chan error, 1) go func() { _, e := starlark.Call(th, begin, nil, nil); done <- e }() select { case e := <-done: if e == nil { t.Error("second begin unexpectedly succeeded on a single-connection DB") + } else if !strings.Contains(e.Error(), context.DeadlineExceeded.Error()) { + t.Errorf("second begin: %v, want the per-operation deadline", e) } case <-time.After(5 * time.Second): t.Error("second begin blocked >5s — the per-operation timeout was not honored") } + runtime.KeepAlive(first) } // raceTestRun uniquifies registered-function names across test invocations (the