test/core/usage-policy-fold.test.js:387, "resolve emits a hashed usage_policy.fold_tightened only when folding changed the verdict", fails on master and has done since it was written.
The assertion is that resolving a path whose spelling matches the policy entry exactly emits no usage_policy.fold_tightened event, because nothing was folded. One is emitted.
It is not a regression
Checked out f457009 ("Usage-policy gate folds path spellings a volume treats as one directory", #484), the commit that introduced both the feature and the test: it fails there too, 22 pass / 1 fail. So this shipped broken rather than breaking later, and npm test has been red on master ever since.
Why it is worth fixing rather than muting
Either the resolver emits a tightening signal on a path it did not tighten, which is a false positive on a privacy-relevant hot path, or the test encodes the wrong expectation. Both are worth knowing, and neither is visible while the failure is treated as background noise.
The practical cost is already being paid: a permanently-red suite means a genuinely new failure has to be spotted by eye against an expected-failure count, which is exactly how a real regression gets waved through.
Repro
node --test test/core/usage-policy-fold.test.js
test/core/usage-policy-fold.test.js:387, "resolve emits a hashed usage_policy.fold_tightened only when folding changed the verdict", fails on master and has done since it was written.
The assertion is that resolving a path whose spelling matches the policy entry exactly emits no
usage_policy.fold_tightenedevent, because nothing was folded. One is emitted.It is not a regression
Checked out
f457009("Usage-policy gate folds path spellings a volume treats as one directory", #484), the commit that introduced both the feature and the test: it fails there too, 22 pass / 1 fail. So this shipped broken rather than breaking later, andnpm testhas been red on master ever since.Why it is worth fixing rather than muting
Either the resolver emits a tightening signal on a path it did not tighten, which is a false positive on a privacy-relevant hot path, or the test encodes the wrong expectation. Both are worth knowing, and neither is visible while the failure is treated as background noise.
The practical cost is already being paid: a permanently-red suite means a genuinely new failure has to be spotted by eye against an expected-failure count, which is exactly how a real regression gets waved through.
Repro