Skip to content

[codex] Expand smoke coverage and docs#202

Merged
limsiokuan merged 2 commits into
mainfrom
codex/smoke-doc-coverage-review
Jun 26, 2026
Merged

[codex] Expand smoke coverage and docs#202
limsiokuan merged 2 commits into
mainfrom
codex/smoke-doc-coverage-review

Conversation

@evanlow

@evanlow evanlow commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a maintained smoke-test manifest and applies the smoke marker during pytest collection.
  • Updates tests/run_all_smoke.py so smoke coverage can be run with python tests/run_all_smoke.py or pytest -m smoke.
  • Adds autonomous package coverage to pytest coverage settings.
  • Documents smoke-test commands and autonomous API coverage in the README/testing/API docs.
  • Refreshes the test coverage analysis document for the current autonomous/evidence-learning safety surface.
  • Keeps assisted-live/live-runner tests aligned with the fail-closed live market-data guard by using explicit test stubs instead of weakening runtime protections.

Safety Notes

  • No production trading behavior was changed.
  • Live trading remains gated by existing assisted-live, confirmation, live market-data, account, risk, recovery, and emergency-stop controls.
  • Test changes provide healthy fake IBKR market-data inputs only inside focused unit/smoke tests.

Validation

  • python -m pytest tests/test_documentation.py --basetemp=.pytest-tmp-pr-docs --no-cov -q --tb=short -> 46 passed, 2 skipped
  • python -m pytest tests/test_profile_comparison.py --basetemp=.pytest-tmp-pr-profile --no-cov -q --tb=short -> 24 passed
  • python -m pytest tests/test_order_lifecycle.py tests/test_recovery_manager.py --basetemp=.pytest-tmp-pr-lifecycle-recovery --no-cov -q --tb=short -> 20 passed
  • python tests/run_all_smoke.py --basetemp=.pytest-tmp-pr-smoke3 --no-cov -q --tb=short -> 1040 passed, 2047 deselected

Known Notes

  • The working tree still contains untracked .pytest-tmp* directories from local test runs; they were not staged or pushed.

@limsiokuan limsiokuan marked this pull request as ready for review June 26, 2026 13:17
@limsiokuan limsiokuan requested a review from Copilot June 26, 2026 13:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands and documents the project’s safety-critical smoke-test coverage by introducing a maintained smoke-suite manifest, applying a smoke marker during pytest collection, and updating smoke-runner/docs/coverage settings to reflect the autonomous + evidence-learning surface area.

Changes:

  • Added tests/smoke_manifest.py and updated pytest collection to automatically apply the smoke marker to the manifest’s modules; smoke suite can run via pytest -m smoke.
  • Updated tests/run_all_smoke.py to run the marker-based smoke suite (and to default to --no-cov unless coverage is requested).
  • Updated coverage configuration and documentation (README/testing/API reference/coverage analysis) to reflect autonomous endpoints and safety-critical smoke expectations.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tests/test_recovery_manager.py Adds a live-market-data provider stub and wires it into the live runner tests.
tests/test_order_lifecycle.py Adds a live-market-data provider stub and wires it into the live runner tests.
tests/test_autonomous_engine.py Updates assisted-live tests to pass explicit market-data guard configuration.
tests/test_autonomous_engine_basket.py Updates assisted-live basket test config to pass explicit market-data guard configuration.
tests/test_assisted_live_stop_requirement.py Updates assisted-live planner tests to pass explicit market-data guard configuration.
tests/smoke_manifest.py Introduces a centralized inventory of smoke-suite test modules.
tests/run_all_smoke.py Switches smoke runner from a hard-coded file list to running -m smoke and normalizes passthrough args.
tests/conftest.py Applies the smoke marker during collection based on tests/smoke_manifest.py.
README.md Documents smoke-test commands and fixes a formatting indentation issue at EOF.
pytest.ini Adds autonomous to coverage targets and registers the smoke marker; updates coverage source list.
docs/WEB_API_REFERENCE.md Adds an “Autonomous Trading API” section and updates the table of contents accordingly.
docs/TESTING.md Documents how to run the smoke suite and how it’s maintained.
docs/TEST_COVERAGE_ANALYSIS.md Refreshes coverage analysis to focus on current safety-critical autonomous/evidence-learning posture.
docs/README.md Adds smoke-test command to docs quick-start.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_order_lifecycle.py Outdated
pass

def latest_quote(self, symbol):
if str(symbol).upper() == self.quote.symbol:
Comment thread tests/test_recovery_manager.py Outdated
pass

def latest_quote(self, symbol):
if str(symbol).upper() == self.quote.symbol:
Comment thread tests/test_autonomous_engine.py Outdated
cfg = AutonomousTradingConfig(
mode=AutonomousMode.ASSISTED_LIVE,
allow_live_execution=False,
market_data_health_guard_enabled=False,
Comment thread tests/test_autonomous_engine.py Outdated
cfg = AutonomousTradingConfig(
mode=AutonomousMode.ASSISTED_LIVE,
allow_live_execution=True,
market_data_health_guard_enabled=False,
Comment thread tests/test_autonomous_engine.py Outdated
mode=AutonomousMode.ASSISTED_LIVE,
allow_live_execution=True,
require_user_confirmation=True,
market_data_health_guard_enabled=False,
Comment thread tests/test_autonomous_engine_basket.py Outdated
cfg = _basket_config(
mode=AutonomousMode.ASSISTED_LIVE,
allow_live_execution=True,
market_data_health_guard_enabled=False,
AutonomousTradingConfig(
mode=AutonomousMode.ASSISTED_LIVE,
require_stop_price_for_assisted_live=True,
market_data_health_guard_enabled=False,
AutonomousTradingConfig(
mode=AutonomousMode.ASSISTED_LIVE,
require_stop_price_for_assisted_live=True,
market_data_health_guard_enabled=False,
Copilot AI requested a review from limsiokuan June 26, 2026 13:31
@limsiokuan limsiokuan merged commit 7a4be1f into main Jun 26, 2026
@limsiokuan limsiokuan deleted the codex/smoke-doc-coverage-review branch June 26, 2026 13:42
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.

4 participants