0.10.0-beta.4 — auto-quant zero-config + workspace isolation#180
Merged
Conversation
…space isolated data Two related fixes for the auto-quant template: **1. Zero-config bootstrap** — drop the `AQ_TEMPLATE_DIR` requirement that D11 of the workspaces plan made mandatory. The bootstrap script now clones `https://github.com/TraderAlice/Auto-Quant.git` into a managed mirror at `$AQ_LAUNCHER_ROOT/auto-quant-mirror/` on first use, then makes per-workspace local clones from there. Users who already have Auto-Quant checked out somewhere specific can still override via `AQ_TEMPLATE_DIR`. Effect: a fresh OpenAlice install can create auto-quant workspaces with no env setup. **2. Per-workspace isolated data** — drop the shared `$AQ_SHARED_DATA_DIR` symlink dance. Each workspace's `user_data/data/` is now a real directory; `prepare.py` fetches OHLCV into the workspace itself rather than into a process-global cache shared across all workspaces. Trade-off: each workspace re-runs `prepare.py` (disk + network cost). Reasoning: Auto-Quant's data schema may evolve between releases (different timeframes, asset sets, .feather column layouts); a shared cache would silently mix incompatible files across workspace generations with no clean migration path. Isolation makes upgrade-by- rebuild trivial and protects existing workspaces from new-workspace- driven cache mutations. Consequence: `AQ_SHARED_DATA_DIR` and the TS-side `ensureSharedData()` helper are now dead weight. Cleaned up: - `src/workspaces/bootstrap-data.ts` deleted - `src/workspaces/config.ts` drops `sharedDataDir` from `ServerConfig` and the `AQ_SHARED_DATA_DIR` env reading - `src/workspaces/service.ts` drops the `ensureSharedData()` call and the field from `bootstrapEnv` - `src/workspaces/workspace-creator.ts` drops `sharedDataDir` from `BootstrapEnv` and the `AQ_SHARED_DATA_DIR` from the env passed to bootstrap scripts Verified live: fresh-mirror clone path (~2s on first create incl. network), warm-mirror path (~1s on subsequent creates, no network), power-user override path (`AQ_TEMPLATE_DIR` honoured), `tsc --noEmit` clean, `pnpm test` 88 files / 1687 tests passing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Patch release fixing critical auto-quant template usability gaps that landed in beta.3: - **Zero-config auto-quant**: bootstrap.sh now clones the public Auto- Quant repo (https://github.com/TraderAlice/Auto-Quant) into a managed mirror on first use. `AQ_TEMPLATE_DIR` is no longer required; it remains as a power-user override pointing at a pre-existing local clone. - **Per-workspace data isolation**: each workspace owns its own `user_data/data/` rather than a shared symlinked cache. Auto-Quant schema evolution between releases stays clean — no cross-workspace contamination, no migration script needed for the shared cache. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Patch release on top of #179 fixing critical auto-quant template usability gaps:
AQ_TEMPLATE_DIRwas mandatory — D11 of the original Workspaces plan made the env var required (no default), so on a fresh OpenAlice install, picking the auto-quant template gavebootstrap_failedwith a raw bash:?parameter-expansion error. Open-source users had no way to know that env var existed.Shared K-line cache was the wrong abstraction for forward compatibility — Auto-Quant's data schema may evolve between releases (different timeframes, asset sets, .feather column layouts). A
$AQ_SHARED_DATA_DIRsymlinked across all workspaces would silently mix incompatible files with no clean migration path.Fixes
auto-quant/bootstrap.shnow clones fromhttps://github.com/TraderAlice/Auto-Quant.gitinto a managed mirror at$AQ_LAUNCHER_ROOT/auto-quant-mirror/on first use, then makes per-workspace local clones from there.AQ_TEMPLATE_DIRstays as a power-user override (use your own Auto-Quant checkout).user_data/data/is a real directory;prepare.pyfetches OHLCV per-workspace. Trade is disk + first-run network cost per workspace; gain is upgrade-by-rebuild safety + no cross-workspace contamination.AQ_SHARED_DATA_DIRno longer used. Deletedsrc/workspaces/bootstrap-data.ts; trimmedservice.ts/workspace-creator.ts/config.ts.Full commit log
Test plan
npx tsc --noEmitcleanpnpm test— 88 files, 1687 tests passingrm -rf ~/.openalice/workspaces/auto-quant-mirrorthen create auto-quant workspace → clones in ~2s, workspace gets a real (empty)user_data/data/~/.openalice/workspaces/dataauto-createdauto-quanttemplate, type a tag, create — no env required, workspace materialisesuv run prepare.pyfetches OHLCV into the workspace's ownuser_data/data🤖 Generated with Claude Code