Summary
The README documents HTTP server mode after installing .[sqlite], but aiohttp is not declared in pyproject.toml as either a default dependency or an optional server extra. In a clean environment that follows the documented dependency set, importing/running server.py fails before any modem setup.
Evidence
Docs and packaging:
README.md:35-43 installation says pip install -e ".[sqlite]".
README.md:68-83 then documents python server.py and HTTP endpoints.
pyproject.toml:10-21 declares only pyserial-asyncio by default and only aiosqlite under the sqlite extra; no aiohttp / pytest-aiohttp runtime server extra exists.
server.py:10-11 imports aiohttp / aiohttp.web at module import time.
Clean-environment repro, intentionally installing only the documented runtime pieces (pyserial-asyncio plus aiosqlite) and using PYTHONPATH=. to avoid editable-install side effects:
rm -rf /tmp/callstack-clean-env && uv venv /tmp/callstack-clean-env >/dev/null
/tmp/callstack-clean-env/bin/python -m pip install pyserial-asyncio aiosqlite >/dev/null 2>&1
PYTHONPATH=. /tmp/callstack-clean-env/bin/python - <<'PY'
try:
import server
print('import server: ok')
except Exception as exc:
print(f'import server: {type(exc).__name__}: {exc}')
PY
PYTHONPATH=. /tmp/callstack-clean-env/bin/python - <<'PY'
try:
import callstack
from callstack import ModemConfig
print(f'import callstack + ModemConfig: ok {ModemConfig.__name__}')
except Exception as exc:
print(f'import callstack: {type(exc).__name__}: {exc}')
PY
Observed output:
import server: ModuleNotFoundError: No module named 'aiohttp'
import callstack + ModemConfig: ok ModemConfig
Baseline health from this scout run:
git diff --check
# exit 0
PYTHONPATH=. uv run --no-project --with pytest --with pytest-asyncio --with pytest-aiohttp --with pyserial-asyncio --with aiosqlite pytest tests/ -q
# first run: 1 transient failure in tests/test_sms_service.py::test_receive_cmti
# immediate focused rerun: passed
# immediate full rerun: 314 passed in 4.22s
Duplicate checks run before filing:
gh issue list --state all --search 'aiohttp server.py optional dependency pyproject in:title,body'
gh issue list --state all --search 'HTTP server install extra aiohttp in:title,body'
gh issue list --state all --search 'server.py ModuleNotFoundError aiohttp in:title,body'
# only unrelated #22 CLI issue surfaced in one broad search
Expected behavior
A user following the documented installation path for HTTP server mode should either:
- get
aiohttp installed automatically, or
- be told to install a documented optional extra such as
.[server] or .[server,sqlite] before running python server.py.
Actual behavior
The documented .[sqlite] dependency set is enough for SQLite persistence but not enough for server.py; the first import server fails with ModuleNotFoundError: No module named 'aiohttp' in a clean environment.
Suggested fix direction
- Add a runtime server extra, for example:
[project.optional-dependencies]
server = [
"aiohttp>=3.9",
]
- Consider a convenience extra such as
all = ["callstack[sqlite,server]"] if setuptools metadata supports it cleanly.
- Update README HTTP Server Mode / installation snippets to use the correct extra, e.g.
pip install -e ".[server,sqlite]".
- Keep test-only
pytest-aiohttp under dev/test dependencies rather than server runtime dependencies.
Acceptance criteria
Verification gates
git diff --check
python -m venv /tmp/callstack-server-extra-check
/tmp/callstack-server-extra-check/bin/python -m pip install -e ".[server,sqlite]"
/tmp/callstack-server-extra-check/bin/python -c "import server; print('server import ok')"
PYTHONPATH=. uv run --no-project --with pytest --with pytest-asyncio --with pytest-aiohttp --with pyserial-asyncio --with aiosqlite pytest tests/ -q
Summary
The README documents HTTP server mode after installing
.[sqlite], butaiohttpis not declared inpyproject.tomlas either a default dependency or an optional server extra. In a clean environment that follows the documented dependency set, importing/runningserver.pyfails before any modem setup.Evidence
Docs and packaging:
README.md:35-43installation sayspip install -e ".[sqlite]".README.md:68-83then documentspython server.pyand HTTP endpoints.pyproject.toml:10-21declares onlypyserial-asyncioby default and onlyaiosqliteunder thesqliteextra; noaiohttp/pytest-aiohttpruntime server extra exists.server.py:10-11importsaiohttp/aiohttp.webat module import time.Clean-environment repro, intentionally installing only the documented runtime pieces (
pyserial-asyncioplusaiosqlite) and usingPYTHONPATH=.to avoid editable-install side effects:Observed output:
Baseline health from this scout run:
Duplicate checks run before filing:
Expected behavior
A user following the documented installation path for HTTP server mode should either:
aiohttpinstalled automatically, or.[server]or.[server,sqlite]before runningpython server.py.Actual behavior
The documented
.[sqlite]dependency set is enough for SQLite persistence but not enough forserver.py; the firstimport serverfails withModuleNotFoundError: No module named 'aiohttp'in a clean environment.Suggested fix direction
all = ["callstack[sqlite,server]"]if setuptools metadata supports it cleanly.pip install -e ".[server,sqlite]".pytest-aiohttpunder dev/test dependencies rather than server runtime dependencies.Acceptance criteria
pyproject.tomldeclares the runtime dependency needed byserver.py.python -c "import server"after following the documented server install command.Verification gates