Skip to content
Kitbay
Skill

blocking-io-guard

MITUpdated on Nov 11, 202685,246GitHub starsIncludes scripts

A contributor skill in ByteDance's DeerFlow repository for making sure async Python backend code that could block the event loop is covered by a runtime test.

What the skill teaches

A contributor skill in ByteDance's DeerFlow repository for making sure async Python backend code that could block the event loop is covered by a runtime test. It scans either the contributor's own diff before a pull request or the whole repository, sorts each finding into already offloaded (add a guard test), blocking (offload it, then add a test) or no action with a recorded reason, and writes or extends an anchor test that drives the exact code path. A mandatory step reintroduces the blocking call to prove the test fails, then restores the fix to see it pass. The pull request lists every finding, its outcome and the red-to-green evidence.

Capabilities

  • Scan Python async code for calls that block the event loop
  • Sort findings into guard, fix or no-action
  • Write anchor tests and prove they fail without the fix