Skip to content

speccheck 1.24.0

Choose a tag to compare

@rioffe rioffe released this 28 Oct 03:43
· 27 commits to main since this release

speccheck — the checker that makes the audit phase of building from a spec mechanical — together
with the spec-writing, spec-review, spec-plan, spec-model, spec-proof, spec-build and
spec-proposal skills, spec2pdf.sh, and install.sh. MIT for the code, CC BY 4.0 for the
documents.

Implements SPEC.md v1.24 in full: 307 spec IDs, 189 tests, both gate phases green.

speccheck (mock): CONFORMING - 307/307 passing (100.0%), 0 failing, 0 skipped, 0 weak, 0 unverified, 0 untested, 0 uncited; 0 dangling, 0 stale; judge=mock
speccheck (llm):  CONFORMING - 307/307 passing (100.0%), 0 failing, 0 skipped, 0 weak, 0 unverified, 0 untested, 0 uncited; 0 dangling, 0 stale; judge=llm

Phase B was run with openai/gpt-6-luna-pro via OpenRouter (--judge-concurrency 16) over 1,025
judged edges: judge_available true, judge_strength 1.0 (297/297), unknown_rate 0.0107, no
ID downgraded. A first attempt hit HTTP 402 (account credit exhausted) on 385 calls and is recorded
as invalid; the re-run on identical inputs is the result above — see SPEC_BUILD_REPORT.md §0o.

Most of this release answers a written debrief from a team that ran the whole method against
medical-device software in a regulated setting: eight of their ten suggestions are in, and the
other two are partly in (see Not yet below).

What is new since 1.20.0 (SPEC.md v1.20 → v1.24)

v1.24 — say UNPROVEN, stop cutting table rows, name disconnected ids

  • UNPROVEN instead of a false CONFORMING (R-105). Without --strict a run exits 0 unless
    something is FAILING, which is right for watching a trend — but it used to print CONFORMING
    over a tree with 0 % passing. Now, on exit 0, the summary line says CONFORMING only when every
    in-scope ID is PASSING and nothing is dangling or stale (what --strict checks), and
    UNPROVEN otherwise. The exit code and the JSON are unchanged; a log parser matching the first
    word gains one alternative.
  • Backtick spans follow CommonMark (C-01). The table-row splitter paired single backticks, so an
    inline span like ` ``` ` flipped it "outside" for the rest of the row: a later | inside
    code split the row and cut the statement, or the row's closing | leaked into the last cell.
    Measured over 14 real specs: one statement cut in half (in ten copies), 32 rows with a stray
    |. A run of N backticks now closes only at the next run of exactly N.
  • A cut row gets a Note (E-66). Besides the $..$ case of v1.21, any declared row with more
    cells than its table's header now gets statement may be cut at an unescaped '|': <ID>.
  • One Note names the IDs nothing references (E-77): <N> declared id(s) touch no edge: … —
    declared, non-retired IDs that no statement names and that name none, so impact can never reach
    them. Deliberately narrower than "rows that name no other ID", which flagged one correct row in six.
  • Fix for 1.23.1: this repository's own C-03 had grown past the 16,384-byte statement cap, so
    1.23.1 truncated its statement in speccheck.json and in what the judge saw. The JS/TS adapter's
    text moved verbatim into a new contract, C-24. (This affected speccheck's own spec, not yours —
    but if your contracts are long, the K-14 Note in your reports is worth a look.)

Both fixture goldens gain the one E-77 Note line; nothing else in them moves.

v1.23 / v1.23.1 — other projects' IDs, and citations you cannot write into the code

  • Foreign references (R-101, C-22): a token written <ns>:R-07 — platform:C-03 — is another
    spec's ID. It no longer counts as a citation of your own R-07, is never dangling, and is listed
    in speccheck.json's foreign array with one Note naming the first three. Pass --namespace NS
    so your own NS:R-07 counts as local; a bare R-07 is always local.
  • --citation-map FILE (R-103, C-23): a JSON map from IDs to existing test cases, for teams
    that own the specs but not the test repositories. Each resolving entry is a citation — it counts
    toward status like a literal one — but is labelled mapped everywhere: the JSON, (map) in the
    Markdown, (mapped) in explain, and ; citations: <M> mapped on the summary line. An entry that
    matches nothing is a Note, not an error. The map file is never scanned for citations.
  • Both flags work on check, impact and explain; a run using neither, with no <ns>: token, is
    byte-identical to before.
  • v1.23.1 folded a full independent review of the spec (17 findings). User-visible: the mock
    judge recognises vitest/jest expect(; the JS tokenizer decides regex-versus-division by a pinned
    rule; explain's status reasons name C-05's real step numbers; jest-junit needs
    ancestorSeparator: " > " (measured against a real jest 30 run), and a test outside every
    describe now joins.

v1.22 — JavaScript and TypeScript tests

  • .ts .tsx .mts .cts .js .jsx .mjs .cjs files under --tests are split into test cases: it/test
    calls, named by their describe chain, joined to JUnit by file path (R-104). vitest works with
    vitest run --reporter=junit; jest needs jest-junit with classNameTemplate: "{filepath}",
    titleTemplate: "{classname} > {title}" and ancestorSeparator: " > ". it.each rows join one
    case as variants. Token-based, so no Node toolchain is needed where the checker runs.

v1.21 — four extractor and CLI gaps

  • Ranges (R-07..R-10, R-07 to R-10, through, dashes) name every declared ID between the
    endpoints, so impact follows them.
  • Every cell of a declared row feeds edges, so an edge-case table's outcome column reaches
    impact; the judge still sees only the statement cell.
  • A Note for a row cut inside $..$ by an unescaped |.
  • path outside --root names the resolved target of a symlinked path.

Not yet

  • Cross-spec traceability: platform:C-03 is recognised and set aside, not followed into the other
    spec — a run still checks one spec.
  • A row cut by | that leaves its cell count equal to the header's is still silent.

Upgrading

git pull and re-run ./install.sh. Existing reports change only by the new Notes and, on
non-strict runs, the UNPROVEN word.