warn when the settled tree has outgrown its floors instead of quietly passing
This commit is contained in:
parent
b309140d02
commit
a456a0fcd2
1 changed files with 17 additions and 0 deletions
|
|
@ -111,7 +111,24 @@ console.log(
|
|||
' quietFor=' + (quietFor === Infinity ? 'n/a' : quietFor + 's')
|
||||
)
|
||||
|
||||
// ★ DRIFT WARNING — a floor that is never revisited decays silently while the tree grows.
|
||||
// This gate deliberately keeps LOOSE floors rather than deriving strict ones from manifest.json
|
||||
// the way check:drop does, because it runs DURING builds where a transiently empty tree is the
|
||||
// expected input; a strict floor here would fail on every clean phase. Different regime, different
|
||||
// tolerance — do NOT "fix" this to match check:drop.
|
||||
// But loose must not mean STALE. If the settled tree has outgrown a floor by a wide margin, the
|
||||
// floor has stopped constraining anything, so say so out loud instead of quietly passing.
|
||||
// (MIN_LEAVES=50 / MIN_DIRS=17 were set when the tree had ~58 leaves / 19 dirs — commit edb935f.)
|
||||
const DRIFT = Number(process.env.DRIFT_WARN || 1.35)
|
||||
if (ok) {
|
||||
if (leaves >= MIN_LEAVES * DRIFT || dirs >= MIN_DIRS * DRIFT) {
|
||||
console.log(
|
||||
'SETTLED-TREE: NOTE — the tree has outgrown its floors (leaves ' + leaves + ' vs floor ' +
|
||||
MIN_LEAVES + ', dirs ' + dirs + ' vs floor ' + MIN_DIRS + '). They still catch a CATASTROPHICALLY ' +
|
||||
'gutted tree but no longer a partial one. Raise MIN_LEAVES/MIN_DIRS toward the current shape — ' +
|
||||
'keeping headroom for mid-build transients, which is why they are not derived.'
|
||||
)
|
||||
}
|
||||
console.log('SETTLED-TREE: PASS — safe to measure or publish.')
|
||||
process.exit(0)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue