Repository navigation
lspcheck 0.5.0
Added
-
Experimental seeded source mutation. With a profile and
--mutate, lspcheck
opens the profile's real source (its[mutation].files, else its[document]), breaks it with seeded, token-aware
edits, asks the server about each broken text, restores the clean text after each case and checks that the server
recovers. Three newPOLICYchecks judge it:- M1: the server doesn't exit, or close its output, while its source is mutated or being restored.
- M2: every request about a mutated document gets a response (any result or error) within
--timeout. - M3: once the clean text is restored, the recovery probes' answers
return to the stable baselines taken before the first mutation.[mutation.recovery]can also require them to
equal the baseline (expect = "baseline") or the restored text to have no Error diagnostic (no_errors).
Under
--mutate, D1, D2, D6 and K1 also judge what the server says about the mutated texts
(extended-check rules); each check's verdict combines with its own
scenario's, and the detail names the scenario and case. -
--mutate,--mutation-seed Nand--mutation-cases Nrun the scenario; the two flags override the profile. A
seed plans the same edits every time, and a seed chosen at random is reported, so a run can be repeated. The first
three failing or erroring cases are run again alone, failing ones first, each
with a fresh server, and the report says whether each reproduced and what in. An isolated run judges nothing, so no
verdict depends on it. -
Profiles accept a
[mutation]section: seed files, seed, case
count, operators, a lexicon for the language, the requests to ask, recovery probes and their expectations, and
timeouts (run_timeoutdefaults to an hour). It is validated with the rest of the profile, a mistake in it being a
usage error, and is inert without--mutate. Under--mutate, a case budget longer thanrun_timeoutis a usage
error too, so a run never silently admits no case. -
Reports: the JSON report gains
"mutation"(nullwhen the scenario doesn't run), with the seed, the cases planned
and run,stopped(why the run stopped early, if it did) andisolated; the terminal header names the seed, and the
terminal and Markdown reports give a line per isolated case.--transcriptswritesmutation.jsonl, which
replayreplays as it is, with a meta line recording each case's plan, andmutation-case-<k>.jsonlfor each
isolated case. -
The 11 example profiles the stock-server matrix runs gain a
[mutation]section
with a lexicon for their language, andexpect = "baseline"where the recovery probes answer from the text alone. A
test checks that each validates and fits itsrun_timeout. Their behaviour on the pinned releases is recorded in
docs/mutation-stock-servers.md. -
The stock-server matrix runs a mutation job per
server,--mutate --mutation-seed 20261115 --mutation-cases 10, compared against its<server>.mutation.verdicts.
Changed
- Without
--mutate, M1 to M3 areSKIP("mutation is off; pass --mutate"), which doesn't affect the exit status.
Reports gain threeSKIPlines, and each stock-server.verdictsfile threeskiplines; no other verdict of a
default run changes. - Profile durations may also be given in hours, such as
"1h".
Fixed
- D6 in the documents scenario judges a
selectionRangereply against every text it may describe (D1's
candidate rule), so a lawful late reply about the changed, shorter text
no longer fails.