cis490-doctor: e2e shipper --ping picks up dev-dir shipper package when run from a manual clone #12

Closed
opened 2026-04-30 16:08:26 -05:00 by elliott · 1 comment
Owner

Context

Running cis490-doctor --role lab-host from inside a manual dev clone (/home/elliottk/.env/CIS490/) instead of from /opt/cis490.

What happened

The e2e check subprocesses sudo -u cis490 /opt/cis490/.venv/bin/python -m shipper .... Python adds the calling process CWD to sys.path, so it finds /home/elliottk/.env/CIS490/shipper/ before /opt/cis490/shipper/. The traceback references the dev-clone path:

File "/home/elliottk/.env/CIS490/shipper/__main__.py", line ...

Same issue affects the tier3: module catalog parses check which reports No module named exploits for the same reason.

What was tried

Running the doctor directly as /opt/cis490/.venv/bin/python /opt/cis490/tools/cis490_doctor.py (production path) avoids the issue. It is a latent bug in the doctor subprocess call.

Suggested next step

In tools/cis490_doctor.py, when spawning the shipper --ping subprocess, set cwd=/opt/cis490 explicitly (or use the REPO_ROOT the doctor already knows) so Python does not inherit the caller CWD on its sys.path.

Refs spectral/CIS490 Dev_REL1_043026 bring-up.

## Context Running `cis490-doctor --role lab-host` from inside a manual dev clone (`/home/elliottk/.env/CIS490/`) instead of from `/opt/cis490`. ## What happened The e2e check subprocesses `sudo -u cis490 /opt/cis490/.venv/bin/python -m shipper ...`. Python adds the calling process CWD to `sys.path`, so it finds `/home/elliottk/.env/CIS490/shipper/` before `/opt/cis490/shipper/`. The traceback references the dev-clone path: ``` File "/home/elliottk/.env/CIS490/shipper/__main__.py", line ... ``` Same issue affects the `tier3: module catalog parses` check which reports `No module named exploits` for the same reason. ## What was tried Running the doctor directly as `/opt/cis490/.venv/bin/python /opt/cis490/tools/cis490_doctor.py` (production path) avoids the issue. It is a latent bug in the doctor subprocess call. ## Suggested next step In `tools/cis490_doctor.py`, when spawning the shipper --ping subprocess, set `cwd=/opt/cis490` explicitly (or use the `REPO_ROOT` the doctor already knows) so Python does not inherit the caller CWD on its `sys.path`. Refs spectral/CIS490 Dev_REL1_043026 bring-up.
Owner

Fixed in 95ac56a as part of the Dev_REL2_043026 merge (same root cause as issue #10 bug 3b). _run() now takes a cwd kwarg and check_end_to_end passes cwd='/opt/cis490' for the shipper --ping subprocess, so Python's CWD-on-sys.path heuristic doesn't pick up a dev clone. main() also inserts repo_root into sys.path so the inline 'from exploits.modules import …' check works regardless of where the doctor was invoked from.

Fixed in 95ac56a as part of the Dev_REL2_043026 merge (same root cause as issue #10 bug 3b). _run() now takes a cwd kwarg and check_end_to_end passes cwd='/opt/cis490' for the shipper --ping subprocess, so Python's CWD-on-sys.path heuristic doesn't pick up a dev clone. main() also inserts repo_root into sys.path so the inline 'from exploits.modules import …' check works regardless of where the doctor was invoked from.
max closed this issue 2026-04-30 16:14:23 -05:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: bolyai/CIS490#12
No description provided.