Skip to content

test(#3515): increase unit test timeout to 30s - #3576

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/3515-increase-unit-test-timeout
Open

fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/3515-increase-unit-test-timeout

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

What:

Raises the -timeout flag on the unit-test invocation in the Makefile from 10s to 30s, and updates the Test Tags table in AGENTS.md so the documented unit-test timeout stays in sync.

  • Makefile (unit test line): -timeout 10s-timeout 30s
  • AGENTS.md (Test Tags): unit (10s) → unit (30s)

Why:

TestFilteringWithMixedRules in internal/evaluator/conftest_evaluator_unit_core_test.go has been intermittently panicking with a Go test timeout under CI load. The test does I/O-heavy work (creating temp directories, building tar.gz archives, and compiling Rego policies via NewConftestEvaluatorWithNamespace()), and OPA capabilities-JSON parsing + policy compilation is inherently variable-latency. Under load on a shared CI runner it occasionally exceeds the previous 10s budget, panics, and fails the entire unit-test job.

This behaviour is observable on Renovate PR #3295 (a security bump of in-toto-golang), where the Checks workflow failed 6 of 9 times partly due to this flake — with two failures (workflow runs 30586521570 and 30907557496) attributable to TestFilteringWithMixedRules timing out and the same commit passing on re-run without any code change.

30s matches the existing timeout for the generative test tier and provides headroom for the OPA compilation code path without meaningfully lengthening a healthy run.

Testing:

  • Ran the previously-flaky test with the new timeout multiple times: go test -race -tags=unit -timeout 30s -count=3 -run TestFilteringWithMixedRules ./internal/evaluator/ — passes (ok github.com/conforma/cli/internal/evaluator 1.296s).
  • Verified make -n test renders the intended command with -timeout 30s.
  • Diff limited to the two lines described above; no production code changes.

Tickets:


Closes #3515

Post-script verification

  • Branch is not main/master (agent/3515-increase-unit-test-timeout)
  • Secret scan passed (gitleaks — 65cf118af7ebe9efb68a3fd396d0eb249a001ca5..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

TestFilteringWithMixedRules in the conftest evaluator unit tests
was panicking with a test timeout under CI load. The test performs
I/O-heavy work (building tar.gz archives, compiling Rego policies
via NewConftestEvaluatorWithNamespace) that occasionally exceeds
the 10s budget, causing flaky failures such as those seen on PR
#3295 (workflow runs 30586521570 and 30907557496). The failures
are reproducibly transient: the same commit passes on re-run.

Raise the -timeout flag for the unit test target in the Makefile
from 10s to 30s so that inherently variable-latency operations
(OPA policy compilation) have adequate headroom on shared CI
runners. This matches the existing generative-test timeout and
mirrors the alternative suggested by triage.

Update AGENTS.md so the documented test-tag timeout table stays
in sync with the Makefile.

Note: pre-commit hooks were not run. The conforma/hooks pre-commit
repo could not be fetched in the sandbox (git fetch returned HTTP
403); the sole configured hook (check-commit-message) validates
commit messages rather than source files and does not apply to
the Makefile/AGENTS.md diff.

Closes #3515
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner September 22, 2026 09:03
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Sep 22, 2026
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 3a587dc2-b491-4a09-b559-424e7cea3a21

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

A trivially scoped timeout bump (4 lines, bot-authored, exact issue match) kept at moderate rather than low by one protected-path touch (AGENTS.md) and the Makefile CI-workflow flag, with moderate historical churn on both files.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

@fullsend-ai-review fullsend-ai-review Bot added the requires-manual-review Review requires human judgment label Sep 22, 2026
@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
acceptance 54.51% <ø> (ø)
generative 12.25% <ø> (ø)
integration 23.56% <ø> (ø)
unit 72.24% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jsmid1

jsmid1 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

/retest

@red-hat-konflux

Copy link
Copy Markdown
Contributor

All PipelineRuns for this commit have already succeeded. Use /retest <pipeline-name> to re-run a specific pipeline or /test to re-run all pipelines.

@jsmid1 jsmid1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Triggers review agent dispatch requires-manual-review Review requires human judgment risk/moderate PR risk: moderate size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Increase unit test timeout to prevent flaky TestFilteringWithMixedRules panics

1 participant