Menu

#369 ci(runtime): smoke-test imports every agents submodule

closed
nobody
None
2026-06-29
2026-06-29
Anonymous
No

Originally created by: Akarsh-Hegde

Why

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:

  1. ran import agents — only executes agents/__init__, not the submodules, and
  2. booted the server + hit /health.

But endpoint code is imported lazily inside request handlers/worklog_hour does from agents.worklog_pipeline.workflow import run_hour_workflowpipeline → 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.

What

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.

Verification (local, against real runtime tarballs)

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.

Follow-ups (separate)

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

https://claude.ai/code/session_01CT9wnEUuQeoBeufqTh46JC

Related

Tickets: #1
Tickets: #2
Tickets: #365

Discussion

  • Anonymous

    Anonymous - 2026-06-29

    Originally posted by: coderabbitai[bot]

    [!IMPORTANT]

    Review skipped

    Auto reviews are disabled on base/target branches other than the default branch.

    Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.


    ⚙️ Run configuration

    Configuration used: Organization UI

    Review profile: ASSERTIVE

    Plan: Pro Plus

    Run ID: 5537e633-18d8-4925-80a3-fc65ec0c2213

    You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

    Use the checkbox below for a quick retry:
    - [ ] 🔍 Trigger review

    ✨ Finishing Touches
    🧪 Generate unit tests (beta) - [ ] Create PR with unit tests - [ ] Commit unit tests in branch `ci/harden-runtime-smoke-imports`

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

     
  • Anonymous

    Anonymous - 2026-06-29

    Ticket changed by: Akarsh-Hegde

    • status: open --> closed
     

Log in to post a comment.