feat(scripts): export rule-precision backtest corpus as checksummed JSON#8102
Conversation
…SON (JSONbored#8084) Add a pure buildBacktestCorpusManifest/checksumCases core (mirroring export-d1-core) plus a thin wrangler D1 CLI that snapshots one rule's fired/override audit_events into a portable labeled corpus file. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8102 +/- ##
=======================================
Coverage 92.01% 92.01%
=======================================
Files 755 755
Lines 77201 77201
Branches 23337 23338 +1
=======================================
Hits 71034 71034
Misses 5061 5061
Partials 1106 1106
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Hi @JSONbored, |
|
Nothing |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-22 22:49:12 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
scripts/backtest-corpus-export-core.ts:checksumCases+buildBacktestCorpusManifest(same canonicalize-then-SHA-256 + optionalmetaspread asexport-d1-core).scripts/backtest-corpus-export.tsCLI: wrangler D1 read ofsignal.rule_fired:<ruleId>/signal.human_override:<ruleId>, reconstruct events likesignal-tracking-wire, runbuildBacktestCorpus, write pretty JSON.Closes #8084
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpx vitest run test/unit/backtest-corpus-export-core.test.ts— 5 passednpm run build --workspace @loopover/enginenpm run test:workersnpm run build:mcpnpm run build:minernpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
export-d1-core; the CLI wrapper is intentionally untested (same precedent asexport-d1-data.ts).scripts/**is ignored by Codecov.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
N/A — CLI export script; no UI.
Notes
buildBacktestCorpus/BacktestCase) — already on main via feat(calibration): pure BacktestCase corpus builder from fired/override events #8093.audit_eventsonly; AMS event-ledger export out of scope.tsx scripts/backtest-corpus-export.ts --rule-id <ruleId> --output <file.json> [--remote] [--since-date <iso>]