Skip to content

CodeEraser 1.8.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 12:53
· 0 commits to 12e4bf2169a4326f1d0a3c8c26bed24eab3448a1 since this release

CodeEraser 1.8.0

The judged set widens from seven languages to thirteen: C, C++, Java, Lua and R
enter as code languages, HTML enters as a document language, and plain .txt
gets a documentation-duplication arm. Each new language shipped only after its
own frozen reference-resolution exam scored against a blind audit and its own
false-positive ledger over 400 commits; thirty-five previously documented
boundaries were fixed to the spec instead of being kept; near-miss (T3) clones
reach the gate with a verdict cache; and three judgments that still lived in
Rust — the erase closure, the directory-shape classifier and the three
complexity rules — moved into the Haskell core. ce check and ce structure
scores are not comparable with 1.7.x
(the reasons are below); ce docdup
rows are not comparable either (three revisions of the segmenter moved). The
index schema moves 16 → 17 (one full rebuild on first run), the wire moves
7.1.0 → 7.2.0, additive, the baseline stays at ce.baseline/2, the daemon
protocol stays at 2.1.0, the observe feed grows additively to
ce.observe/0.11.0, and no default guard tier moved. Binaries build for the
same five targets, sixteen assets.

Why the scores moved

  • Every axis's universe grew. Files in the six new languages are parsed,
    fingerprinted (HTML excepted: a page has no functions and no clone
    fingerprints), placed on the reference graph and judged like the seven
    before them, so a tree with C or Java in it has more units, more pairs and
    more edges than 1.7.4 saw. .txt files enter the documentation axis.
  • Near-miss clones enter ce check and ce join. Since 1.7.4 the sim
    table carried T1/T2 blocks and documentation pairs; verified T3 pairs
    (tree-edit distance over the candidate pool) now ride as a third kind, one
    row per file pair, the strongest finding kept. On this repository that step
    alone moved ce check 944 → 917.
  • The cognitive-complexity reading changed once: a structure's head — an
    if condition, a loop clause, a switch value, a catch parameter — is
    scored at the structure's own level, and only a statement body raises the
    nesting level (the whitepaper lists the nesting structures without saying
    where their heads sit; Sonar's own analysers and PMD read the if condition
    this way). Across seven cross-check corpora, 2 of 1,098 units moved by one.
  • Declared-symbol domains widened for the advisor: Java static fields and
    interface constants, C and C++ file-level variables, TypeScript module-level
    const / let / var now have symbols; that reaches ce deadcode's
    advisory rows and the erase reason public_surface, never a verdict.
  • ce structure sees the new languages' edges in its graph, so its own
    0–1000 is not comparable with 1.7.x either.

This repository reads ce check 944 (1.7.4) → 918 on the release tree, the
tests submodule 983 → 952; the CI floors move with them, 939 → 911 and
979 → 949. A --fail-under floor priced against a 1.7.x score has to be
re-priced on the new reading; ce-baseline.json files stay valid (the
knobs digest did not move).

Six more languages, each with its exam

  • C and C++ (tree-sitter-c 0.24.2, tree-sitter-cpp 0.23.4; .h reads as
    C++). A unit is a function_definition with a body whose declarator chain
    carries a parameter list; class chains, out-of-class qualification, template
    arguments and special members are named the way the compiler names them.
    #include sites resolve in five rungs: the including file's own directory,
    a declared [graph.search_roots] c root, the compile database — found the
    way clangd finds it (compile_commands.json, build/compile_commands.json,
    compile_flags.txt at every ancestor, command split by clang's own JSON
    rule, -I / -iquote / -isystem in GCC's order, -include as an edge,
    headers reached through the translation units that include them) — the
    include/ convention beside the including file or any ancestor, and
    <x> external. #if / #elif conditions are opaque to complexity.
  • Java (tree-sitter-java 0.23.5). Methods, constructors and compact
    constructors are units; overloads resolve by arity. Imports, on-demand
    imports and type references resolve the way javac does: a class a.b.C
    is the walked file that declares package a.b and is named C.java,
    wherever it sits; Maven / Gradle source sets see themselves and main; the
    JDK's 233 unconditionally exported packages and java.lang's 108 public
    types (generated from Temurin 25.0.4.1+1) are external by name.
  • Lua (tree-sitter-lua 0.5.0). Function values are named by the binding
    statement (local f = function, M.f = function, table fields); local is
    private, everything a module returns is exported. require walks
    package.path templates written in the file, the standard search
    directories and the requiring file's own directory (a/b.lua then
    a/b/init.lua); pcall(require, "x") reads as the load it protects;
    dofile / loadfile resolve by path; LÖVE, Neovim and init.lua entry
    files are roles.
  • R (tree-sitter-r 1.3.0). source resolves beside the sourcing file,
    then at the repository root, then in a declared root; library /
    requireNamespace / pkg:: reach a package through its in-tree
    DESCRIPTION, and a package node contains only the code it declares
    (Collate, or the files directly under R/). roxygen @export decides
    visibility in files that use it.
  • HTML (tree-sitter-html 0.23.2), a document language like Markdown: an
    element's id is a section, its text is document text (html_text
    segments in the docdup family), no functions and no clone fingerprints.
    href, src, link, action and the rest resolve relative to the
    document (honouring <base>), root-relative against the deployment root,
    same-host absolute URLs, #fragment against the target page's id set;
    the targets can be pages, documents, code or the walked assets a page
    serves — stylesheets, scripts, images — which are now nodes of their own
    (role bit 9) so ce deadcode no longer reports every asset dead.
  • Plain text (.txt): a prose-only arm read by the documentation rule
    alone — paragraphs separated by blank lines — never a scan-size or verdict
    input; CMakeLists.txt, compile_flags.txt and robots.txt are excluded
    by name.

Every language was admitted through the same three frozen artifacts, each
committed before the next existed: the site slice and sample (100 questions
drawn by rank from the corpus's reference sites), the blind audit (four
independent agents reading only the pinned checkout), and only then the
ladder and its precision doc (docs/EVAL-SET-LANGS.md). Precision on the
in-corpus truths: C 73/73 (recall 73/74), C++ 15/15 (15/17), Java 36/36,
Lua 86/86, R 18/18, HTML 75/75 (75/76) — every doc regenerated on a clean
tree and pinned to the commit it was generated at. The per-language
false-positive ledger (contracts/eval/fpr-lang-v1.json, one corpus per
language, the last 400 first-parent commits replayed through the write-time
guard) reads 0 false intercepts on all six under the ledger's true-positive
rule; the strict reading, which also counts a landed rename as an intercept,
puts R at 4.71 % on one 2022 commit that renamed 36 files from .r to .R,
and the user ruled that reading stands as recorded.

Thirty-five boundaries fixed rather than documented

The 2026-09-26 survey of every stated limit found thirty-five that were
fixable defects; all are fixed in this release. Among them: C++ string forms
(prefixes, raw strings, user-defined literals) read as one token; Lua local
shadowing; Go grouped parameters and package-level const / var; Python
__all__ in all its written forms; K&R definitions; Markdown setext headings,
anchors and list-item code blocks; Rust folded use groups, wildcard
re-exports and pub extern crate; Java folded imports, inherited member
types and second top-level classes; Haskell PackageImports; Go package
beside block comments; TypeScript extends chains without a hop limit,
Node's built-in modules, ancestor node_modules and exports patterns; R
base::-qualified calls and partial argument matching; Markdown links to
walked assets; cabal top-level fields; the sites table no longer stores
credentials or query strings from URLs; churn, join and seam pricing key on
the container-chain anchor instead of the nth same-key unit; the
co-reference proxy is blind to literals and comments; the GUI graph screen
is one judgment; core.commentChar=auto reads the character git chose; TS
declare ambient elements export as the spec says; the tombstone session
union reads names restored on disk.

Judgments that moved into the core (wire 7.2.0, additive)

  • scan.request and graph.request carry judgedMask, so a new language
    enters the judged set by flipping one bit on the Rust side; role bits 8
    (compile unit) and 9 (asset) join the core's table.
  • erase.request carries targets, the core answers kept — the target
    closure and licence preference that chose one row per target now live in
    CE.Erase.Cost, eight refusals by name.
  • structure.request carries patternShapes; the directory-name style
    classification lives in CE.Structure.Shape.
  • scan.request carries events — each unit's classified structure in
    pre-order from the language tables alone — and the core answers derived:
    cognitive complexity, cyclomatic complexity and maximum nesting are now
    folded in CE.Scan.Complexity, sixteen refusals by name; the three Rust
    walkers are gone. The whitepaper's worked examples plus the Java, C, C++,
    Lua and R transplants form one 38-line register both halves replay to the
    same margins. The events contract's first draft was quadratic in the row
    count (2.46 s on this repository's real request); indexed, it reads 0.32 s
    and ce scan is at par with 1.7.4 (1.12 vs 1.17 s warm).
  • Golden pairs 130 → 152; the old requests without the new keys answer byte
    for byte as before.

Also in this release

  • A PostToolUse hook, ce settle --hook: a write the ask tier handed to
    the person is recorded once it lands (feed ce.observe/0.11.0, additive).
  • The T3 verdict cache (t3ted, index schema 17): the core's tree-edit
    verdict per candidate pair is kept under the pair's tree keys, so ce clone
    warm drops from 4.3–4.6 s to 1.6 s here while ce check pays about 1.2 s
    more for the near-miss family it now judges.
  • [graph.search_roots]: one table for declared roots per language (c,
    lua, java, r, html), refused by name for unknown keys or roots the
    walk did not read.
  • Six grammars add 5.7 MB to the release ce binary (+28.9 % on the same
    toolchain; C++ alone is 62 % of the six).

Latency

cli/src and core/app both moved since 1.7.4, so this release earns its own
bench rows. They were measured after the tag, in one quiet sitting on the fixed
host, on the release's own tree with its own ce + ce-core (commit 2f0ef4c,
clean), and appended to contracts/bench/bench.json; the bench pages, BENCH.md
and the README chips render them. p50 in ms, 1.7.3 (2026-09-12) → 1.8.0
(2026-09-29); the two sittings are seventeen days apart, so read them as a
bound, not a same-day pair:

metric 1.7.3 1.8.0
check_warm 2348 4643
deadcode_warm 1140 1482
dedup_cold 9321 13929
dedup_warm 490 650
docdup_warm 1417 2137
hook_probe 46 50
scan 671 907

What moved and why: the measured tree itself is larger (850 indexed files
against 712 at 1.7.4, both with the tests submodule seated — the six grammars' fixtures, the HTML site pages and the
.txt corpus are now inside the judged universe rather than beside it), ce check now judges the near-miss family on every run (about 1.2 s on this tree
with the verdict cache warm; the first run after an index rebuild pays the
cache fill — the row's max, 8340 ms, is that run, the median is the warm
reading), ce docdup segments HTML text and .txt paragraphs, and the write-
time hook is unchanged within noise (46 → 50 ms). ce scan carries the events
contract at par with the walker it replaced (PERF-BUDGET.md, the second
sitting); the extra 0.24 s here is the larger tree.

Unsigned, as before

Binaries are unsigned; the SHA256SUMS asset and the plugin manifest's pins
are the trust anchor (ADR-007). ce update on a 1.7.x install reads this tag
and the pins committed on it; the GUI app itself comes from the installer this
release ships (ce update --installer saves the verified copy). A 1.7.x plugin
install picks the new pins up through /plugin update codeeraser. The first
run on an existing tree rebuilds .ce/index.db once (schema 17).