Skip to content

lspcheck 0.5.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 00:31
· 18 commits to main since this release
2208784

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 new POLICY checks 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 N and --mutation-cases N run 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_timeout defaults 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 than run_timeout is a usage
    error too, so a run never silently admits no case.

  • Reports: the JSON report gains "mutation" (null when the scenario doesn't run), with the seed, the cases planned
    and run, stopped (why the run stopped early, if it did) and isolated; the terminal header names the seed, and the
    terminal and Markdown reports give a line per isolated case. --transcripts writes mutation.jsonl, which
    replay replays as it is, with a meta line recording each case's plan, and mutation-case-<k>.jsonl for each
    isolated case.

  • The 11 example profiles the stock-server matrix runs gain a [mutation] section
    with a lexicon for their language, and expect = "baseline" where the recovery probes answer from the text alone. A
    test checks that each validates and fits its run_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 are SKIP ("mutation is off; pass --mutate"), which doesn't affect the exit status.
    Reports gain three SKIP lines, and each stock-server .verdicts file three skip lines; 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 selectionRange reply against every text it may describe (D1's
    candidate rule), so a lawful late reply about the changed, shorter text
    no longer fails.