Closes #021-hotfix - Dynamic feedback loop logging ticker alignment

This commit is contained in:
Antigravity Agent
2026-06-14 13:42:43 +02:00
parent 23b15881d1
commit 8e53ac95ed
2 changed files with 12 additions and 6 deletions

View File

@@ -253,6 +253,11 @@ This document tracks all modifications, npm packages, active compilation states,
* **Ensemble Mapping Correction**: Fixed the prediction probability mapping by refactoring `getPredictionProb` to accept and evaluate the specific `ticker` context parameter. This completely resolved the SVM mirroring anomaly and accurately calculates consensus averages from the correct asset data.
* **Multi-Asset Logging & Filtering**: Exchanged the single-asset BTC log for a dynamic multi-asset log. Added a sleek, glassmorphic asset filter tab-bar containing `[ BTC ]`, `[ ETH ]`, and `[ SOL ]` buttons right above the feedback loop table, filtering logs dynamically per active asset. Logs preserve respective entry price snapshots and 15-probability matrices in `localStorage`.
## [2026-06-14] - Active-Log Multi-Asset Ticker Hotfix (#ISSUE-021-HOTFIX)
### Modified
* **Active Learning Feedback Loop Logging Context**: Refactored `handleLogManualForecast` inside `CryptoDemo.tsx` to dynamically query and snapshot ticker data (symbol, real-time price, and full 15-cell ML matrix) from the active feedback tab filter (`feedbackFilterAsset`) instead of the top-level coin select (`activeCoin`). Updated the logged success feedback banner dynamically as well.
### Active Bugs / Compile Status
* **Active Bugs**: None.
* **Type Checker Status**: Verified 100% clean type verification (`npx tsc --noEmit` returns exit code 0).

View File

@@ -533,22 +533,23 @@ export default function CryptoDemo() {
// Manual logging of active forecast for all 15 models & horizons
const handleLogManualForecast = () => {
const entryPrice = parseFloat(activeCoin.price.replace(/[^0-9.]/g, ''));
const logCoin = customCoins[feedbackFilterAsset] || coins[feedbackFilterAsset] || defaultCoins[feedbackFilterAsset];
const entryPrice = parseFloat(logCoin.price.replace(/[^0-9.]/g, ''));
// Save snapshot of all predictions
const predictionsMap: Record<string, Record<string, number>> = {};
ESTIMATORS.forEach((est) => {
predictionsMap[est.id] = {
T1: getPredictionProb(activeCoin.ticker, est.id, 'T1'),
T5: getPredictionProb(activeCoin.ticker, est.id, 'T5'),
T10: getPredictionProb(activeCoin.ticker, est.id, 'T10')
T1: getPredictionProb(logCoin.ticker, est.id, 'T1'),
T5: getPredictionProb(logCoin.ticker, est.id, 'T5'),
T10: getPredictionProb(logCoin.ticker, est.id, 'T10')
};
});
const now = Date.now();
const newForecast: Forecast = {
id: 'fc-' + now,
ticker: activeCoin.ticker,
ticker: logCoin.ticker,
entryPrice,
resolved: false,
timestamp: now,
@@ -564,7 +565,7 @@ export default function CryptoDemo() {
setForecasts(nextForecasts);
localStorage.setItem('crypto_bayes_forecasts', JSON.stringify(nextForecasts));
setLearningLoopLog(`Registered active multi-model forecast for ${activeCoin.ticker} at $${entryPrice}. Evaluating T+1 (24h), T+5 (5d), and T+10 (10d).`);
setLearningLoopLog(`Registered active multi-model forecast for ${logCoin.ticker} at $${entryPrice}. Evaluating T+1 (24h), T+5 (5d), and T+10 (10d).`);
setTimeout(() => setLearningLoopLog(''), 8000);
};