Skip to content

Changelog

Canontra follows Keep a Changelog and the Haskell Package Versioning Policy (PVP).

Ultra-Low Latency Pipeline, Hardened Accuracy & Stateless AI Harness (canontra snap, Alpha)

Section titled “Ultra-Low Latency Pipeline, Hardened Accuracy & Stateless AI Harness (canontra snap, Alpha)”
  • Stateless AI Harness Sub-Versioning (Canontra.Harness.{Store,SubVersion,Guard}, canontra snap, Alpha):
    • Added schema_version: "0.1-alpha" (stability: "alpha") subcommands init, mark, diff, guard, rewind, log, gc backed by .canontra/snaps/ (HEAD, ledger.jsonl, objects/, manifests/, auto-created .canontra/.gitignore) with zero daemons, zero IPC, and zero .git mutation.
    • Added 4 turn-level classifications (no_change, semantic_noop, internal_logic, contract_change), --forbid / --allow-paths guard rules, and preflight SHA-256 (readVerifiedBlob) + path-containment (isSafeSnapId, isSafeRelativeFilePath, canonicalizeSafePath) rollback safety.
  • CNTR\x07 Incremental Binary Slab Cache (Canontra.Cache.SlabV7):
    • Stores 9-tier FingerprintBundle digests and compact binary FileGraphSummary records inside 4KB CRC-32C protected slab pages (with multi-page spanning), enabling summary-backed buildWholeRepoCallGraphFromSummaries (112.9 us) and buildWholeRepoDataFlowFromSummaries (65.6 us) without re-parsing unchanged source files.
    • Added transparent read support for CNTR\x06 and CNTR\x05 caches (readAnySlabCacheForV7).
  • Single-Pass Pipeline Fusion & Algorithmic Speedups:
    • Added CanonicalProgram / toCanonicalProgram (Canontra.Normalize.Normalize) and fused single-pass hashing (Canontra.Fingerprint.Bundle).
    • Replaced quadratic Data.List.nub hotspots in WholeRepoGraph and TypeContract with Set/IntMap structures, upgraded ChaseLevDeque (Canontra.Repository.Parallel) to mutable MV.IOVector circular buffers, and upgraded polyglot lexers (Python, FastPython, JS, Go, Rust) to ByteString/SIMD scanning.
  • Semantic & Type-Contract Accuracy Hardening:
    • Added exact ABI scalar widths, Mutability, and ordered TypeTuple to F_T.
    • Added containsFloatOperand IEEE-754 non-associativity guards and isNonTrappingPureExpr trapping/short-circuit guards to Canontra.Normalize.Algebraic.
    • Added language-specific scoping (canonicalizeAlphaModuleForLang) for Rust sequential let shadowing, Go := redeclaration, JS var hoisting, and Python LEGB + walrus bindings.
    • Added Lengauer-Tarjan computeDominators / computeDominanceFrontiers (CFGCanonical), Go directory package merging and TS/JS barrel resolution (WholeRepoGraph), and composite F4 folding into F_R.
  • Benchmarks & Verification:
    • Extended bench/Bench.hs to 159 strict NFData microbenchmarks (RQ1 to RQ19).
    • Live 15-repo evaluation (1,026,521 LOC) achieved 4.07× aggregate cold speedup (135.20 s to 33.18 s), 9.07× aggregate warm speedup (129.10 s to 14.23 s), peak 68,030 LOC/s (jinja), and 9.7× to 205.1× speedup vs. CodeQL; expanded automated test suite to 795 passing tests under stack test --pedantic.

Deep Algebraic Equivalence, α\alpha-Invariance & CSR-Native CIA 2.0

Section titled “Deep Algebraic Equivalence, α\alphaα-Invariance & CSR-Native CIA 2.0”
  • Scope-Aware Bound Lexical α\alpha-Canonicalization (Canontra.Normalize.Alpha): Rewrote bound local variables, loop binders, comprehension iterators, lambda arguments, try/except, and with bindings to @v<depth>.<ordinal> in F1 and F_DF while keeping exported API symbols strict in F2 and F3.
  • Commutative & Associative Algebraic Normal Form (Canontra.Normalize.Algebraic): Purity-guarded (isProvablyPureExpr) associative flattening and hash sorting for +, *, &, |, ^, ==, !=; relational dual canonicalization (>/>= to </<=); unordered set/dict sorting; double-negation elimination.
  • CFG Dominator-Tree & RPO Canonicalization (Canontra.Analysis.CFGCanonical): Branch condition inversion normal form, guard-clause lifting, dead post-terminator pruning, and RPO 0..k-1 basic block relabeling.
  • Structural Type Contract (F_T) Lattice Deepening (Canontra.Analysis.TypeContract): Recursive ANF flattening/sorting of unions and intersections, positional de Bruijn generic params (α0, α1), and structural TypeRecord field sorting.
  • CSR-Native PR Batch Change Impact (Canontra.Analysis.BatchImpact): Multi-file canontra impact --pr-base <ref> over CSRGraph.backwardReachabilityCone emitting runnable pytest, jest, go test, and cargo test commands.
  • Verification: Expanded automated test suite to over 750 passing tests with 0 warnings under stack test --pedantic; added RQ16 and RQ17 benchmarks.

Hardened Performance, Precision & Soundness Milestone

Section titled “Hardened Performance, Precision & Soundness Milestone”
  • Unboxed CSR Graph Engine (Canontra.Analysis.CSRGraph): Contiguous Vector Word32/Word16 graph representation reducing memory footprint by >70%, with Tarjan SCC condensation and O(log⁡(deg(u)))O(\log(\text{deg}(u))) edge lookup.
  • CNTR\x06 Zero-Copy Slab Cache (Canontra.Cache.SlabV6): 64-byte cache-line records, 256-way L1 radix jump table, <500 ns mmap hits, binary CSR persistence, and 4KB CRC-32C page salvage.
  • 256-Bit SIMD FastScan & Chase-Lev Work-Stealing: Zero-FFI 32 bytes/cycle SWAR scanning and lock-free multi-core work-stealing scheduler (>= 100,000 LOC/s).
  • Polyglot Grammar Conformance: Python 3.12 (PEP 701, PEP 695, PEP 572), TS 5.2 (using/await using, regex lookahead), Go 1.21+ (min/max/clear, ~T, cyclic structs), Rust 2021 (GAT lifetimes, r# raw idents).
  • Platform Hardening: atomicSwapWithRetry for Windows file locks, FileNodeIdentity symlink/junction cycle breaking, case-folded path collation, 50 MB / 64-level ceilings, and 618 passing tests.
  • Unified 9-tier single-file (F0..F4) and 4-tier whole-repo (F_R, F_WCG, F_WDF, F_W4) manifests.
  • Full production CLI (fp, compare, diff, graph, impact, slice, repo, watch, cache, export, verify, completions).
  • Stdin - streaming, SARIF v2.1.0 / DOT / JSON outputs, strict POSIX exit codes 0 to 4, and 450+ tests.

[0.0.1-alpha] to [0.0.9-alpha] (2026-08-08 to 2026-09-18)

Section titled “[0.0.1-alpha] to [0.0.9-alpha] (2026-08-08 to 2026-09-18)”
  • 0.0.9-alpha: Whole-repo synthesis (F_WCG, F_WDF), CIA slicing, CNTR\x05 4KB paged cache, watch daemon, F_T.
  • 0.0.8-alpha: HybridIndentStack, Python match/case, JS/TS ASI, Go generics, Rust trait bounds.
  • 0.0.7-alpha: Eytzinger CNTR\x03, LinearAST, SwissTable, incremental Merkle DAG.
  • 0.0.6-alpha: SWAR 64-bit scanner, fused streaming SHA-256, CNTR\x02.
  • 0.0.5-alpha: Direct-to-IR recursive descent parsers with flatparse (-85% parsing latency).
  • 0.0.4-alpha: Single-pass traversal fusion and unboxed vectors.
  • 0.0.3-alpha: JS/TS, Go, Rust frontends; CFG/DFG; IEEE-754 & Unicode NFC; Tarjan SCC.
  • 0.0.2-alpha: Zero-span AST, Python 3.8+, lexical scope & call graph.
  • 0.0.1-alpha: Initial pure-Haskell proof of concept (F0..F4, F_R, Python 3).