Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
MUL-7415 ci: retire the standalone Cursor lifecycle job (#8465)
Bohan Jiangd18cec01c3b2
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex af77976155..33ae440aba 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -14,47 +14,6 @@ concurrency:cancel-in-progress: truejobs:- # Linux is already covered by the two full backend race suites.- cursor-background-lifecycle:- needs: changes- if: ${{ needs.changes.outputs.runtime == 'true' }}- runs-on: ${{ matrix.os }}- strategy:- fail-fast: false- matrix:- os: [macos-latest, windows-latest]- steps:- - uses: actions/checkout@v6- - uses: actions/setup-go@v5- with:- go-version: "1.26.x"- cache-dependency-path: server/go.sum- - name: Verify Cursor background lifecycle and watchdog races- shell: bash- working-directory: server- # Explicit, verbose selection prevents the Unix regression from silently- # disappearing behind a build tag or the ordinary Windows test subset.- run: |- go test -race ./pkg/agent -v -run 'TestCursorBackground|TestCaptureCursorBackground' -count=1- go test -race ./internal/daemon -v -run 'Test.*Background.*Watchdog|Test.*IdleWatchdog' -count=1- - name: Verify macOS finalization without race instrumentation- if: runner.os == 'macOS' && needs.changes.outputs.full != 'true'- working-directory: server- run: go test ./pkg/agent -run '^TestCursorBackgroundLifecycle/finish$' -count=1-- - name: Stress macOS finalization- if: runner.os == 'macOS' && needs.changes.outputs.full == 'true'- shell: bash- working-directory: server- run: |- go test ./pkg/agent -run '^TestCursorBackgroundLifecycle/finish$' -count=5- go test -race ./pkg/agent -run '^TestCursorBackgroundLifecycle/finish$' -count=5- - name: Verify cgo-free macOS ownership- if: runner.os == 'macOS'- shell: bash- working-directory: server- run: CGO_ENABLED=0 go test ./pkg/agent -run '^TestCaptureCursorBackground(KernelRejectsStaleIdentity|DetachedSession|LateDescendant)$' -count=1-# PRs and main pushes use the same paths. Scheduled/manual runs validate all# scopes, including platform stress tests, without charging every merge for them.changes:@@ -515,7 +474,7 @@ jobs:# Preserve the existing required-check name while allowing tests, generated# SQL verification, and the vulnerability scan to run independently.backend:- needs: [changes, backend-tests, backend-agent-tests, sqlc-check, go-vulnerability-scan, cursor-background-lifecycle, windows-execenv, script-checks, installer]+ needs: [changes, backend-tests, backend-agent-tests, sqlc-check, go-vulnerability-scan, macos-runtime, windows-execenv, script-checks, installer]if: ${{ !cancelled() }}runs-on: ubuntu-lateststeps:@@ -523,7 +482,7 @@ jobs:- name: Check backend job resultsenv:NEEDS_JSON: ${{ toJSON(needs) }}- JOB_SCOPES: '{"backend-tests":"backend","backend-agent-tests":"backend","sqlc-check":"sqlc","go-vulnerability-scan":"backend","cursor-background-lifecycle":"runtime","windows-execenv":"runtime","script-checks":"scripts","installer":"installer"}'+ JOB_SCOPES: '{"backend-tests":"backend","backend-agent-tests":"backend","sqlc-check":"sqlc","go-vulnerability-scan":"backend","macos-runtime":"full","windows-execenv":"runtime","script-checks":"scripts","installer":"installer"}'run: node scripts/ci-scope.mjs gatewindows-execenv:@@ -717,6 +676,59 @@ jobs:working-directory: serverrun: go build ./cmd/multica+ - name: Test Windows Cursor background ownership+ working-directory: server+ # Cursor's background shell is captured through a second Job Object, and+ # TestCaptureCursorBackgroundProcessRejectsForeignJob is windows-tagged,+ # so it builds nowhere else. This used to be its own windows-latest job+ # on the same runtime scope as this one; same runner, same package, same+ # concern, so it is a step here instead of a second runner per merge.+ # Last on purpose: absorbing another job's steps means this job's own+ # failure modes now truncate that job's coverage too, and Cursor+ # ownership is the newest arrival, not the load-bearing one. The ubuntu+ # backend job still covers the untagged and Unix arms.+ run: go test -race ./pkg/agent -v -run 'TestCursorBackground|TestCaptureCursorBackground' -count=1 -timeout=5m++ # The only macOS runner here, and the only place cursor_background_process_darwin.go+ # is ever built: it signals a process group through XNU's per-process unique+ # identity so a recycled PID cannot redirect a kill, and the two tests pinning+ # that are `//go:build darwin`. Windows keeps its arm as a step in+ # windows-execenv, but macOS has no sibling job to join, and this covers one+ # integration's background shell rather than the shared launch path every+ # agent uses. So the daily full run carries it instead of charging every+ # backend merge for a macOS runner; `full` also means the stress counts below+ # are now the only finalization pass, replacing the single-count merge variant.+ macos-runtime:+ needs: changes+ if: ${{ needs.changes.outputs.full == 'true' }}+ runs-on: macos-latest+ steps:+ - uses: actions/checkout@v6+ - uses: actions/setup-go@v5+ with:+ go-version: "1.26.x"+ cache-dependency-path: server/go.sum+ - name: Verify Cursor background lifecycle and watchdog races+ shell: bash+ working-directory: server+ # Explicit, verbose selection prevents the Unix regression from silently+ # disappearing behind a build tag.+ run: |+ go test -race ./pkg/agent -v -run 'TestCursorBackground|TestCaptureCursorBackground' -count=1+ go test -race ./internal/daemon -v -run 'Test.*Background.*Watchdog|Test.*IdleWatchdog' -count=1++ - name: Stress macOS finalization+ shell: bash+ working-directory: server+ run: |+ go test ./pkg/agent -run '^TestCursorBackgroundLifecycle/finish$' -count=5+ go test -race ./pkg/agent -run '^TestCursorBackgroundLifecycle/finish$' -count=5++ - name: Verify cgo-free macOS ownership+ shell: bash+ working-directory: server+ run: CGO_ENABLED=0 go test ./pkg/agent -run '^TestCaptureCursorBackground(KernelRejectsStaleIdentity|DetachedSession|LateDescendant)$' -count=1+image-budget:# Soft gate against the 21.7MB of raw PNG/JPG that MUL-6352 cleared out:# a bitmap added or grown past 300KB fails until the PR description saysdiff --git a/server/pkg/agent/cursor_background_late_child_test.go b/server/pkg/agent/cursor_background_late_child_test.goindex 199be6c2de..32639237b6 100644--- a/server/pkg/agent/cursor_background_late_child_test.go+++ b/server/pkg/agent/cursor_background_late_child_test.go@@ -1,4 +1,14 @@-//go:build linux || darwin || windows+//go:build linux || darwin++// Windows is excluded deliberately, not by omission: this test was flaky there+// and nowhere else. Over 40 main pushes it never failed on the ubuntu runner,+// while the Windows arm failed twice in 43 -- once as `Access is denied.` and+// once as `not an owned descendant`, both from the same capture call. Those are+// two faces of one race: cursorWindowsProcessParents snapshots every PID->PPID+// pair on the machine, Windows keeps a child's recorded PPID after the parent+// exits, and the PID is then free to be reused, so the walk can reach a PID now+// owned by someone else. Restoring `windows` here without fixing that race+// restores the flake; MUL-7417 tracks the fix.package agent