Skip to content

chore(release): v1.6.2 - #148

Merged
takeokunn merged 2 commits into
mainfrom
chore/release-v1.6.2
Aug 29, 2026
Merged

takeokunn merged 2 commits into
mainfrom
chore/release-v1.6.2

Conversation

@takeokunn

Copy link
Copy Markdown
Collaborator

Releases v1.6.2, a patch containing one change: the lint-fennel-janet-depth
cost gate no longer asserts a wall-clock ratio.

Why

cost_tests::a_rules_per_call_cost_does_not_grow_with_the_file asserted
ratio < 1.8 on ns-per-check-call at two file sizes. The rules it measures
cost 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:

Condition fennel-redundant-do ratio
dev, isolated, --test-threads 1 1.05
release, idle 1.27
downstream nix sandbox build 2.04 — failed

Two mechanisms, neither of them a regression:

  • at that magnitude the ratio of two wall-clock measurements is mostly
    scheduler noise;
  • doubling the file doubles the tree, so the traversal's working set stops
    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.rs
calls the cheap domain check first and the O(file) guard second.

What replaces it

  • each_rule_is_dispatched_once_per_head_occurrence — asserts exact
    invocation counts, which the head index and dialect scope fix before any
    check body 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 by
every_rule_stays_far_cheaper_than_a_materializing_one, which compares
against 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

Check Result
cargo fmt -- --check pass
cargo clippy --all-targets --all-features -- -D warnings pass
cargo test --release -p paredit-feature-lint-fennel-janet-depth, idle 88 passed, 1 ignored
Same, under 32 spinners on 16 cores (3.3× slowdown) 88 passed
nix flake check running locally at time of opening; CI is the gate

Control: under that load the benchmark showed
fennel-nested-associative-operator drift 1.03 → 1.39 on unchanged code,
confirming the ratio tracks load rather than the rules.

Release checklist

  • Cargo.toml (both package and workspace.package) at 1.6.2
  • Cargo.lock refreshed
  • v1.6.2 in the install examples in docs/src/getting-started.md and
    docs/src/reference/compatibility.md
  • Tag v1.6.2 on the resulting main tip after squash-merge
  • Paste release notes into the draft release.yml creates, then publish

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.
@takeokunn
takeokunn merged commit c02264d into main Aug 29, 2026
10 checks passed
@takeokunn
takeokunn deleted the chore/release-v1.6.2 branch August 29, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant