From deedb59cd9ccbedd63e5b15f05b29a58e0bfbb2f Mon Sep 17 00:00:00 2001 From: rldyourmnd Date: Sun, 13 Sep 2026 06:40:52 +0500 Subject: [PATCH 1/3] ci: bound native integration suites within the platform job budget Signed-off-by: rldyourmnd --- .github/workflows/platforms.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/platforms.yml b/.github/workflows/platforms.yml index 1d06294..4147a36 100644 --- a/.github/workflows/platforms.yml +++ b/.github/workflows/platforms.yml @@ -67,4 +67,7 @@ jobs: - name: go build run: go build -trimpath ./core/cmd/gds - name: go test - run: go test ./... + # The integration package can exceed Go's default 10m aggregate + # budget on Intel runners. Per-operation deadlines remain intact; + # the suite and the enclosing job both keep explicit upper bounds. + run: go test -timeout=15m ./... From 801da0001c75021118a0f3d5ffbd267c50aeecb8 Mon Sep 17 00:00:00 2001 From: rldyourmnd Date: Sun, 13 Sep 2026 07:02:08 +0500 Subject: [PATCH 2/3] test: synchronize escaped-child startup before cancellation Signed-off-by: rldyourmnd --- core/app/module_process_unix_test.go | 29 ++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/core/app/module_process_unix_test.go b/core/app/module_process_unix_test.go index 90806d0..cfea577 100644 --- a/core/app/module_process_unix_test.go +++ b/core/app/module_process_unix_test.go @@ -76,7 +76,7 @@ func TestDeclaredSuccessCannotLeaveBackgroundWriter(t *testing.T) { assertTestChildStopped(t, pid) } -func TestDeclaredTimeoutDoesNotClaimSetsidChildren(t *testing.T) { +func TestDeclaredCancellationDoesNotClaimSetsidChildren(t *testing.T) { // Process-group cleanup is not ownership of setsid/Docker-daemon children. // Darwin images have no util-linux `setsid(1)`; python3.os.setsid is the // same syscall on linux and darwin. @@ -93,16 +93,25 @@ func TestDeclaredTimeoutDoesNotClaimSetsidChildren(t *testing.T) { if err := os.WriteFile(filepath.Join(dir, "setsid_child.py"), []byte(child), 0o600); err != nil { t.Fatal(err) } - report := runDeclaredCommand( - context.Background(), - dir, - "python3 setsid_child.py & wait", - 350*time.Millisecond, - ) + // Interpreter startup is outside the behavior under test. Wait for the + // child to enter its new session before exercising cancellation; a short + // launch deadline can otherwise kill Python before the child exists. + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + done := make(chan CommandReport, 1) + go func() { + done <- runDeclaredCommand(ctx, dir, "python3 setsid_child.py & wait", 30*time.Second) + }() pid := readOwnedTestChild(t, dir) defer stopOwnedTestChild(pid) - if report.Status == "passed" { - t.Fatalf("setsid child made the parent look finished: %#v", report) + cancel() + select { + case report := <-done: + if report.Status == "passed" { + t.Fatalf("setsid child made the parent look finished: %#v", report) + } + case <-time.After(6 * time.Second): + t.Fatal("setsid parent cancellation did not settle") } b, err := exec.Command("ps", "-o", "stat=", "-p", strconv.Itoa(pid)).Output() if err != nil || strings.TrimSpace(string(b)) == "" || strings.HasPrefix(strings.TrimSpace(string(b)), "Z") { @@ -112,7 +121,7 @@ func TestDeclaredTimeoutDoesNotClaimSetsidChildren(t *testing.T) { func readOwnedTestChild(t *testing.T, dir string) int { t.Helper() - deadline := time.Now().Add(3 * time.Second) + deadline := time.Now().Add(10 * time.Second) for time.Now().Before(deadline) { b, err := os.ReadFile(filepath.Join(dir, "child.pid")) if err == nil { From 90717a3be8b164965b11adc7f6e35eed788cc10e Mon Sep 17 00:00:00 2001 From: rldyourmnd Date: Sun, 13 Sep 2026 07:08:44 +0500 Subject: [PATCH 3/3] chore: regenerate context after native test changes Signed-off-by: rldyourmnd --- .gds/bundle.lock.yaml | 10 +++++----- .github/workflows/gds-ci.yml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gds/bundle.lock.yaml b/.gds/bundle.lock.yaml index 5a7577d..e22d713 100644 --- a/.gds/bundle.lock.yaml +++ b/.gds/bundle.lock.yaml @@ -5,14 +5,14 @@ bundle: version: "0.9.4-dev" release_sequence: 0 channel: "development" - source_tree_digest: "sha256:85d792bf33db30ad34ecd6ad0bf7bf0bdf84c41778432e87b45a89e200dbe18b" - digest: "sha256:7d089792b096f905b6b9568f62fef25b568f5e37b1ed8a17543380bf8e9d28e3" + source_tree_digest: "sha256:6e0da387f1ed9a162e18f93470f9712783b4a7501a2ec9979d4ce2e15fc73f46" + digest: "sha256:030d8ccfe93fc4ded1b5fabe8e8df2eee4195c7b2eec33f6b1880dec851116bd" projection: - input_digest: "sha256:7eac6db12d8a42a5003f12d2e22b63e17f20aff3b49764e000b94a9a782702f2" - output_digest: "sha256:2174c5325ae3eb87af133acd34eab9b63dedb780c795e562a134fd4608c55d68" + input_digest: "sha256:6bae4a92f7cdb2890369fc557f3e82f64172dae27ce782d7f10455a6a0f47949" + output_digest: "sha256:92322690bf490037b4ec99b33584004ed63a1dc7f2b7368e6362510292b81d3c" files: - path: ".gds/compiled-policy.json" digest: "sha256:37ece9020fd9eeed4ee90582600c5e50cb3a7e32ee773719d1ccfad2d9cd1b6d" - path: ".github/workflows/gds-ci.yml" - digest: "sha256:1269d657b675dc22f6e72ddd885a11d14519d8039d97a8d86627f296333b2390" + digest: "sha256:21bbe5aad38befa4f10438841bcfd06f42dd9981047e057ec8142fa9326d0bd0" diff --git a/.github/workflows/gds-ci.yml b/.github/workflows/gds-ci.yml index a73d99c..c573a2a 100644 --- a/.github/workflows/gds-ci.yml +++ b/.github/workflows/gds-ci.yml @@ -1,8 +1,8 @@ # GENERATED FILE - DO NOT EDIT DIRECTLY # generator: gds # bundle: 0.9.4-dev -# source-tree-digest: sha256:85d792bf33db30ad34ecd6ad0bf7bf0bdf84c41778432e87b45a89e200dbe18b -# input-digest: sha256:7eac6db12d8a42a5003f12d2e22b63e17f20aff3b49764e000b94a9a782702f2 +# source-tree-digest: sha256:6e0da387f1ed9a162e18f93470f9712783b4a7501a2ec9979d4ce2e15fc73f46 +# input-digest: sha256:6bae4a92f7cdb2890369fc557f3e82f64172dae27ce782d7f10455a6a0f47949 # output-digest: sha256:15b87303cd0692fd8e5d88281771dded9fdc2fc027d600681155cb4e71f42386 # edit-source: # - .gds/repository.yaml