Docs / Validate documentation (push) Canceled after 0s
Docs / Deploy GitHub Pages (push) Canceled after 0s
CI Final Summary (AI) / AI Final Summary (push) Canceled after 0s
CI Final Summary (AI) / Push/PR event feed (push) Canceled after 0s
CI / CI Integrity and Change Classification (push) Canceled after 0s
CI / Code Quality & Tests (push) Canceled after 0s
Dependency Lock & Migration Safety / Dependency drift (lock vs pyproject) (push) Canceled after 0s
Dependency Lock & Migration Safety / Migration safety (fail-loud + version postconditions) (push) Canceled after 0s
JS Tests / Frontend JS Unit Tests (push) Canceled after 0s
Security / CodeQL Analysis (push) Canceled after 0s
Security / Trivy Vulnerability Scan (push) Canceled after 0s
Tests (OS Matrix) / Py Tests (macos-latest) (push) Canceled after 0s
Tests (OS Matrix) / Py Tests (windows-latest) (push) Canceled after 0s
CI / Extended Validation (Tier 2) (push) Canceled after 0s
CI / Heavy CI (database-provider) (push) Canceled after 0s
CI / Heavy CI (e2e) (push) Canceled after 0s
CI / Heavy CI (integration) (push) Canceled after 0s
CI / Heavy CI (model-validation) (push) Canceled after 0s
CI / Heavy CI (research-backtest) (push) Canceled after 0s
CI / Aggregate CI Results (push) Canceled after 0s
Full project import for the self-hosted code hosting (https://code.aifunny.ltd/gavindiaz/my-NexusTradingForexBot.git). Includes the live-freshness + scaler-hash fixes for the permanent STALE dashboard (tick_pipeline now_utc stamps; infer_probabilities computes model_input_hash on the actual scaled 70D tensor), the data-fetch default-path fix, the g29 web-auth test fixes, and a Chinese user manual (使用手册.md) for the web dashboard. Scratch diagnostic scripts (check*.py, contain a live web-auth token) and the .kilo/ agent-worktree directory are gitignored, not committed. Co-Authored-By: Claude Code <noreply@anthropic.com>
55 lines
1.8 KiB
Python
55 lines
1.8 KiB
Python
"""Shared fixture helpers for the Agent-2 log-hygiene regression suite.
|
|
|
|
Seeds UNKNOWN_PROVENANCE orphan rows into a real ExperienceLedger the same
|
|
way the production sweep classifies them (no dispatch row + no gate signal
|
|
=> honest unknown provenance).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from datetime import UTC, datetime
|
|
|
|
|
|
def seed_unknown_orphans(ledger, *, count: int) -> None:
|
|
"""Creates `count` executed+closed experiences with NO outcome and NO
|
|
dispatch evidence -> evaluate_sample() == UNKNOWN_PROVENANCE."""
|
|
from nexus_scalp.experience.models import (
|
|
ExperienceRecord,
|
|
FeatureSnapshot,
|
|
StrategyContext,
|
|
)
|
|
|
|
base = datetime(2026, 8, 18, tzinfo=UTC)
|
|
for i in range(count):
|
|
rec = ExperienceRecord(
|
|
experience_id=f"exp_orphan_{i:05d}",
|
|
request_id=f"req_orphan_{i:05d}",
|
|
idempotency_key=f"idem_orphan_{i:05d}",
|
|
symbol="XAUUSD",
|
|
timeframe="M1",
|
|
decision_timestamp=base,
|
|
strategy_id="strat_flood",
|
|
strategy_version="1.0.0",
|
|
context=StrategyContext(
|
|
strategy_id="strat_flood",
|
|
symbol="XAUUSD",
|
|
session="LONDON",
|
|
regime="TRENDING",
|
|
volatility_regime="NORMAL",
|
|
trend_state="BULLISH",
|
|
),
|
|
feature_snapshot=FeatureSnapshot(
|
|
feature_schema_id="scalp_v1", feature_dimension=50, values=[0.0] * 50
|
|
),
|
|
action="BUY_LIMIT",
|
|
entry_reason="SMC",
|
|
model_probability=0.6,
|
|
signal_confidence=0.6,
|
|
proposed_entry=2000.0,
|
|
stop_loss=1990.0,
|
|
take_profit=2020.0,
|
|
risk_reward_ratio=2.0,
|
|
approved_volume=0.1,
|
|
)
|
|
ledger.record_experience(rec)
|