Summary
On large vessels, TestFlight can cache a base failure rate (BFR) of 1.0 for engine parts, which results in effectively immediate failures (e.g. MTBF ~0.1–1s behavior).
Observed behavior
- Engines that should have normal reliability instead show very high failure rate and fail in quick cascade.
- Logs show entries like:
TestFlightCore([kspPartName = cryoengine-compsognathus-1:cryoengine-compsognathus-1]): BFR: 1.0000000
- Small/simple vessels may not reproduce; large/complex vessels do.
Expected behavior
- BFR should be calculated from the configured reliability curves, not from a default fallback curve.
- No permanent cache of
BFR=1.0 unless the actual configured curve truly evaluates to that.
Suspected root cause
There appears to be an initialization-order race between OnAwake / OnStart and the manager polling path:
TestFlightInterop.OnAwake() triggers UpdatePartConfigs().
- If
TestFlightCore config list is not yet populated, alias/config resolution can be incomplete at that moment.
TestFlightReliabilityBase.OnAwake() creates a default reliability curve when reliabilityCurve == null:
reliabilityCurve.Add(0f, 1f).
- On large vessels, manager update/polling can call
GetBaseFailureRate() before SetActiveConfig() loads real config curves.
- Result: default curve evaluates to
1.0, gets cached as base failure rate, and is not recalculated later.
Relevant code areas
TestFlightReliabilityBase.OnAwake() default curve initialization.
TestFlightCore.UpdatePartConfig() / alias propagation.
- Manager path that reads base failure rate during vessel/UI status update.
- Base-failure caching logic in
GetBaseFailureRate().
Reproduction notes
- Repro seen with KSP 1.12.5 on large staged craft (high part count).
- Symptom disappears when using a config-side workaround that ensures reliability curve is loaded at module level before fallback can occur.
Workaround tested locally
In a config template, placing the reliability curve at MODULE level (not only nested in CONFIG) prevented the dangerous default (0,1) fallback from being used before config activation.
Suggested fixes
Potential options (any one or combination):
- Avoid
reliabilityCurve.Add(0f,1f) as default in OnAwake (use safer minimum default or defer).
- Ensure base failure rate is not cached until active config is fully resolved.
- Invalidate/recompute cached BFR after successful
SetActiveConfig().
- Gate manager polling until core/module configuration is finalized.
Happy to provide logs and a minimal repro craft if helpful.
Summary
On large vessels, TestFlight can cache a base failure rate (BFR) of
1.0for engine parts, which results in effectively immediate failures (e.g. MTBF ~0.1–1s behavior).Observed behavior
TestFlightCore([kspPartName = cryoengine-compsognathus-1:cryoengine-compsognathus-1]): BFR: 1.0000000Expected behavior
BFR=1.0unless the actual configured curve truly evaluates to that.Suspected root cause
There appears to be an initialization-order race between
OnAwake/OnStartand the manager polling path:TestFlightInterop.OnAwake()triggersUpdatePartConfigs().TestFlightCoreconfig list is not yet populated, alias/config resolution can be incomplete at that moment.TestFlightReliabilityBase.OnAwake()creates a default reliability curve whenreliabilityCurve == null:reliabilityCurve.Add(0f, 1f).GetBaseFailureRate()beforeSetActiveConfig()loads real config curves.1.0, gets cached as base failure rate, and is not recalculated later.Relevant code areas
TestFlightReliabilityBase.OnAwake()default curve initialization.TestFlightCore.UpdatePartConfig()/ alias propagation.GetBaseFailureRate().Reproduction notes
Workaround tested locally
In a config template, placing the reliability curve at
MODULElevel (not only nested inCONFIG) prevented the dangerous default(0,1)fallback from being used before config activation.Suggested fixes
Potential options (any one or combination):
reliabilityCurve.Add(0f,1f)as default inOnAwake(use safer minimum default or defer).SetActiveConfig().Happy to provide logs and a minimal repro craft if helpful.