[codex] Expand smoke coverage and docs#202
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.pyand updated pytest collection to automatically apply thesmokemarker to the manifest’s modules; smoke suite can run viapytest -m smoke. - Updated
tests/run_all_smoke.pyto run the marker-based smoke suite (and to default to--no-covunless 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.
| pass | ||
|
|
||
| def latest_quote(self, symbol): | ||
| if str(symbol).upper() == self.quote.symbol: |
| pass | ||
|
|
||
| def latest_quote(self, symbol): | ||
| if str(symbol).upper() == self.quote.symbol: |
| cfg = AutonomousTradingConfig( | ||
| mode=AutonomousMode.ASSISTED_LIVE, | ||
| allow_live_execution=False, | ||
| market_data_health_guard_enabled=False, |
| cfg = AutonomousTradingConfig( | ||
| mode=AutonomousMode.ASSISTED_LIVE, | ||
| allow_live_execution=True, | ||
| market_data_health_guard_enabled=False, |
| mode=AutonomousMode.ASSISTED_LIVE, | ||
| allow_live_execution=True, | ||
| require_user_confirmation=True, | ||
| market_data_health_guard_enabled=False, |
| 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, |
…ket-data health guard in tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
smokemarker during pytest collection.tests/run_all_smoke.pyso smoke coverage can be run withpython tests/run_all_smoke.pyorpytest -m smoke.Safety Notes
Validation
python -m pytest tests/test_documentation.py --basetemp=.pytest-tmp-pr-docs --no-cov -q --tb=short-> 46 passed, 2 skippedpython -m pytest tests/test_profile_comparison.py --basetemp=.pytest-tmp-pr-profile --no-cov -q --tb=short-> 24 passedpython -m pytest tests/test_order_lifecycle.py tests/test_recovery_manager.py --basetemp=.pytest-tmp-pr-lifecycle-recovery --no-cov -q --tb=short-> 20 passedpython tests/run_all_smoke.py --basetemp=.pytest-tmp-pr-smoke3 --no-cov -q --tb=short-> 1040 passed, 2047 deselectedKnown Notes
.pytest-tmp*directories from local test runs; they were not staged or pushed.