Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

refactor(research): replace local strategy compilation with rara-strategies CLI (#189)#190

Merged
crrow merged 3 commits intomainfrom
issue-189-strategy-cli
Apr 1, 2026
Merged

refactor(research): replace local strategy compilation with rara-strategies CLI (#189)#190
crrow merged 3 commits intomainfrom
issue-189-strategy-cli

Conversation

@crrow
Copy link
Copy Markdown
Collaborator

@crrow crrow commented Apr 1, 2026

Summary

  • Delete local rara-strategy-api v1 crate, depend on rara-strategies' strategy-api v2
  • Rewrite compiler.rs: local cargo build --target wasm32-wasip1rara-strategy build CLI wrapper
  • Migrate all strategy types: Signal/RiskLevelsStrategyOutput { score, factors }
  • Delete strategies/template/ (templates now live in rara-strategies repo)
  • Net reduction: -386 lines (20 files, +448/-834)

Key Changes

  • API v1 → v2: StrategyHandle::on_candles() returns StrategyOutput instead of Signal; risk_levels() removed
  • Compiler: StrategyCompiler now shells out to rara-strategy build CLI, writes code to scratch strategy in rara-strategies repo
  • Promoter: No longer recompiles; loads artifact from StrategyStore directly
  • Signal loop: Score-based interpretation (score > 0.1 = buy, < -0.1 = sell)

Test plan

  • cargo check — zero warnings
  • cargo test — all passed (11 tests)
  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • CI green

Closes #189

🤖 Generated with Claude Code

crrow and others added 3 commits April 1, 2026 19:49
…tegies CLI (#189)

- Delete `crates/rara-strategy-api` (v1), depend on rara-strategies' `strategy-api` (v2)
- Rewrite `compiler.rs` from local `cargo build` to `rara-strategy build` CLI wrapper
- Update `StrategyHandle` trait: `Signal` → `StrategyOutput`, remove `risk_levels()`
- Update `wasm_executor.rs`: remove `wasm_risk_levels()`, parse `StrategyOutput`
- Update `signal_loop.rs`: score-based signal interpretation (score > threshold = buy)
- Update `strategy_promoter.rs`: remove compiler dep, load artifact from store
- Update `strategy_coder.rs`: LLM prompts target v2 API format
- Delete `strategies/template/` directory (templates now in rara-strategies)

Closes #189

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Switch strategy-api from local path to HTTPS git dependency pointing
at the now-public rararulab/rara-strategies repository.

Closes #189

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@crrow crrow merged commit ca2e5cf into main Apr 1, 2026
8 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(research): replace local strategy compilation with rara-strategies CLI

1 participant