Blog & authors platform (EN/ZH) + whole-crate mutation testing with an honest kill-rate floor#302
Merged
Conversation
…eport, refresh conformance stamp Mutation testing now mutates EVERY line of basilisk-checker (examine_re=".", ~9085 mutants, no code excluded) killed by the fast mutation-safe binaries. The committed baseline is the declared MIN_KILL_RATE floor (20%) over that whole-crate pool — deliberately different in kind from the old 100%/125-mutant number, which was scored over a narrow, test-covered subset via scripts/mutation_examine_re.py. The two use different denominators, so this is a scope change to an honest, larger pool, not a loosened gate; the ratchet still fails any run below the floor or below the recorded rate. - mutants_report.py: fold Timeout into the killed total (PIT/Stryker convention), ratchet on `detected` (caught+timeout), apply the floor on every run, and fix a crash where a span-less mutant location (_esc(None)) aborted the whole report. - Makefile: cap parallel jobs to min(4, cores/2) and raise --timeout to 120s with a dedicated --build-timeout 600s so a compile-included test phase is never mislabelled a timeout. - lib.rs: strengthen existing contains_identifier / should_suppress_cascade unit tests with boundary and message-path assertions (no new test functions). - Refresh the python/typing conformance stamp (f4f2952 -> 6ef9f77) across README, spec, and conformance_report.json; score remains 100% (141/141, 0 FP).
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.
TLDR
Ships a full blog/authors platform for the website (EN + ZH) and re-bases mutation testing onto the whole checker crate with an honest kill-rate floor, while keeping PEP conformance at 100%.
What Was Added?
Website — blog & content platform
authors.json+ author landing/detail pages (authors/index.njk,authors/author.njk), category and tag pages (blog/categories*.njk,blog/tags*.njk,blog/index.njk), an Atomfeed.njk,sitemap.njk, androbots.txt.njk.components/blog.njkandcomponents/rules.njk, abloglayout, and amobile-menu.jsfor small-screen nav.blog/*.md,zh/blog/*.md), with masthead/author/illustration images.Mutation testing
PKG=selector in the Makefile so a single crate is mutated per run;--build-timeout 600alongside a raised--timeout 120.What Was Changed or Deleted?
Mutation testing — whole-crate scope + honest floor
examine_re=".", ~9085 mutants, no code excluded), killed by the fast mutation-safe binaries. The committed baseline (mutation_scores.json→working) is the declaredMIN_KILL_RATEfloor (20%) measured over that whole-crate pool. This is deliberately different in kind from the previous 100%/125-mutant number, which was scored over a narrow, test-covered subset selected viascripts/mutation_examine_re.py— different denominators, so this is a scope change to an honest, larger pool, not a loosened gate. The ratchet still fails any run below the floor or below the recorded rate.mutants_report.py: a Timeout now counts as a kill (folded into the numerator, PIT/Stryker convention) instead of dragging the score down; the ratchet checksdetected = caught + timeout; the floor is enforced on every run including the first; and a crash is fixed where a span-less mutant location (_esc(None)) aborted the entire HTML report.min(4, cores/2)so concurrent per-mutant rebuilds don't starve the test phase into false timeouts; thekilledline now reports caught + timeout-as-kill.Website — layout, rules, styling
ruleGroups.jsdeleted →ruleTagGroups.js), withdocs/rules/tag.njkand matching ZH pages.rename.mp4recompressed 66 MB → 3.5 MB with arename-poster.jpgposter frame.Conformance stamp
python/typingcommitf4f2952 → 6ef9f77across README, README.zh, the checker spec, andconformance_report.json. Score unchanged: 100%, 141/141, 0 false positives.How Do The Automated Tests Prove It Works?
src/main.py --only-run basilisk) scored the freshly built release binary at 100% — 141/141 pass, 0 false positives againstpython/typing@6ef9f77; the stamp-drift guard (gen_conformance_reference.py --check) reports "up to date".npm run buildrenders all 290 pages;npm run test:e2epasses 24/24 navigation + screenshot smoke tests across Desktop Chrome + Pixel 5, including the new blog/author/error routes.score_percentage/regression_messagesverified against the committed floor baseline — realistic whole-crate runs at 40–85% PASS, a sub-floor 15% run correctly FAILS on both the floor and the kill-rate ratchet; the_esc(None)path no longer raises.contains_identifier_*andcascade_suppression_*tests pass, adding boundary/message-path assertions to existing test functions (no new tests, no weakened assertions).Spec / Doc Changes
.cargo/mutants.toml: documents the whole-crate scope, the timeout-as-kill policy, and why the 20% floor is a scope change rather than a regression.docs/specs/CHECKER-ARCHITECTURE-SPEC.md: conformance commit stamp refreshed (score unchanged).Breaking Changes