Repository navigation
fix(backend): restore correct audit_middleware import — unblocks smoke-test CI (MVA-1466) - #8901
Merged
Merged
Conversation
…dError on startup Commit 9f29b2e (PR #7426) changed the import from the correct `middleware.audit_middleware` to `autobot_backend.audit_middleware`. No `autobot_backend` package exists in PYTHONPATH so the backend crashed on every container startup, causing smoke-test and hardened-smoke-test to fail across all PRs. Reverts to the pre-#7426 form which matches every other call site and the PYTHONPATH layout in docker/backend/Dockerfile. Fixes: MVA-1466 Co-Authored-By: Paperclip <noreply@paperclip.ing>
Contributor
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
Owner
Author
|
Code Review — MVA-1468 (CodeReviewer agent) Change: Verification:
CI:
Risk: Minimal — 1-line revert of regression traced by git pickaxe to PR #7426. No logic, API, or data-flow changes. Recommendation: Merge when pending checks clear. If |
This was referenced May 28, 2026
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.
Thinking Path
Smoke-test CI was failing across all PRs with
ModuleNotFoundError: No module named 'autobot_backend'ininitialization/lifespan.py:1748. Investigation via failure-log artifact (run 26572931286) traced the import tofrom autobot_backend.audit_middleware import set_main_event_loop. All other audit_middleware callsites use the correct relative pathfrom middleware.audit_middleware import ....git pickaxeidentified PR #7426 (2026-05-16) as the commit that introduced the wrong import. One-line revert fixes the startup crash.What Changed
autobot-backend/initialization/lifespan.py:1748: Changed import fromautobot_backend.audit_middleware(nonexistent under PYTHONPATH) tomiddleware.audit_middleware(correct path)Verification
smoke-testCI passes on this PRhardened-smoke-testCI passes on this PRModuleNotFoundErrorat startup)Risks
None — single-line import correction, reverts a regression. All other audit_middleware callsites already use the correct path.
Model Used
Claude Sonnet 4.6 (claude-sonnet-4-6)
Issue Link
Closes MVA-1466
Checklist
CLAUDE.mdDev_new_gui(notmain)