Repository navigation
chore(release): v1.6.2 - #148
Merged
Merged
Conversation
The per-call doubling ratio was asserted at < 1.8. It measures rules that cost 16-75 ns per call in a release build, so the assertion is decided by scheduler noise as much as by the code: it failed a downstream nix build at 2.04 on untouched code, while the same tree measures 1.05 in dev and 1.27 idle in release. The residual growth is not a complexity change. Doubling the file doubles the tree, so the traversal's working set stops fitting in cache -- constant work per call taking more time per call. Replace it with the invocation counts, which the head index and the dialect scope fix before any check body runs and which are therefore identical idle and loaded, and keep the ratio as an #[ignore]d benchmark. The O(file)-per- call shape it was chasing is still measured directly by every_rule_stays_far_cheaper_than_a_materializing_one, which has four orders of magnitude of headroom against its 10x floor. This matches the pattern already used in lint-introspection, lint-hy-depth, lint-form-shape and three other sibling packages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Releases v1.6.2, a patch containing one change: the
lint-fennel-janet-depthcost gate no longer asserts a wall-clock ratio.
Why
cost_tests::a_rules_per_call_cost_does_not_grow_with_the_fileassertedratio < 1.8on ns-per-check-call at two file sizes. The rules it measurescost 16–75 ns per call in a release build, so the assertion is decided by
machine load as much as by the code. Measured on the same unmodified tree:
fennel-redundant-doratio--test-threads 1nixsandbox buildTwo mechanisms, neither of them a regression:
scheduler noise;
fitting in cache. Constant work per call, more time per call — which
spends most of the 1.8 budget before any contention.
The rule it accused is correctly ordered:
fennel_redundant_do/rule.rscalls the cheap domain check first and the
O(file)guard second.What replaces it
each_rule_is_dispatched_once_per_head_occurrence— asserts exactinvocation counts, which the head index and dialect scope fix before any
checkbody runs. Identical idle and loaded.ignored_bench_per_call_cost_does_not_grow_with_the_file— the ratio,#[ignore]d, printing rather than asserting.The
O(file)-per-call shape is still gated byevery_rule_stays_far_cheaper_than_a_materializing_one, which comparesagainst a deliberately mis-ordered control rule and has ~9,000× of headroom
against its 10× floor. That is the test that actually catches a guard moved
above its domain check.
This is the pattern six sibling packages already use — see
lint-introspection/src/lib.rs, which documents the same retreat and why.Verification
cargo fmt -- --checkcargo clippy --all-targets --all-features -- -D warningscargo test --release -p paredit-feature-lint-fennel-janet-depth, idlenix flake checkControl: under that load the benchmark showed
fennel-nested-associative-operatordrift 1.03 → 1.39 on unchanged code,confirming the ratio tracks load rather than the rules.
Release checklist
Cargo.toml(bothpackageandworkspace.package) at 1.6.2Cargo.lockrefreshedv1.6.2in the install examples indocs/src/getting-started.mdanddocs/src/reference/compatibility.mdv1.6.2on the resultingmaintip after squash-mergerelease.ymlcreates, then publish