Skip to content

fix: validate dial timeouts before ATD - #293

Draft
Justinabox wants to merge 1 commit into
mainfrom
agent/dial-timeout-validation-20260730
Draft

fix: validate dial timeouts before ATD#293
Justinabox wants to merge 1 commit into
mainfrom
agent/dial-timeout-validation-20260730

Conversation

@Justinabox

Copy link
Copy Markdown
Owner

Summary

  • validate public CallService.dial() timeouts before call state changes, logging, or ATD writes
  • reject zero, negative, boolean, non-finite, and non-numeric timeout values with a generic ValueError
  • redact outbound dial commands in executor debug/error display without changing the actual command sent to the modem

Closes #288.

Verification

  • git diff --check
  • PYTHONPATH=. uv run --no-project --with pytest --with pytest-asyncio --with pytest-aiohttp --with pyserial-asyncio --with aiosqlite pytest tests/test_call_service.py tests/test_executor.py -q → 130 passed
  • PYTHONPATH=. uv run --no-project --with pytest --with pytest-asyncio --with pytest-aiohttp --with pyserial-asyncio --with aiosqlite pytest tests/ -q → 1102 passed

Risks

  • Narrow validation and log-display-only change. Real modem writes are covered by mock-transport tests; no hardware was contacted.

@Justinabox

Copy link
Copy Markdown
Owner Author

Release review: needs-fix before landing.

The dial-timeout validation is fail-closed before FSM mutation and modem I/O, but the new executor privacy rule only redacts ATD...;. Modem.execute() exposes raw AT commands, so ATD<destination> without the terminal semicolon (and whitespace-suffixed variants) still appears in executor DEBUG TX/RX/timeout logging.

Please make ATD command redaction fail closed across raw command forms, and add focused executor/raw-AT regressions covering non-semicolon and whitespace variants in TX, echoed RX, idle delayed echo, and timeout diagnostics. Preserve the current public timeout behavior. Re-run the full repository gate after the fresh RED/GREEN test cycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate CallService.dial timeout before sending ATD

1 participant