feat: add TQQQ present package output root gate#45
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9aa858a472
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🤖 Codex PR Review🚫 Merge blocked: 1 serious issue(s) found in high-risk files 🚫 Blocking IssuesThese issues must be fixed before this PR can be merged: 1. 🟠 [HIGH] Security in
|
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72a876cf73
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return final, digest | ||
| except PresentError: | ||
| raise | ||
| except (OSError, ValueError, subprocess.SubprocessError): |
There was a problem hiding this comment.
Convert malformed runner settings into a producer error
A valid TOML configuration can supply a non-scalar runner setting such as taco_opportunity_size_scalar = []; _select_config admits it, and run_market_regime_control_plugin eventually calls float() on that value. That raises TypeError, but this handler catches only OSError, ValueError, and SubprocessError, so main emits an uncaught traceback and exits 1 rather than returning a controlled PresentError/producer error code. Catch TypeError here (or validate runner-facing settings before invoking it).
Useful? React with 👍 / 👎.
| "log_record", "mode", "notification", "plugin", "position_control", "profile", "schema_version", | ||
| "strategy", "strategy_policy", "suggested_action", "target_type", "would_trade_if_enabled", | ||
| } | ||
| SENSITIVE_KEY_PARTS = ("token", "secret", "password", "cookie", "jwt", "api_key") |
There was a problem hiding this comment.
Reject private-key credential settings before packaging
Even with recursive traversal, the denylist does not recognize common credential names such as private_key, access_key, or credential: for example, [strategy_plugins.settings.broker] private_key = "..." passes _contains_sensitive_key and is serialized verbatim by _package_config into the published package. This leaks broker/service credentials whenever those conventional TOML names are used; expand the check or, preferably, allowlist the packageable configuration fields.
Useful? React with 👍 / 👎.
Scope
Adds only the frozen T2B2 QSP PRESENT package producer boundary and its focused tests.
Tests-first evidence
ModuleNotFoundErrorbecause the new module was absent.uv run --extra test pytest -q tests/test_tqqq_market_regime_control_present.py—12 passed.uv run --extra test pytest -q tests/test_strategy_plugin_runner.py tests/test_tqqq_market_regime_control_present.py—47 passed.Validation
The acceptance contract corrected its pytest invocations to the frozen module form. The newly required full command was run exactly once:
uv run --frozen --extra test python -m pytest -q—105 passed in 9.11s.uv run --extra test ruff check src/quant_strategy_plugins/tqqq_market_regime_control_present.py tests/test_tqqq_market_regime_control_present.py— passed.uv run --extra test python -m compileall -q src/quant_strategy_plugins/tqqq_market_regime_control_present.py— passed.git diff --check— passed before staging.No real package artifact was generated. File scope is exactly the two authorized paths.