test: re-enable recoverable skipped tests (+ fix latent LazySpan bug)#723
Merged
wbarnha merged 2 commits intoJul 21, 2026
Merged
Conversation
wbarnha
force-pushed
the
claude/reenable-remaining-skipped-tests
branch
from
July 20, 2026 21:12
7056617 to
f15a374
Compare
Sweep the suite's legacy `@pytest.mark.skip("Needs fixing")` tests and
re-enable the ones that can be made green, fixing a real bug found along the
way.
* fix(aiokafka): bind the lazy span's replacement `finish`. `LazySpan.finish`
was assigned to `span.finish` as a raw (unbound) function, so the later
`span.finish()` call raised "missing 1 required positional argument:
'self'". Lazy spans are used whenever tracing is enabled, so this was a
latent crash; the skipped `test_transform_span_*` tests were hiding it.
Re-enables the four transform-span tests.
* test(aiokafka): the two stream-idle VEP tests called the 2-arg
`_make_slow_processing_error`; it now takes `setting`/`current_value` and
bakes the explanation into the message, so `log.error` no longer receives
those as kwargs. Updated the expectations and re-enabled them.
* test(agent): `test_execute_actor__cancelled_running` (was "Fix is TBD")
passes as-is now -- skip rot -- re-enabled.
The remaining previously-skipped tests need per-test work beyond a re-enable
and stay skipped, but with precise reasons replacing "Needs fixing": the
fetch-timeout VEP asserts (driver behaviour drift) and the `_commit` mock
tests in test_aiokafka.py. Tests needing live infrastructure or a
dependency API refresh (redis cache backend, rocksdb `Options`, the
transaction-manager mocks, the CLI compat-option test, tests/consistency's
stale aiokafka import) are left as they were.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHPL4VFWQRQPpjR1gXSKyL
Continues the skipped-test sweep from the parent branch.
aiokafka (tests/unit/transport/drivers/test_aiokafka.py):
* Test_VEP_no_fetch_since_start::test_timed_out -- the base _consumer fixture
stamps a current poll timestamp, so the NO_FETCH_SINCE_START branch (fires
only when the partition has no poll timestamp yet) could never trigger. Set
state_value().timestamp = None (the real "no fetch request ever sent"
condition) and tighten the asserted tp. Now green.
* test__commit / __CommitFailedError / __IllegalStateError -- _commit filters
offsets by self.assignment() before building the payload; the fixture's
assignment didn't contain TP1, so every offset was filtered out
(commit({})). Point the mocked assignment at TP1 so offsets flow through.
Also dropped the stale supervisor.wakeup() assertions -- those calls were
intentionally removed from _commit's error handlers in 2020 (commit
8d6758f); the crash(exc)/returns-False assertions are kept.
CLI (tests/unit/cli/test_base.py):
* test_compat_option -- the old test asserted on a Mock (option(ctx)._callback
is a Mock attribute, never 33). compat_option wires the real callback via the
click `callback=` kwarg; grab it from opt.kwargs["callback"] and assert its
actual behaviour against faust/cli/base.py: ensure_object(State), value
returned unchanged, stored on the State only when the previous value is None
and the value differs from the option default.
Two response-staleness VEP tests stay skipped, now with an accurate reason:
SLOW_PROCESSING_NO_RESPONSE_SINCE_START and SLOW_PROCESSING_NO_RECENT_RESPONSE
are defined in the driver but never emitted (the broker-response-staleness
tracking was dropped), so they cannot pass without re-adding that source
feature -- out of scope for a test-only change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHPL4VFWQRQPpjR1gXSKyL
wbarnha
force-pushed
the
claude/reenable-remaining-skipped-tests
branch
from
July 21, 2026 00:02
f15a374 to
6692060
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## claude/pypy-agen-cleanup #723 +/- ##
============================================================
+ Coverage 94.18% 94.81% +0.63%
============================================================
Files 104 104
Lines 11154 11154
Branches 1202 1202
============================================================
+ Hits 10505 10576 +71
+ Misses 548 482 -66
+ Partials 101 96 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Re-enables the recoverable
@pytest.mark.skip("Needs fixing" / "Fix is TBD")tests across the aiokafka driver, agents, and CLI, and fixes a real bug a skip was hiding. Independent, offmaster(this consolidates the former #719 + follow-up; #719 is closed in favour of this).Re-enabled (test-only unless noted)
faust/transport/drivers/aiokafka.py+test_aiokafka.py_transform_span_lazyassigned the unboundLazySpan.finishtospan.finish, sospan.finish()crashed withmissing 1 required positional argument: 'self'. Lazy spans run whenever tracing is enabled — a latent crash the 4test_transform_span_*tests were masking. Bound it to the span. (source fix)Test_VEP_stream_idle_*(2) — updated for the_make_slow_processing_error(msg, causes, setting, current_value)signature (the explanation is now baked into the message;log.errorno longer gets those kwargs).Test_VEP_no_fetch_since_start::test_timed_out— the fixture stamped a current poll timestamp so theNO_FETCH_SINCE_STARTbranch could never fire; setstate_value().timestamp = None(the real "no fetch ever sent" condition).test__commit/__CommitFailedError/__IllegalStateError(3) — the mockedassignment()didn't containTP1, so offsets were filtered tocommit({}); point it atTP1. Also dropped the stalesupervisor.wakeup()asserts (those calls were removed from_commitin 2020, commit8d6758f1).test_agent.py—test_execute_actor__cancelled_running("Fix is TBD") passes as-is now (skip rot).test_base.py—test_compat_optionwas asserting on a Mock; it now grabs the realcallbackclosure fromopt.kwargs["callback"]and checks its behaviour againstfaust/cli/base.py(ensure_object(State), value returned unchanged, stored onStateonly when the previous value isNoneand differs from the option default).Left skipped — genuine source gap (flagged, not forced)
Test_VEP_no_response_since_start::test_timed_outandTest_VEP_no_recent_response::test_timed_outstay skipped with an accurate reason:SLOW_PROCESSING_NO_RESPONSE_SINCE_START/NO_RECENT_RESPONSEare defined in the driver but never emitted — the per-TP broker-response-staleness tracking was dropped, so the driver no longer warns when a broker stops responding to fetches (only when it stops being asked). Out of scope for a test-only change; worth a follow-up.Verification
test_aiokafka.py+test_agent.py+test_base.py→ 295 passed, 3 skipped, 0 failed on CPython; flake8/black/isort clean. Fixes were produced under adversarial faithfulness review (no gutted assertions; mocks stand in only for aiokafka/external).🤖 Generated with Claude Code