Repository navigation
Releases
v0.94
TScert is a research verifier for type claims about TypeScript functions. A function is accepted only with a certificate that passes an independent checker whose soundness is proved in Lean.
v0.94: 643 of 686 functions of tools/ verify (93.7%), against 628 of 684 (91.8%) at v0.9. Counted statement coverage is separately 10,097 of 17,790 (56.8%). None of v0.9's verified functions is lost, and 15 are gained.
The measurement is the census of ae20a6c6, the tagged commit, taken on 2026-11-04 with a 1,800-second stage limit and a 4 GiB memory limit per stage. The metric changed with this release.
- v0.94, shallow function coverage: each module is checked once, unit by unit. A function counts as verified when its own unit (the function, a group of functions that reach each other, or the initialization) is accepted, with what it calls read at its stated signature.
- v0.9: each function was sliced into its own file with the bodies of the same-file functions it calls.
Unsupported, unverified and timed-out functions remain in the denominator. See the function and release metric and work ledger.
Changes:
- Per-unit acceptance. One acceptance path and one headline theorem,
checkUnitJson_safe: a unit's accepted verdict gives safety for every function of that unit. A file is read once into one shared front, and its evidence is written and checked one unit at a time. A full census oftools/takes about 15 minutes with each stage under 4 GiB. - Omission. A refused function, with its recursive group, or a refused top-level statement, is omitted, and the rest of its file is checked without it. A constant holding only functions with written signatures is read at its signature.
- Library support:
Math.abs,Object.freezeof a fresh object literal, generic overloaded declarations, a program's own overloaded functions checked at each overload, ando[n.toString()]read aso[n]. - ReScript. These support the experimental TypeScript backend of the ReScript compiler (rescript-lang/rescript#9211 and #9213).
- Re-exports are read as module declarations that run nothing.
- Documentation. Each top-level document states its subject once, as it currently is.
The supported fragment, audited host boundaries and the trust surface remain explicit.
v0.9
TScert is a research verifier for type claims about TypeScript functions. A certificate is accepted when it passes an independent checker whose soundness is proved in Lean.
v0.9 meets the 90% front-end function coverage threshold. The complete tools/ census verifies 628 of 684 functions (91.8%), compared with 556 of 679 (81.9%) at v0.8. Counted statement coverage is separately 9,488 of 15,914 (59.6%), compared with 7,089 of 15,725 (45.1%) at v0.8.
The measurement is the main census of 1589e590, the tagged commit, taken on 2026-11-03 with a 1,800-second stage limit; v0.8's census used 600 seconds. The headline counts named top-level function declarations with bodies in tools/, once each; each function's slice includes the bodies of the same-file functions it calls, and imported functions are used at their declared types. Unsupported, unverified and timed-out functions remain in the denominator. See the function and release metric, statement metric and work ledger.
- The expression lowering's recursive group (
fragment-expressions.mts) verifies, along with the claim printers, the type readers' guard dispatch and narrowing, the declaration graph's resolution helpers, the shadow prelude and the computed types' indexed access. - A fresh
URL'shrefand a caught value's own string message are read through audited intrinsics. Thehrefread relies on an owner-approved host assumption; the message read is a runtime check that adds no trust. - The stated effects of
numberOfBits,nameOf,errorBase,Gate.termScope,Gate.moduleRestTypeandclassBodywere reviewed and approved by the owner. - Search repairs bring every slice under the stage limit: certified imports a plan refuses are withdrawn in one round, the no-return region and slot value sets are computed without repeated work, and an evidence document keeps each derivation term and step value set once, in a table.
- Source repairs and avoidances are recorded in SOURCE-REWRITES.
Against the census of v0.8 (33d5faca), this census gains 73 verified functions. One function, stringOfJson, moved from family-activation.mts to calculus.mts, where it verifies. Timeouts fall from 1 to 0. Against the 1,800-second census of 883614a0, it gains 14 and loses none. Each merge passed make suite and make test on its branch and received an independent Astra review. The supported fragment, audited host boundaries and unproved source functions remain explicit.
v0.8
TScert is a research verifier for type claims about TypeScript functions. A certificate is accepted when it passes an independent checker whose soundness is proved in Lean.
v0.8 meets the 80% front-end function coverage threshold. The complete tools/ census verifies 556 of 679 functions (81.9%), compared with 489 of 679 (72.0%) at v0.7. Counted statement coverage is separately 7,089 of 15,725 (45.1%), compared with 5,487 of 15,715 (34.9%) at v0.7.
The measurement is the main census of 33d5faca, the tagged commit, taken on 2026-11-03 with a 600-second stage limit; v0.7's census used 300 seconds. The headline counts named top-level function declarations with bodies in tools/, once each; unsupported, unverified and timed-out functions remain in the denominator. See the function and release metric, statement metric and work ledger.
- The statement lowering and its recursive group (46 functions of
fragment-statements.mts) establish their stated memory footprint. Generic members of a union dispatch on every arm, a spread of a readonly-or-writable array union reads through union elimination, and a callback's write of a required source field stays within the store it keeps. reduceandreduceRighthave footprints over a captured length, skipped holes and the callback's footprint, under the untampered-standard-objects assumption; a negative case under Node shows the unsafe variant refused.- The type-term reader's quantified, signature and member functions verify. A written field keeps its type until a call or another write, a strict null test of a two-member path refines the saved path, a
mapresult is built at its first use's array type, and the truth of a test followed by a value reads the value for truthiness alone. - Source repairs and avoidances are recorded in SOURCE-REWRITES: native
Map/Setparameters where every caller passes one, twoentries()loops as index loops, and one closure declared before its reader.
Against the main census of 9fb116b8, this census gains 53 verified functions and loses none; timeouts fall from 21 to 1 (type-term.mts#someType, at 600 s). Each merge passed make suite and make test on its branch and received an independent Astra review. statements relies on the stated effect of classStmt under the module import assumption; classStmt's own slice remains unverified. The supported fragment, audited host boundaries and unproved source functions remain explicit.
TScert v0.7
TScert is a research verifier for type claims about TypeScript functions. A certificate is accepted when it passes an independent checker whose soundness is proved in Lean.
v0.7 meets the 70% front-end function coverage threshold. The complete tools/ census verifies 489 of 679 functions (72.0%), compared with 411 of 644 (63.8%) at v0.6. Counted statement coverage is separately 5,487 of 15,715 (34.9%), compared with 4,441 of 15,235 (29.1%) at v0.6.
The measurement is the clean main census of 9bf8c463, taken on 2026-11-02 with a 300-second stage limit. Release commit d4eaa54e retains exactly that commit's tools/, verifier, producer and pipeline code; its subsequent changes document the results and clarify report scopes.
The headline counts named top-level function declarations with bodies in tools/, once each. Unsupported, unverified and timed-out functions remain in the denominator. Module initializers, class members and functions held by module bindings are outside this metric. See the function and release metric, statement metric, and dated work ledger.
Changes
- Checked callback footprints and stable member-read facts support more front-end code while retaining the distinction between normal and exceptional returns.
- Ordinary-call spread snapshots use the existing dense-copy checker, preserving evaluation order when later arguments have effects. Negative and forged-evidence controls exercise this boundary.
- Shared complete effect constructors retain every native contract field. The rollout preserves a previously verified dependent; two catalog migrations that caused a timeout are excluded.
- Request-local sharing of strictly validated types, proved-equivalent normalization indexes, and an audited search shortcut reduce repeated work. On one identical saved request, CPU falls 92.9 to 8.5 seconds and peak memory 2.63 to 1.04 GB, with byte-identical refusal output. This is a fixed-input result.
- Explicit project data contracts, live callback-option views and a shared semantic printer remove duplicated or weaker representations.
The latest twenty-case batch, compared with the complete main census at ca4e3c8a, gains 29 verified functions and loses none. One unverified forwarding helper is deleted. All 2,845 pipeline cases, 21 suites and 214 controls pass. The latest batch and the representation patch received independent Astra review.
Cost and remaining limits
Recorded unique producing-search CPU across the two main censuses increases 2,909 to 6,088 seconds. Most of the increase is in 20 refused type-term slices that reach a later predicate obligation; their cost rises 51 to 3,355 seconds. The 460 functions verified in both censuses have recorded search cost 1,447 to 1,346 seconds. Inputs, dependency contracts, verifier implementations and cache histories differ; these totals do not establish a same-work project speed ratio. Timing and shared-work accounting defines the scopes.
One previously unverified function, classStmt, crosses the 300-second wall limit. Its cause remains unknown. The supported fragment, audited host boundaries and unproved source functions remain explicit.
What acceptance guarantees
For inputs meeting their types and a heap meeting its storage contracts, an accepted function's translation into the calculus does not get stuck or return a value outside its result type. It may throw or run forever. The theorem SourceClaimJson.checkJson_safe connects successful checking to this property.
Applying that result to source relies on faithful translation and annotation interpretation, library and host contracts, conforming inputs, and the trusted tools and runtime assumptions. The coverage percentage is a measure of the specified front-end functions, rather than all TypeScript behavior.
Try it and license
Follow the setup instructions, then run:
make check FILE=pipeline/examples/array-last-element.tsTScert uses the MIT NON-AI License.
TScert v0.6
v0.6 is TScert's second tagged release, at commit 4291f9ce: a research verifier
for type safety of TypeScript functions. TScert accepts a function when its
certificate passes a checker whose soundness is proved in Lean.
The version number marks a coverage threshold: v0.N requires at least N×10% of
the named top-level function declarations with bodies in tools/, TScert's own
front end, to verify in the census on main. v0.6 meets the 60% threshold.
The census of 4291f9ce, measured on 2026-11-01 with a 300 s stage limit,
verifies 411 of 644 functions (63.8%), against 351 of 637 (55.1%) at v0.5.
Within those function bodies, 4,441 of 15,235 counted statements are covered
(29.1%), against 21.5% at v0.5; the
coverage definition
states what is counted.
What acceptance guarantees
For inputs meeting their types and a heap meeting its storage contracts, an
accepted function's translation into the calculus does not get stuck or return a
value outside its result type. It may throw or run forever. The acceptance
theorem,
SourceClaimJson.checkJson_safe,
establishes this guarantee for successful checking.
The guarantee relies on source translation and annotation interpretation,
library and host contracts, conforming inputs, and the trusted tools and runtime
assumptions listed in the
trust surface.
Since v0.5, the native contracts of join, some, filter, flatMap and
JSON.stringify admit arrays with holes, under the existing assumptions of
stable standard objects and ordinary array construction, and the module-loading
host boundary states its deferred exports operation.
Scope
The supported subset includes control flow, objects, arrays, classes, closures
and generic functions; the
README
outlines it. The
fragment boundary
describes source restrictions, and the
work ledger
tracks remaining verification work.
License
TScert is licensed under the
NON-AI MIT License:
the MIT terms, with the code excluded from use in training or improving
machine-learning systems and from datasets for that training, also for its
derivatives.
Try it
Follow the
setup instructions,
then check the included example:
make check FILE=pipeline/examples/array-last-element.tsTScert v0.5
v0.5 is TScert's first tagged release, at commit 945fa802: a research verifier
for type safety of TypeScript functions. TScert accepts a function when its
certificate passes a checker whose soundness is proved in Lean.
The version number marks a coverage threshold: v0.N requires at least N×10% of
the named top-level function declarations with bodies in tools/, TScert's own
front end, to verify in the census on main. v0.5 meets the 50% threshold.
The census of 945fa802, measured on 2026-10-30 with a 300 s stage limit,
verifies 351 of 637 functions (55.1%). Within those function bodies, 3,300
of 15,319 counted statements are covered (21.5%); the
coverage definition
states what is counted.
What acceptance guarantees
For inputs meeting their types and a heap meeting its storage contracts, an
accepted function's translation into the calculus does not get stuck or return a
value outside its result type. It may throw or run forever. The acceptance
theorem,
SourceClaimJson.checkJson_safe,
establishes this guarantee for successful checking.
The guarantee relies on source translation and annotation interpretation,
library and host contracts, conforming inputs, and the trusted tools and runtime
assumptions listed in the
trust surface.
Scope
The supported subset includes control flow, objects, arrays, classes, closures
and generic functions; the
README
outlines it. Async support covers await of promises of primitives through
trusted intrinsic contracts;
the proof does not establish JavaScript async entry and resumption semantics.
The
fragment boundary
describes source restrictions. An unverified result means that search or
checking has not established the required derivation. The
work ledger
tracks remaining verification work.
Try it
Follow the
setup instructions,
then check the included example:
make check FILE=pipeline/examples/array-last-element.ts