Skip to content

test: put the asyncio mark on async tests only in nine more files - #25427

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
test/asyncio-mark-sync-tests-rest
Oct 28, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
test/asyncio-mark-sync-tests-rest

Conversation

@RohanK6

@RohanK6 RohanK6 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Nine more test files run with no "marked with @pytest.mark.asyncio but it is not an async function" warnings, and the same tests still pass.

A module-wide pytestmark = pytest.mark.asyncio, or a class-level @pytest.mark.asyncio over a class that also holds sync tests, puts the mark on sync tests too. pytest-asyncio warns once per sync item: 47 warnings across these nine files. This follows #25392, which covers the four largest files.

Why it matters

The repeated warning buries every real warning these files raise, so a new one goes unseen.

Not a goal

What changed (motivation → approach → change)

mark wider than the async tests → sync tests warn → mark each async test instead.

  • Seven files with a module pytestmark: the line is removed and each async def test_* gets @pytest.mark.asyncio.
  • test_cloud_signin_recovery.py (TestSigninRestartRoute) and test_remote_crew_peer_slots.py (TestPeerTextIsRedactedAndAllowlisted): the class mark is removed from the one class that also holds sync tests, and its async methods are marked. Classes whose tests are all async keep their class mark.

Backwards compatibility

Compatible: test-only change; no product code is touched.

Removes nothing: every test still runs with the same assertions; only where the mark sits changes.

Tests

Counts from python -m pytest -n0 -q -W always <file>, before (main 2332c4e192) and after:

file passed before passed after asyncio warnings
test_agent_panel_routes_allocation.py 27 27 2 → 0
test_agent_panel_routes_page.py 29 29 9 → 0
test_agent_panel_routes_record.py 53 53 12 → 0
test_browser_view_relay.py 36 36 5 → 0
test_cloud_signin_recovery.py 99 99 3 → 0
test_dashboard_save_tool_older_rule.py 4 4 1 → 0
test_mcp_apps_message_endpoint.py 31 31 11 → 0
test_mcp_footprint_route.py 13 13 3 → 0
test_remote_crew_peer_slots.py 46 46 1 → 0
  • No "coroutine was never awaited" or "not natively supported" line in any run, so every async test still runs as async.
  • Repeats: 3/3 at -n 4 --dist loadgroup --max-worker-restart=2 over all nine files.
  • Shuffled: all 338 ids in shuffled order, seeds 5521 and 808: 338 passed each.

Proof: not provable -- test-only change

Manual verification

N/A — unit coverage sufficient; the counts above are the check.

Related Issues

Closes #25426

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

A module-wide pytestmark = pytest.mark.asyncio, or a class-level mark
over a class that also holds sync tests, marked those sync tests too,
and pytest-asyncio warned once per sync item (47 warnings across the
nine files). Each async test now carries the mark itself; classes
whose tests are all async keep their class mark.

No assertion changes: the same 338 tests pass.

Closes #25426
@RohanK6
RohanK6 requested review from a team and KiroCrewCaptain as code owners October 28, 2026 21:04
@RohanK6
RohanK6 requested a review from dodgeblaster October 28, 2026 21:04
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 1ca7cada5adebf3a7944350fe4a87ceee6165f47 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision 1ca7cada5adebf3a7944350fe4a87ceee6165f47 ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 1ca7cada5adebf3a7944350fe4a87ceee6165f47 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing to check. The change only moves where @pytest.mark.asyncio sits in tests. No product code, assertion or fixture changes, and no surface is rendered.

[DESIGN-REVIEWED] 1ca7cad

Description read

[DESCRIPTION-READ] 151c85877249b26f1f8a0f2cb22392fff4bc2e274e30ce92ca51acc2e46a7f06

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 1ca7cada5adebf3a7944350fe4a87ceee6165f47 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 1ca7cad

Verdict parsed from the review's SHA-scoped output markers for commit 1ca7cada5adebf3a7944350fe4a87ceee6165f47.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 1ca7cada5adebf3a7944350fe4a87ceee6165f47 false-positive: <reason, 20 to 500 characters>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 1ca7cada5adebf3a7944350fe4a87ceee6165f47 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 1ca7cad

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 1ca7cada5adebf3a7944350fe4a87ceee6165f47 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 28, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) October 28, 2026 23:06

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tier 1 auto-approve: test (9 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: test-only; replaces the module-wide pytestmark asyncio mark with per-test @pytest.mark.asyncio on the async tests in nine test files, with no other changed lines.

@KiroCrewCaptain
KiroCrewCaptain merged commit 4caf2ae into main Oct 28, 2026
111 of 113 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the test/asyncio-mark-sync-tests-rest branch October 28, 2026 23:07
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: asyncio marks warn on sync tests in nine more test files

2 participants