Skip to content

[BACK-001] Backtest counterfactual provider and evidence export #11

Description

@mrnicholasbcarter-code

User story

Expose Monte Carlo, fee, walk-forward, and tear-sheet results as verification/counterfactual evidence.

Problem and target state

The current audit identifies a gap that blocks the policy-first, ecosystem-neutral Verdict control plane. Implement the smallest coherent slice described here; preserve existing behavior outside this boundary.

Scope and likely files

src/backtest_harness/, docs/ARCHITECTURE.md, tests/

Acceptance criteria

  • Inputs, random seeds, fee model, code version, and dataset references are recorded; outputs are reproducible; no live execution/network side effects; Core VerificationResult and EvidenceChain adapters pass.

Dependencies and references

Depends on VER-009 and VER-011.

Verification plan

  • Add or update fixtures at the contract boundary.
  • Test success, denial, degraded, unavailable, timeout, and malformed-input paths where applicable.
  • Demonstrate that advisory learning/retrieval/provider data cannot weaken hard policy.

Required implementation evidence

  • Targeted unit tests and negative-path tests
  • Integration/conformance test at the relevant repository boundary
  • Security/privacy review for any boundary, persistence, provider, or execution change
  • Documentation and migration notes updated
  • git diff --check and repository verification commands pass
  • Evidence receipt or reproducible test artifact linked in the implementation PR

Definition of done

  • Contract and implementation are versioned and backwards-compatibility impact is documented
  • Failure, timeout, stale-provider, unknown, and denial states are explicit
  • No learning, retrieval, UI, or external provider can bypass Core eligibility or envelope enforcement
  • Reviewers can reproduce the acceptance evidence from a clean checkout

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions