27 KiB
Milestone M2 Completion Audit & M3 Readiness Report (T-204)
Verdict: HOLD M3 — M2 is ~70% complete on the audited feat/audit-m2-completion-status-m3 checkout (branched from master; exact master commit SHA pending host-side git verification), with 7 concrete wiring/contract gaps remaining before M2 closure.
All sandbox-runnable TypeScript, ESLint, contract, and Rust native gates passed in the programmer's sandboxed run on the review checkout (0 errors, 0 warnings), and Studio's unsandboxed review-branch runs (#1597 build and #1598 test suite) passed. Core M2 building blocks — send-ilp (T-190), the 6-tool MCP copilot server, file-mode PIT fundamentals/ceoPosts/teData curaters, QuestDB 10.2.0 schemas, and the TypeScript Feature Library — are landed and tested. However, desktop Claude Code cannot launch the MCP server end-to-end (T-196 entrypoint is absent from the checkout), ceoPosts writes "post" instead of "ceo_post", MarketDataStore rejects crossSection/macroAsOf/fx('1m'), curate-qm-bars-1m has no CLI subcommand, Python stockbot lacks register_signal and M2 store methods, and the live quant QuestDB 10.2.0 preflight, observed split-boundary check, and latency gates remain unverified.
Scope & Provenance Notes
- Audit-only: Zero production code, build config, or CI changes (project CI is off).
- Audited checkout &
masterrelationship: Audited in the task worktree on branchfeat/audit-m2-completion-status-m3(branched frommasterforT-204). Because worktree.gitmetadata lives outside the agent sandbox, the exactmastercommit SHA andstudio/auto-*branch history could not be read here and remain PENDING host-side verification. Every deliverable below was verified directly from source files, exports, CLI parsers, and test execution in this checkout.- Documentation path drift: Milestone and contract docs moved from
docs/todesign/, whileAGENTS.md(lines 43–48),CLAUDE.md(lines 3, 7–11),README.md(lines 7, 9, 11–13, 142, 264, 435), andstudio.config.jsonstill referencedocs/*.md.- Prior M1 deferral: Per settled director decision (
d52aa20), M1 equity eligibility classification and cutoff-separated Parquet benchmarking stay deferred in the backlog and do not block M2.
1. Verification Gate Results & Pending Host Checks
1.1 Programmer Sandbox Runs (Review Worktree feat/audit-m2-completion-status-m3)
Executed inside the agent sandbox (network disabled; zero contact with QA MongoDB 27017/stock or QA PostgreSQL 5432/trading_bot; counts below are attributed to the programmer's sandbox execution without retained log files on disk):
| Gate / Suite | Command | Exit | Programmer-Observed Outcome & Counts |
|---|---|---|---|
| Typecheck | bun run typecheck |
0 |
PASS — 0 errors (tsc --project tsconfig.check.json --noEmit) |
| Contracts | bun run test:contracts |
0 |
PASS — 0 errors (tsc --project tsconfig.contracts.json --noEmit) |
| Lint | bun run lint:check |
0 |
PASS — 0 errors, 0 warnings (--max-warnings 0) |
| Utils | bun run test:utils |
0 |
PASS — 32 pass, 0 fail (59 expects, 3 files) |
| Calculations | bun run test:calculations |
0 |
PASS — 144 pass, 0 fail (76,602 expects, 12 files) |
| Native Rust | CARGO_BUILD_JOBS=2 bun run test:native |
0 |
PASS — 1,548 passed, 0 failed, 4 ignored across 57 suites (engine + curate-etl, incl. tcp_sends_separate_shards_and_half_closes, restatement_of_q1_after_q2_updates_q1_and_ttm_without_overwriting_q2, and the synthetic split_boundary_nvda_and_nexm_match_raw_bars_1d_closes fixture) |
| M2 Research, DuckDB, QuestDB & Scripts | bun test libs/research/ libs/data/duckdb/ libs/data/questdb/ scripts/test/security.test.ts scripts/test/workspace.test.ts |
0 |
PASS — 1,032 pass, 0 fail (80,869 expects, 63 files; includes real-DuckDB fundamentalsAsOf restatement fixture and MCP Vault-fence suite) |
| Postgres Copilot Executor & Unit Suites | bun test libs/data/postgres/test/research-copilot-executor.test.ts libs/data/postgres/test/research-copilot-executor-edge.test.ts test/unit/ |
0 |
PASS — 640 pass, 0 fail (734,988 expects, 44 files) |
Python SDK (python/tests/) |
python3 -m pytest |
N/A | SKIPPED (env) — pytest / python/.venv not installed in the sandbox |
1.2 Studio Unsandboxed Runs & Remaining Host Verification
| Verification | Scope / Command | Status | Notes |
|---|---|---|---|
Studio Build #1597 |
bun run build on review branch feat/audit-m2-completion-status-m3 |
PASS | Reported green by Studio on the review branch. |
Studio Test Run #1598 |
bun --env-file=/home/boki/.studio/test-env/stock-bot.env test && CARGO_BUILD_JOBS=2 cargo test --workspace --lib --offline on review branch feat/audit-m2-completion-status-m3 |
PASS | Reported green by Studio on the review branch (covers Bun test suites including isolated stock_bot_safety* PostgreSQL tests, plus Rust workspace --lib tests). |
Full Host Check & master Provenance |
Record master SHA, inspect studio/auto-* branches, and run CARGO_BUILD_JOBS=2 bun run check (incl. audit:secrets, test:tooling, test:integration, lint:check) + bun --env-file=/home/boki/.studio/test-env/stock-bot.env test test/postgres/ with retained logs |
PENDING | Not covered by Studio runs #1597/#1598; must be executed on the host against the confirmed master revision before M2 closure (see design/m2-gap-audit.md:118-122). |
Research & Financial Invariants Verified Across Passing Suites
- Economic ownership & durable inputs: Quant data curation owns immutable Zstd Parquet partitions (
bars_1d,adj_factors,events,shorts,fx_1d,fundamentals_pit,macro) and QuestDB ILP v2 shards; PostgreSQL owns append-onlytrial_ledger,findings, andprovider_caveats(database/postgres/init/37-research-findings.sql:81-99). - Holdout Vault fence:
createQueryDataTool(libs/research/src/mcp/tools/query-data.ts) andopenResearchCopilotStore(libs/data/duckdb/src/research-copilot-store.ts:40) hardcodevaultOperatorAuthorized: false, rejectscope/vault_evaluation_onlykeys, clamp bounds strictly belowvaultCutoffTs, and drop post-cutoff rows (libs/research/test/mcp-query-data.test.ts). - PIT & synthetic split conservation: Both Rust (
tools/curate-etl/src/fundamentals_tests.rs:104) and real-DuckDB TypeScript (libs/data/duckdb/test/duckdb-market-data-store.test.ts:251,601-626) proveknown_at <= asOfand Q1-after-Q2 restatement non-overwrite. Synthetic Rust fixtures (tools/curate-etl/src/bars_1m_tests.rs:107,220andtools/curate-etl/src/run_curate_bars_1m_tests.rs:377-402) proveNEXM.V(1:20) andNVDA.US(10:1) split arithmetic and ex-date boundary handling within0.5%, while observed-data comparison against retained rawbars_1dcloses remains open (run_curate_bars_1m_tests.rs:396-400). - Database & execution safety: Read-only MongoDB/Postgres adapters verified; zero paper/live execution write access in research/MCP surfaces.
2. M2 Deliverables & Exit Criteria Matrix
2.1 Deliverables (design/MILESTONES.md lines 87–98)
| Area | Status | Landed in Checkout (Exact Evidence) | Concrete Gaps Remaining |
|---|---|---|---|
| M2.1 Research Copilot MCP & Notebook Snapshots | PARTIAL | All 6 tools wired in createResearchCopilotMcpServer (libs/research/src/mcp/copilot-server.ts:13-20,48); stdio host (libs/research/src/mcp/host/stdio-host.ts); Postgres adapters (libs/research/src/mcp/adapters/postgres-copilot.ts, postgres-trial-ref.ts, library-cards.ts, exchange-calendars.ts, bar-session-dates.ts); openResearchCopilotExecutor (libs/data/postgres/src/research-copilot-executor.ts); openResearchCopilotStore (libs/data/duckdb/src/research-copilot-store.ts:33); SQL schema (database/postgres/init/37-research-findings.sql); exportNotebookSnapshot (libs/research/src/notebook-snapshot.ts:594, notebook-snapshot-node.ts:67). |
(1) T-196 desktop entrypoint scripts/research-copilot-mcp.ts and "mcp:research-copilot" in package.json are missing; apps/stock/web-api/src/ has no optional SSE wrapper. (2) openResearchCopilotStore (libs/data/duckdb/src/research-copilot-store.ts:37) opens daily DuckDB only instead of composing createRoutedMarketDataStore + createQuestDbIntradayBarsReader for 1m queries. (3) analyze_signal (libs/research/src/mcp/tools/analyze-signal.ts:121-123) restricts signal.source to 'shorts' | 'fundamentals' (no ceoPosts, macro, or materialized features). (4) exportNotebookSnapshot has no CLI or MCP entrypoint and no end-to-end MCP study + marimo check-clean HTML + file_finding verification test. |
M2.2 PIT Fundamentals, ceoPosts & Lagged teData |
PARTIAL | File-mode CLIs curate-fundamentals, curate-posts, and curate-macro wired in tools/curate-etl/src/cli.rs:99-101,1295,1573,1684 and main.rs:228,238,250; Rust Q1-after-Q2 restatement test (tools/curate-etl/src/fundamentals_tests.rs:104); real-DuckDB TS fundamentalsAsOf implementation & restatement test (libs/research/src/market-data-store-duckdb.ts:2287, libs/data/duckdb/test/duckdb-market-data-store.test.ts:251). |
(1) EVENT_KIND_POST = "post" (tools/curate-etl/src/parquet_posts.rs:22) mismatches 'ceo_post' required by libs/research/src/market-data-store-duckdb.ts:108, libs/research/src/event-panel.ts:63, and python/stockbot/data.py:21, and run_curate_posts fails closed (EventsDatasetExists, tools/curate-etl/src/run_curate_posts.rs:133,389) if <out>/events already exists from curate-events; both TS (market-data-store-duckdb.ts:1448) and Python (python/stockbot/data.py:71) only glob events/year=*/part.parquet. (2) createDuckDbMarketDataStore().macroAsOf (libs/research/src/market-data-store-duckdb.ts:2294-2296) throws MarketDataStoreNotImplementedError, blocking read-back of macro/part.parquet (note: per design/DATA-CONTRACTS.md:26, teData holds final-revised values only and must remain restricted to coarse lagged regime filters, not historical release signals without vintage data). (3) SourceCollection (tools/curate-etl/src/mongo_stream.rs:53-62) allowlists only the 8 M1 collections — no --from-mongo streaming for qmFinancials, qmFinancials-old, ceoPosts, or teData, and curate-fundamentals lacks --qm-financials-old merging. (4) Python stockbot.data.MarketDataStore (python/stockbot/data.py) lacks fundamentals_as_of and macro_as_of. |
M2.3 QuestDB 10.2.0 Intraday & send-ilp (T-190) |
PARTIAL | T-190 send-ilp CLI landed (tools/curate-etl/src/cli.rs:102,2290, main.rs:260, ilp_send.rs, ilp_send_tests.rs loopback TcpListener tests); curate-bars-1m and curate-fx-1m CLIs wired (cli.rs:97-98, main.rs:208,218); M2_INTRADAY_SCHEMAS (libs/data/questdb/src/schema.ts:13-63) with PARTITION BY MONTH, WAL, SYMBOL CAPACITY 65536 NOCACHE, DEDUP UPSERT KEYS; docker-compose.quant.yml:35-39,52-53 (nofile: 1048576, QDB_RAM_USAGE_LIMIT_BYTES=21474836480); synthetic NEXM.V (1:20) and NVDA.US (10:1) split fixtures (bars_1m_tests.rs:107,220, run_curate_bars_1m_tests.rs:377-402). |
(1) run_curate_qm_bars_1m (tools/curate-etl/src/run_curate_qm_bars_1m.rs, T-185) is not wired into cli.rs/main.rs (no curate-qm-bars-1m subcommand). (2) MarketDataStore.fx({ timeframe: '1m' }) throws MarketDataStoreNotImplementedError in TS (libs/research/src/market-data-store-duckdb.ts:1529-1530, delegated unchanged by createRoutedMarketDataStore at libs/research/src/market-data-store-routed.ts:184-186) and NotImplementedError in Python (python/stockbot/data.py:259). (3) No --from-mongo streaming for eodIntraday1M (3.40B docs) or qmIntraday (173.3M docs). (4) Live quant preflight (vm.max_map_count >= 1048576, effective container nofile = 1048576, WAL DDL), binary-double (0x10) TCP ILP v2 acceptance (tools/curate-etl/src/ilp_send.rs:15-21), observed NEXM.V/NVDA.US comparison against retained raw bars_1d, and pinned PGWire 1-year 1m read benchmark (< 250 ms warm / < 1 s cold) are all unverified. |
M2.4 Versioned Feature Library (D04 / D11) |
PARTIAL | TS registerSignal, runFeatureBatch, and Zstd Parquet writer landed (libs/research/src/feature-library.ts); built-in RET_1D_V1 (feature-library.ts:2166). |
(1) createDuckDbMarketDataStore().crossSection (libs/research/src/market-data-store-duckdb.ts:2283-2285) throws MarketDataStoreNotImplementedError, blocking read-back of materialized features/<name>/v<version>/ Parquet. (2) FEATURE_INPUT_DATASETS (libs/research/src/feature-library.ts:61-68) omits 'macro' (coarse regime filters only per DATA-CONTRACTS.md:26) and 'corporate_actions', and registers only 'RET_1D_V1'. (3) Python stockbot (python/stockbot/__init__.py, data.py, signals.py) lacks cross_section and register_signal (D04/D11). |
2.2 Exit Criteria (design/MILESTONES.md lines 100–103)
| Exit Criterion | Status | Evidence & Remaining Blocker |
|---|---|---|
EC-1: Desktop Claude Code via MCP runs a fundamental + alt-data signal study and event study end-to-end, exports a marimo check-clean static HTML snapshot, and files a finding. |
OPEN | All 6 MCP tools and exportNotebookSnapshot exist as libraries, but scripts/research-copilot-mcp.ts / "mcp:research-copilot" (T-196) is missing, ceoPosts cannot be read via event_study ("post" vs "ceo_post"), and no end-to-end MCP → HTML snapshot → file_finding verification exists. |
EC-2: Restatement fixture test proves a restated Q1 (known_at > Q2) never overwrites Q2 in fundamentalsAsOf. |
SATISFIED (Offline Fixture) | Proven in both Rust (tools/curate-etl/src/fundamentals_tests.rs:104) and real-DuckDB TypeScript (libs/data/duckdb/test/duckdb-market-data-store.test.ts:251,601-626), both passing in sandbox and Studio test run #1598. |
EC-3: Split-boundary test on NEXM.V (1:20) and NVDA.US (10:1) confirms bars_1m session closes match raw bars_1d closes within 0.5%, and 1y of 1m bars loads in < 250 ms warm / < 1 s cold. |
OPEN (Synthetic Only) | Synthetic Rust fixtures (tools/curate-etl/src/bars_1m_tests.rs:107,220, run_curate_bars_1m_tests.rs:377-402) pass for split arithmetic only and explicitly leave observed comparison against retained raw bars_1d open (run_curate_bars_1m_tests.rs:396-400). Still open on quant: (1) effective vm.max_map_count >= 1048576 & container nofile = 1048576 preflight before bulk load; (2) live QuestDB 10.2.0 binary-double (0x10) TCP ILP v2 acceptance; (3) observed NEXM.V + NVDA.US bars_1m vs. retained raw bars_1d close check (<= 0.5%); and (4) pinned 1-year single-listing PGWire benchmark (QuestDBClient.query → createQuestDbIntradayBarsReader) recording listing ID, date range, cache conditions, and expected vs. actual row counts against < 250 ms warm / < 1 s cold. |
3. Candidate Causes: Why M2 Auto Mode May Have Parked 3 Consecutive Tasks
No parked task receipts or Auto Mode run logs are available inside the sandbox, so none of the four items below can be attributed to a specific parked task yet. Separating what is directly observed in the checkout from what remains inferred pending host history/log inspection:
- Missing
T-196desktop MCP entrypoint (observed in checkout; branch-reset cause inferred/unverified):scripts/research-copilot-mcp.tsand"mcp:research-copilot"inpackage.jsonare absent from the checkout, whereasT-190(send-ilp) andcurate-macroare present. Any Auto Mode task expecting a runnable desktop MCP entrypoint would hit an immediate blocker. WhetherT-196was dropped during astudio/auto-*branch reset remains unverified until host-side branch history is inspected (design/m2-gap-audit.md:119). docs/*→design/*path drift (observed in checkout; park attribution unverified):AGENTS.md(L43–48),CLAUDE.md(L3, L7–11),README.md(L7, L9, L11–13, L142, L264, L435),studio.config.json, and older task prompts still point todocs/*.md, which can cause agents to fail path checks against the renameddesign/directory.- Sandbox boundary friction for
.git, PostgreSQL, andquant(observed environment constraint; park attribution unverified): Runningbun run check,audit:secrets, worktree-git tests (scripts/test/),PIPELINE_TEST_DATABASE_URL(127.0.0.1:5432) suites, or livequantQuestDB checks inside the agent sandbox fails by design; tasks without explicit host/sandbox separation can park on those expected errors. - Unqueued Option B
--from-mongoextension for M2 collections (observed in checkout; park attribution unverified): The2026-11-30addendum indesign/data-pipeline/rust-migration-evaluation.md(lines 253–294) locked Option B (tools/curate-etl --from-mongo) for M1 and scoped M2's 6 collections (qmFinancials,qmFinancials-old,ceoPosts,teData,eodIntraday1M,qmIntraday) to M2, butSourceCollection(tools/curate-etl/src/mongo_stream.rs:53-62) still allowlists only the 8 M1 collections.
4. Concrete Blockers Needing Director Decisions
- Option B
--from-mongofor M2 collections vs..bsonstaging: Should we extendtools/curate-etlSourceCollectionwith--from-mongostreaming for the 6 M2 collections (qmFinancials,qmFinancials-old,ceoPosts,teData,eodIntraday1M,qmIntraday), or close M2 in file-mode.bsonstaging?- Recommended: Extend
--from-mongoto the 6 M2 collections (reusing the M1ReadOnlyMongoClient+ChunkedMongoRawDocumentSourcepattern) so3.40BeodIntraday1Mdocs never require~500–832 GiBof intermediate.bsonscratch files.
- Recommended: Extend
- Canonical
ceoPostseventkind&<out>/eventsco-publishing: Shouldtools/curate-etl/src/parquet_posts.rsswitchEVENT_KIND_POSTfrom"post"to"ceo_post"and co-publish alongsidecurate-eventsunder<out>/events/year=YYYY/(either by writingpart-posts.parquetand updating both readers —libs/research/src/market-data-store-duckdb.ts:1448andpython/stockbot/data.py:71— fromevents/year=*/part.parquettoevents/year=*/*.parquet, or by merging posts into yearlypart.parquet), or keep posts in a separate curated root?- Recommended: Change
EVENT_KIND_POSTto"ceo_post", writeevents/year=YYYY/part-posts.parquet, and update both TS (market-data-store-duckdb.ts:1448) and Python (python/stockbot/data.py:71) readers to globevents/year=*/*.parquet(verified by a combined read-back fixture with filings, earnings, and an edited CEO post in the same curated root) socurate-eventsandcurate-postsremain independently re-runnable without hiding posts from either reader.
- Recommended: Change
- Live
quantQuestDB10.2.0preflight, observed split check & latency gate for M2 closure: Should M2 closure require an operator-runquantQuestDB10.2.0verification covering host/container limits (vm.max_map_count,nofile), binary-double (0x10) TCP ILP v2 acceptance, observedNEXM.V+NVDA.USbars_1mvs. retained rawbars_1dcloses (<= 0.5%), and a pinned 1-year single-listing PGWire latency benchmark (< 250 mswarm /< 1 scold), or accept synthetic-fixture closure and defer all livequantchecks to an ops follow-up (matching the M1d52aa20precedent)?- Recommended: Require a small-slice (
NEXM.V+NVDA.US, 1 year) operator verification onquantcovering all four checks above before closing M2, while deferring full3.40B-row backfill to an ops runbook.
- Recommended: Require a small-slice (
5. M3 Readiness Mapping & Recommended Task Order
Verdict: Do not start M3 yet. M2 must close first, and M3's core engine, screener, and validation deliverables are unstarted on this checkout.
5.1 M3 Deliverables & Exit Criteria Readiness Map (design/MILESTONES.md lines 111–128)
| M3 Item | Status | Target Files & Current Checkout Evidence |
|---|---|---|
Tier 1 Columnar Screener (MILESTONES.md:112-113) |
NOT STARTED | Append-only trial_ledger SQL exists (database/postgres/init/36-trial-ledger.sql), and libs/calculations/src/index.ts exports deflatedSharpeRatio, effectiveIndependentTrials, analyzeSignalPanel, eventStudy, evaluateRecencyGate. No Polars/DuckDB portfolio sweep, M_{T \times N} writer, or CSCV PBO (S = 16) yet. |
Tier 2 Rust financial/ Multi-Asset Upgrades (MILESTONES.md:114-119) |
NOT STARTED | apps/stock/engine/Cargo.toml has no parquet/arrow-rs crates yet; apps/stock/orchestrator/src/backtest/{native-worker,candidate-sandbox}.ts still use the single-series JSON/IPC path. Task 1 (retire backtest_datasets JSONB/IPC/N-API bar path), atomic timestamp-slice marks (F06), simultaneous Target sell-netting, feature side-channel, and USD/CAD Margin + corporate actions/delisting in apps/stock/engine/src/financial/* are all unstarted. |
Validation Suite & Engine Consolidation (MILESTONES.md:120-123) |
PARTIAL (SQL only) | vault_evaluations table with <= 10/year cap & append-only triggers exists (database/postgres/init/36-trial-ledger.sql:44-138), and apps/stock/analytics / SimulationExecution are already absent from the repo. Purged Walk-Forward/CPCV, stability surface, ADV capacity, US/CA factor exposure, human Vault Holdout Gate workflow, and retirement of legacy f64 BacktestEngine (apps/stock/engine/src/backtest/engine.rs:17, apps/stock/engine/src/api/backtest.rs:13) remain NOT STARTED. |
M3 EC-1: Rust unit + differential accounting fixtures (MILESTONES.md:126) |
OPEN | Atomic hedged mark neutrality, 100%-invested Sell A + Buy B target rotation, split + dividend 8-decimal conservation, USD/CAD margin interest, TSX board-lot sizing, and SIVB delisting liquidation fixtures are not yet implemented. |
M3 EC-2: 20y US+CA daily backtest (~5,000+ listings) in < 30 s on quant (MILESTONES.md:127) |
OPEN | Blocked on Tier 2 Parquet/Arrow-rs path + multi-asset engine upgrades. |
M3 EC-3: Real M2 signal via register_signal end-to-end (MILESTONES.md:128) |
OPEN | Blocked on M2 Python register_signal + crossSection read-back and M3 Tier 1/Tier 2/CPCV/Vault gate. |
5.2 Ordered Task List to Finish M2 (8 Tasks)
- Restore
T-196desktop MCP entrypoint & wire routed intraday store: Addscripts/research-copilot-mcp.ts+"mcp:research-copilot"inpackage.json, and updateopenResearchCopilotStore(libs/data/duckdb/src/research-copilot-store.ts) to composecreateRoutedMarketDataStore+createQuestDbIntradayBarsReaderwhen QuestDB config is present. - Fix
ceoPostskind = 'ceo_post',<out>/eventsco-publishing & reader globs: ChangeEVENT_KIND_POSTintools/curate-etl/src/parquet_posts.rsto"ceo_post", co-publishceoPostsunder<out>/events/year=YYYY/(either writingpart-posts.parquetand updating bothlibs/research/src/market-data-store-duckdb.ts:1448andpython/stockbot/data.py:71to globevents/year=*/*.parquet, or merging into yearlypart.parquet), and add a combined read-back fixture containing filings, earnings, and an edited CEO post in the same curated root. - Implement
MarketDataStore.macroAsOf,crossSection, andfx('1m'): Implement DuckDB read-back formacro/part.parquet(macroAsOf, enforcing/documenting thedesign/DATA-CONTRACTS.md:26coarse lagged regime-filter-only limit sinceteDatalacks release vintages) and versionedfeatures/<name>/v<version>/(crossSection) inlibs/research/src/market-data-store-duckdb.ts, and routefx({ timeframe: '1m' })to QuestDBfx_1minlibs/research/src/market-data-store-routed.ts. - Wire
curate-qm-bars-1mCLI & expand Feature Library inputs: Exposecurate-qm-bars-1mintools/curate-etl/src/{cli,main}.rs, add'macro'(restricted to lagged regime filters perDATA-CONTRACTS.md:26until vintage data exists) and'corporate_actions'toFEATURE_INPUT_DATASETSinlibs/research/src/feature-library.ts, and extend MCPanalyze_signalto support materializedfeatures(andceoPosts/ regime-onlymacroas needed). - Add Python
stockbotM2 parity ®ister_signal(D04/D11): Exposefundamentals_as_of,macro_as_of(regime-only),cross_section,fx(..., timeframe='1m'), andregister_signal(...)inpython/stockbot/with offlinepytestcoverage. - Extend
curate-etl --from-mongoto the 6 M2 collections (subject to Director Decision 1): AddqmFinancials,qmFinancials-old(with--qm-financials-oldmerge),ceoPosts,teData,eodIntraday1M, andqmIntradaytoSourceCollectionintools/curate-etl/src/mongo_stream.rs. - Add M2 Exit Criterion 1 end-to-end verification & doc path cleanup: Add a CLI/MCP wrapper + end-to-end test covering MCP study →
marimo check-clean HTML snapshot (exportNotebookSnapshot) →file_finding, and update staledocs/links inAGENTS.md,CLAUDE.md,README.md, andstudio.config.jsontodesign/. - Operator
quantQuestDB10.2.0preflight, observed split check & latency benchmark (Exit Criterion 3): Before bulk load, verify onquanteffectivevm.max_map_count >= 1048576, containerulimits.nofile = 1048576, memory limits, andgetM2IntradayDDL()WAL tables; runsend-ilpon a smallNEXM.V+NVDA.US1-year slice to verify0x10binary-double acceptance andwal_tables()health via PGWire; compare observedNEXM.V(1:20) andNVDA.US(10:1)bars_1msession closes against retained rawbars_1dcloses (<= 0.5%); and run a pinned 1-year single-listing1mbenchmark throughQuestDBClient.query→createQuestDbIntradayBarsReader(re-verifying viacreateRoutedMarketDataStoreonce wired) recording listing ID, date range, cache conditions, and expected vs. actual row counts against< 250 mswarm /< 1 scold.
5.3 Initial M3 Prerequisite Sequence (Once M2 Closes)
- Retire JSON-over-Postgres/IPC/N-API bar path (M3 Task 1): Add
parquet/arrow-rstoapps/stock/engine/Cargo.toml, store(hash, manifest, parquet_paths)inbacktest_datasets, and lift single-series TS gates innative-worker.ts. - Tier 1 Columnar Screener & CSCV PBO (
S = 16): Implement CSCVPBOand Purged Walk-Forward/CPCV inlibs/calculations, plus vectorized Polars/DuckDB portfolio sweeps loggingM_{T \times N}matrices totrial_ledger. - Tier 2 Rust
financial/multi-asset upgrades & legacy retirement: Implement atomic timestamp-slice marks (F06), simultaneousTargetsell-netting, feature side-channel,USD/CADMargin + corporate-action/delisting accounting (with all 6 M3 EC-1 fixtures), human Vault Holdout Gate workflow, and retirement of legacyf64BacktestEngine.