Skip to content

fix(strix): resolve strix.interface.main package-attribute shadow crash - #1783

Merged
seonghobae merged 1 commit into
mainfrom
fix/strix-timeout-compat-main-shadow
Sep 3, 2026
Merged

fix(strix): resolve strix.interface.main package-attribute shadow crash#1783
seonghobae merged 1 commit into
mainfrom
fix/strix-timeout-compat-main-shadow

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Every Strix run org-wide has been crashing in ~2 seconds since f59bad1 (2026-09-01) merged the CWL_STRIX_UNBOUNDED_INFERENCE=1 compat launcher — before any LLM call, always with AttributeError: 'function' object has no attribute 'asyncio'. Confirmed live against a real completed run (DiagramWeave run 33598375361, job 100146441461).
  • Root cause: strix/interface/__init__.py in strix-agent 1.5.3 runs from .main import main, which rebinds the package attribute strix.interface.main to the imported function, shadowing the submodule of the same name. from strix.interface import main as strix_main (and import strix.interface.main as strix_main, which also resolves via attribute traversal) both return the function, not the module — so strix_main.asyncio = ... fails.
  • Since the gate script fails the required check closed on any non-zero exit, this has been hard-failing Strix's required check on every single PR across the org since the launcher merged — a direct, severe contributor to the standing "적체" (queue backlog) complaint, independent of and likely more impactful than the concurrency-scoping issues fixed earlier this session (fix(ci): restore PR-scoped concurrency for strix.yml on owner directive #1779, fix(opencode-review): drop head-SHA concurrency scoping, structurally close #1568 instead #1781).
  • Fix: look the submodule up directly in sys.modules by its exact dotted path, which the __init__.py shadow never touches. Verified end-to-end against a real, freshly uv venv-installed strix-agent==1.5.3 (not just a synthetic mock) — the fix resolves strix_main to the true submodule with a real asyncio module attribute and callable main.
  • The existing test suite's synthetic strix.interface fake never replicated this shadow (it set the package attribute directly to the module object, which is not how the real __init__.py behaves), so it never caught the crash. Updated both existing fakes to replicate the real shadowing and added a dedicated regression test (test_runtime_compatibility_survives_the_package_level_main_shadow) that reproduces it.

Test plan

  • coverage run -m pytest tests/test_strix_llm_timeout_contract.py -q — 16 passed (new regression test included)
  • coverage run -m pytest tests -q — 2681 passed, 1 skipped, 21 subtests passed
  • coverage report — 100% (scripts/ci/strix_timeout_compat.py: 100%)
  • interrogate — 100% docstring coverage on the changed file
  • Verified against a real strix-agent==1.5.3 install in an isolated uv venv (not just the synthetic test fakes): confirmed the exact live crash reproduces with the old code and is resolved with the fix

🤖 Generated with Claude Code


Devin Review

strix/interface/__init__.py in strix-agent 1.5.3 runs `from .main import
main`, which rebinds the package attribute `strix.interface.main` to the
`main` function it imports, shadowing the submodule of the same name.
`from strix.interface import main as strix_main` therefore returned the
function, not the module, and `strix_main.asyncio = ...` raised
`AttributeError: 'function' object has no attribute 'asyncio'` on every
single invocation of the launcher this repo installs for every Strix run
(CWL_STRIX_UNBOUNDED_INFERENCE=1 is set unconditionally by the installer).

Confirmed live: every sampled completed Strix run across the org crashes in
~2 seconds, before any LLM call, with this exact traceback (e.g.
DiagramWeave run 33598375361, job 100146441461) -- and the gate script fails
the required check closed on any non-zero exit, so this has been failing
Strix's required check on every PR org-wide since the launcher merged
(f59bad1, 2026-09-01).

Fix: look the submodule up directly in sys.modules by its exact dotted
path, which the shadow never touches (verified against a real strix-agent
1.5.3 install). The existing test suite's synthetic strix.interface fake
never replicated the shadow (it set the package attribute directly to the
module), so it never caught the crash the real package produces -- updated
both fakes to replicate the real __init__.py's shadowing behavior and added
a dedicated regression test that reproduces it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 7e9f4347-8b03-407e-94da-1361de413d55

📥 Commits

Reviewing files that changed from the base of the PR and between 8141b99 and 75c0e54.

📒 Files selected for processing (2)
  • scripts/ci/strix_timeout_compat.py
  • tests/test_strix_llm_timeout_contract.py

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.

@seonghobae
seonghobae merged commit 87352d9 into main Sep 3, 2026
7 of 19 checks passed
@seonghobae
seonghobae deleted the fix/strix-timeout-compat-main-shadow branch September 3, 2026 06:04

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

seonghobae added a commit that referenced this pull request Sep 3, 2026
No conflicts; picked up main's strix.interface shadow-crash fix
(#1783, peer 1) and strix.yml cleanup-job dedup (#1784). Full suite
(2705 tests) passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant