diff --git a/stress/serp-dualpath-optimize.ts b/stress/serp-dualpath-optimize.ts index 0f17073..5d83435 100644 --- a/stress/serp-dualpath-optimize.ts +++ b/stress/serp-dualpath-optimize.ts @@ -191,15 +191,20 @@ function controlTick(): Record | null { const successS = wS.sent > 0 ? wS.ok / wS.sent : 1; const infraFails = wH.httpErr + wH.netErr + (from < 60 ? wH.poolEmpty : 0); const googleNoiseS = wS.captcha + wS.gate; + // v5.5:入段/续砍用 10min 短窗「现役」我方故障证据 —— dp7f 实测:30min 窗里 6 个 + // 零星 httpErr 在 420/时 captcha 灾难波次下持续解锁硬规则,级联到 8/min;现役证据 + // 才配得上「正在发生的我方故障」。混合证据(联合噪声 >8)时地板抬到 SOFT_FLOOR, + // 杜绝 dp7d 式「2 个伴生池空解锁硬地板 8」 + const infraFailsS = wS.httpErr + wS.netErr + (from < 60 ? wS.poolEmpty : 0); const trickle = infraFails === 0 && googleNoiseS <= 6; if (success >= 0.99 || (trickle && successS >= 0.96)) degraded = false; - const entry = !degraded && !trickle && infraFails >= 3 && ((success < 0.99 && fails >= 8 && tot >= 200) || (success < 0.96 && fails >= 4)); - const ongoing = degraded && wS.sent >= 30 && successS < 0.96 && infraFails >= 3 && allFails - failsAtLastCut >= 2; + const entry = !degraded && !trickle && infraFailsS >= 2 && ((success < 0.99 && fails >= 8 && tot >= 200) || (success < 0.96 && fails >= 4)); + const ongoing = degraded && wS.sent >= 30 && successS < 0.96 && infraFailsS >= 2 && allFails - failsAtLastCut >= 2; if (entry || ongoing) { degraded = true; failsAtLastCut = allFails; to = success < 0.96 ? from * 0.5 : from * 0.7; - to = Math.max(HARD_FLOOR, to); + to = Math.max(googleNoiseS > 8 ? SOFT_FLOOR : HARD_FLOOR, to); reason = `success=${(success * 100).toFixed(1)}%<${success < 0.96 ? 96 : 99}%(失败 ${fails}${entry ? "" : ";短窗<96%+新失败≥2"}) ×${success < 0.96 ? 0.5 : 0.7}`; } else { // 软信号(v5.4:仅剩池空,且仅低速期 —— 高速期池空是需求伴生现象,温池自补,