Originally created by: Akarsh-Hegde
The WORKLOG_SYSTEM ImportError (#365) shipped to production and silently killed worklog drafting because the runtime smoke test never exercised the broken code path. The smoke test:
import agents — only executes agents/__init__, not the submodules, and/health.But endpoint code is imported lazily inside request handlers — /worklog_hour does from agents.worklog_pipeline.workflow import run_hour_workflow → pipeline → the broken from … import WORKLOG_SYSTEM. So the regression sailed past both __init__ and /health and only 500'd once a real worklog hour was processed on a customer machine.
This is a gate gap, independent of how the runtime is triggered — closing it is the highest-value guard against this whole class of bug.
New smoke step (between native import and server boot): walk every agents submodule with pkgutil + importlib and fail the build on any import error. Excludes agents.tests (pytest-only, not shipped). Import ≠ run — no 7 GB model download, no DB.
| Tarball | Result |
|---|---|
Installed runtime with the WORKLOG_SYSTEM regression |
exit 1 at the new step, before boot — flags agents.worklog_pipeline.pipeline + workflow |
| Same runtime with the [#365] fix applied | exit 0 — walk passes, server boots, /health 200, ✓ runtime smoke test passed |
Had this been in place, the broken runtime could never have published.
This is item [#1] of the runtime-pipeline hardening discussed. Items [#2]/#3 (auto-publish staging on pre-main merge; gated production publish on main merge with a version-bump CI check) will follow in their own PR.
🤖 Generated with Claude Code
Originally posted by: coderabbitai[bot]
✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests - [ ] Commit unit tests in branch `ci/harden-runtime-smoke-imports`Comment
@coderabbitai helpto get the list of available commands.Ticket changed by: Akarsh-Hegde