Skip to content

flake: TestExecutorAutostopAIAgentActivity #1491

@flake-investigator

Description

@flake-investigator

CI Failure Details

CI Run: https://github.com/coder/coder/actions/runs/24817754753
Failed Job: https://github.com/coder/coder/actions/runs/24817754753/job/72635595517 (test-go-pg (macos-latest))
Commit: 06d7fc520043b6568dd06b0a4117e21a4d2d3502 (Lukasz)
Date: 2026-04-23

Failing Test

TestExecutorAutostopAIAgentActivity in coderd/autobuild/lifecycle_executor_test.go:612

Error Output

lifecycle_executor_test.go:612:
Error: "map[]" should have 1 item(s), but has 0
Test: TestExecutorAutostopAIAgentActivity

Root Cause Analysis

Likely flaky timing in autobuild lifecycle executor stats collection. The test expects a transition after a tick following the bumped deadline, but stats.Transitions is empty. This mirrors other autobuild executor flakes where the transition isn’t recorded before the assertion. No data race warnings, panics, or OOM indicators were found in the log tail.

Assignment Analysis

git blame isn’t available via current tooling, so used recent file history:

git log --oneline -10 --follow coderd/autobuild/lifecycle_executor_test.go
# 974ca3ed fix: use "idle timeout" as task auto-pause reason (DanielleMaywood)
# 31c12792 feat: notify on task auto pause, manual pause and manual resume (DanielleMaywood)
# 4c7844ad feat(coderd): bump workspace deadline on AI agent activity (Mathias Fredriksson)

Most recent meaningful changes to this test area are by DanielleMaywood, so assigning to them for triage.

Related Issues

Reproduction

Not deterministic; appears timing-dependent in CI.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions