personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

doctor: probe canonical editable-install module

sol_importable_check was probing import sol, but there is no top-level
sol package. The editable install registers think as the top-level module,
so the probe either skipped with no .venv or failed on every install.

The Makefile already uses the canonical form
from think.sol_cli import main at lines 69 and 72.

Update the probe to match that import and update the match string and
detail strings to reference think instead of sol.

Keep the check name sol_importable to avoid rename churn.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+16 -7
+11 -5
scripts/doctor.py
··· 329 329 return make_result(check, "skip", ".venv absent; run make install") 330 330 probe = run_probe( 331 331 check, 332 - [str(python_bin), "-c", "import sol"], 332 + [str(python_bin), "-c", "from think.sol_cli import main"], 333 333 cwd=Path("/"), 334 334 timeout=2.0, 335 335 allow_nonzero=True, ··· 339 339 if isinstance(probe, CheckResult): 340 340 return probe 341 341 if probe.returncode == 0: 342 - return make_result(check, "ok", "import sol succeeded outside repo cwd") 342 + return make_result( 343 + check, 344 + "ok", 345 + "from think.sol_cli import main succeeded outside repo cwd", 346 + ) 343 347 stderr = probe.stderr.strip() 344 - if "ModuleNotFoundError: No module named 'sol'" in stderr: 348 + if "ModuleNotFoundError: No module named 'think'" in stderr: 345 349 return make_result( 346 350 check, 347 351 "fail", 348 - "ModuleNotFoundError: No module named 'sol'", 352 + "ModuleNotFoundError: No module named 'think'", 349 353 fix, 350 354 ) 351 355 first_line = next((line for line in stderr.splitlines() if line.strip()), "") 352 356 detail = truncate( 353 - first_line or f"import sol failed with exit {probe.returncode}", 120 357 + first_line 358 + or f"from think.sol_cli import main failed with exit {probe.returncode}", 359 + 120, 354 360 ) 355 361 return make_result(check, "fail", detail, fix) 356 362
+5 -2
tests/test_doctor.py
··· 176 176 ) 177 177 result = doctor.sol_importable_check(args(doctor)) 178 178 assert result.status == "ok" 179 + assert ( 180 + result.detail == "from think.sol_cli import main succeeded outside repo cwd" 181 + ) 179 182 180 183 def test_fail_on_module_not_found(self, doctor, monkeypatch, tmp_path): 181 184 monkeypatch.setattr(doctor, "ROOT", tmp_path) ··· 187 190 "run_probe", 188 191 lambda *_args, **_kwargs: doctor.ProbeOutput( 189 192 "", 190 - "Traceback (most recent call last):\nModuleNotFoundError: No module named 'sol'\n", 193 + "Traceback (most recent call last):\nModuleNotFoundError: No module named 'think'\n", 191 194 1, 192 195 ), 193 196 ) 194 197 result = doctor.sol_importable_check(args(doctor)) 195 198 assert result.status == "fail" 196 - assert "ModuleNotFoundError" in result.detail 199 + assert result.detail == "ModuleNotFoundError: No module named 'think'" 197 200 198 201 def test_fail_on_other_exception(self, doctor, monkeypatch, tmp_path): 199 202 monkeypatch.setattr(doctor, "ROOT", tmp_path)