feat: preserve openquant research platform work - #12
Draft
apexphere wants to merge 6 commits into
Draft
Conversation
Wraps jesse CLI as 7 MCP tools (backtest, results, optimize, write_strategy, read_strategy, list_strategies, detector_preview) for autonomous strategy R&D via `python -m openquant_mcp`. Backtest trade data written to disk at ~/.trading-harness/backtest-results/ to avoid Claude context truncation. Closes #8.
8th tool wraps POST /candles/import. Polls active-workers until import completes so the agent knows when data is ready for backtest. Closes #9.
wait_for_session now re-fetches up to 3 times (2s apart) when status=finished but trades are empty while metrics.total > 0. Adds warning field to response when retries are exhausted. Closes #10.
After writing strategies/{name}/__init__.py, the tool runs
git add + commit and returns the short commit hash. Gracefully
returns commit=null if git is unavailable. Closes #11.
Replaced git auto-commit with JSONL version log at
~/.trading-harness/strategy-versions/{name}.jsonl.
Each write appends a timestamped entry with version number,
session_id, and full code. Response includes version/previous_version
for harness traceability. Strategy path is hardcoded in jesse
(strategies/ relative to CWD), so Option B from #11. Closes #11.
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
Preserves five local commits plus the selected research dashboard, diagnostics, regime versioning, strategy library, services, CLI, MCP, and tests before the source Mac user is removed.
Local
.envfiles, Redis dumps, results, storage, temporary debugging scripts, build metadata, and nested worktrees are intentionally excluded.Validation