Skip to content

[async worker] align engine tests with runtime behavior - #460

Merged
ayubun merged 1 commit into
mainfrom
ayu/repair-async-engine-tests
Aug 20, 2026
Merged

[async worker] align engine tests with runtime behavior#460
ayubun merged 1 commit into
mainfrom
ayu/repair-async-engine-tests

Conversation

@ayubun

@ayubun ayubun commented Aug 20, 2026

Copy link
Copy Markdown
Member

Description

Align the async engine recompile tests with the runtime behavior introduced by #454. The GC test now verifies the required collect-then-freeze sequence, and the cycle-break fixture now models the iterable, hashable Sources contract instead of using a plain list.

Related Issues/Tasks

Models used

  • openai/gpt-5.6-sol: ~70%
  • anthropic/claude-opus-4-8: ~20%
  • anthropic/claude-haiku-4-5: ~10%

Testing

  • RED: both targeted tests failed before the change with the observed gc.collect() expectation and missing Sources.hash() errors
  • uv run pytest osprey_async_worker/src/osprey/async_worker/tests/test_engine.py -q (7 passed)
  • uv run pytest osprey_async_worker/src/osprey/async_worker/tests -q (124 passed)
  • uv run ruff check .
  • uv run ruff format --diff osprey_async_worker/src/osprey/async_worker/tests/test_engine.py
  • uv run mypy osprey_async_worker/src/osprey/async_worker/tests/test_engine.py
  • uv tool run fawltydeps --check-unused --pyenv .venv

Checklist

  • Tests pass locally
  • uv run ruff check . passes (no unused imports or other lint errors)
  • uv tool run fawltydeps --check-unused --pyenv .venv passes (no unused dependencies)
  • Updated CHANGELOG.md with my changes, if notable (not applicable; test-only correction)

Summary by CodeRabbit

  • Tests
    • Improved automated coverage for source updates and graph validation.
    • Added checks confirming reliable handling of source collections, iteration, hashing, and memory cleanup sequencing.
    • These tests help protect application stability during updates involving validated sources.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d2227ce-1691-4e0d-aadd-044cc1c8c55f

📥 Commits

Reviewing files that changed from the base of the PR and between ce4e696 and 616d4ed.

📒 Files selected for processing (1)
  • osprey_async_worker/src/osprey/async_worker/tests/test_engine.py

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The test suite now verifies gc.collect() before gc.freeze() during source updates. Graph fixtures use a Sources-compatible mock with iterable contents and a configured hash.

Changes

GC source update test coverage

Layer / File(s) Summary
Source update GC validation
osprey_async_worker/src/osprey/async_worker/tests/test_engine.py
The tests import call and Sources, configure validated.sources as an iterable Sources mock, and verify the gc.collect() then gc.freeze() call order.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 616d4

This PR updates async engine tests to match existing runtime behavior without changing production code; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: exbreder

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes aligning async worker engine tests with the runtime behavior changed in this pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ayu/repair-async-engine-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@ayubun ayubun changed the title Align async engine tests with runtime behavior [async worker] align engine tests with runtime behavior Aug 20, 2026
@ayubun
ayubun marked this pull request as ready for review August 20, 2026 07:39
@ayubun
ayubun requested review from a team, EXBreder, haileyok and vinaysrao1 as code owners August 20, 2026 07:39
@ayubun
ayubun merged commit 2cc43e5 into main Aug 20, 2026
17 checks passed
@ayubun
ayubun deleted the ayu/repair-async-engine-tests branch August 20, 2026 18:17
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.

2 participants