import type { TuningSession } from '../src/training/types'; const objectives = { velocity_tracking: 0.35, action_smoothness: 0.2, posture_stability: 0.15, fall_avoidance: 0.15, foot_slip: 0.1, energy: 0.05, }; export function tuningFixture(): TuningSession { const baseConfig = { weights: { pose: 1 }, params: {} }; const resultConfig = { weights: { pose: 1.1 }, params: {} }; return { id: 'a'.repeat(32), state: 'awaiting_approval', mode: 'approval', createdAt: '2026-01-01T00:00:00Z', updatedAt: '2026-01-01T00:02:00Z', config: { taskId: 'Unitree-Go2-Flat', mode: 'approval', runName: '界面验收会话', numEnvs: 16, seed: 42, gpuIds: [0], trialCount: 2, initialIterations: 300, middleIterations: 900, finalIterations: 2000, evalNumEnvs: 8, evalSteps: 10, objectiveWeights: objectives, fallbackEnabled: false, rungs: [300, 900, 2000], promote: [2, 2, 2], }, objectiveWeights: objectives, message: 'paused', bestTrialId: '2'.repeat(32), consecutiveNoImprove: 0, fallbackEnabled: false, trials: [ { id: '1'.repeat(32), sessionId: 'a'.repeat(32), number: 0, state: 'completed', rung: 0, targetIterations: 300, rewardConfig: baseConfig, score: 0, eligible: true, createdAt: '2026-01-01T00:00:00Z', message: 'done', }, { id: '2'.repeat(32), sessionId: 'a'.repeat(32), number: 1, state: 'completed', rung: 0, targetIterations: 300, rewardConfig: resultConfig, proposalId: '3'.repeat(32), score: 0.12, eligible: true, evaluation: { metrics: { linear_velocity_rmse: 0.2 }, score: { score: 0.12, eligible: true, components: { velocity_tracking: 0.2 } }, }, createdAt: '2026-01-01T00:01:00Z', message: 'done', }, ], proposals: [ { id: '3'.repeat(32), sessionId: 'a'.repeat(32), baseTrialId: '1'.repeat(32), state: 'pending', source: 'agent', patch: { weights: { pose: 1.1 }, params: {} }, rationale: '提高姿态奖励以降低躯干倾角。', expectedImpact: { posture_stability: '姿态误差预计下降 8%' }, confidence: 0.82, createdAt: '2026-01-01T00:00:30Z', }, ], audit: [], control: { runPolicy: 'step', dispatchTokens: 0, constraintsRevision: 0, constraints: {}, effectiveAfterCurrent: false, }, }; }