All 57 Entries
Era 0 · Historical Whitepaper (Verbatim + Nov 2026 Addendum) Wave I · Founding Whitepaper (Dec 2025) engineering est_j · Analytical / TDP Model Measured/Empirical Engineering Archival PDF (#02, Dec 22, 2025); original AI-Verify source in private deterministic-coding repo (unreproduced externally)

Deterministic Code Auditing for Production-Ready Software (AI-Verify & Fruition Scoring)

December 22, 2025 whitepaper introducing AI-Verify: a 15-language tree-sitter static stub/complexity linter emitting SARIF 2.1.0 in 14.5 ms/file, paired with November 25, 2026 errata on comment non-monotonicity and detector-label circularity.

David Charlot • • Addendum & Errata: Nov 25, 2026 • 7 min read • Glossary • Verification & AI-Use Disclosure
ai-verify static-analysis tree-sitter sarif commit-gates historical-whitepaper

Part I: Contemporary Historical Summary (As Written in December 2025)

Historical Source Provenance (Original Date: December 22, 2025): David Jean Charlot, PhD · Open Interface Engineering. Preserved from our December 2025 AI-Author / AI-Verify / AI-Compile engineering series (Download Original Dec 2025 PDF).

Motivation: The “Compiles-But-Fakes-It” Failure Mode

By late December 2025, teams deploying coding agents in CI pipelines routinely encountered syntactically valid, compiler-clean stubs: faced with a non-trivial specification, an autoregressive model satisfied the type checker while inserting todo!(), pass # implement later, return Ok(vec![]), fake_token, or an undocumented unsafe pointer cast.

A common late-2025 workaround was “LLM-as-a-Judge”: sending generated files into a second frontier LLM call (35–50 J per file modeled, multi-second latency, and nonzero sampling variance across runs). AI-Verify argued that probabilistic code generators should be gated by deterministic static analyzers rather than probabilistic prompts alone.

Polyglot tree-sitter Architecture & SARIF 2.1.0 Pipeline

AI-Verify parsed source files across 15 tree-sitter grammars—Rust, Python, JavaScript, TypeScript, Go, Java, C, C++, C#, Ruby, PHP, Bash, Haskell, OCaml, and Scala—emitting OASIS SARIF 2.1.0 reports for CI/CD gates and IDE diagnostics:

Source Tree (15 Languages)
   │
   ▼
tree-sitter Incremental CST Parser (zero LLM calls, 45 MB resident RAM)
   │
   ├──► 1. Incomplete Implementation Detector  (w_1 = 1.0) : TODO/FIXME, todo!(), unimplemented!(), NotImplementedError, empty catch
   ├──► 2. Fake / Placeholder Value Detector   (w_2 = 0.8) : fake_*, mock_* in non-test paths, dummy literals, stubbed Ok(Default)
   ├──► 3. Undocumented Unsafe Detector        (w_3 = 0.6) : Rust unsafe / C raw casts lacking explicit SAFETY invariant comments
   ├──► 4. Structural Complexity Analyzer      (w_4 = 0.4) : McCabe V(G) = E - N + 2P & nesting-weighted Cognitive Complexity
   └──► 5. Unreachable / Dead Branch Detector  (w_5 = 0.3) : Post-return statements, shadowed dead arms, unused private bindings
   │
   ▼
Fruition Score F in [0, 100] + Deterministic SARIF 2.1.0 Gate Verdict

The Fruition Score Formula

To provide automated repair loops with a scalar readiness gate alongside itemized SARIF spans, the whitepaper defined the Fruition Score F:

Fruition Score Definition:
  F = 100 * ( 1 - ( sum_i w_i * c_i ) / ( sum_i w_i * m_i ) )   clamped to [0, 100]

  where:
    c_i = capped defect count in category i (0 <= c_i <= m_i)
    m_i = normalization ceiling per KLOC for category i
    w_i = severity weight (1.0, 0.8, 0.6, 0.4, 0.3)

The December 2025 paper stated two properties over F:

  1. Bitwise Determinism (Theorem 1): Identical source byte inputs produce identical CST spans, SARIF fingerprints, and Fruition Scores (Var(F | source) = 0).
  2. Defect-Count Monotonicity (Theorem 2): Reducing a detected category count c'_i < c_i with other counts fixed yields F(S') >= F(S) (Superseded / corrected — see Nov 25, 2026 Errata below).

December 2025 Audit Across 50,000 Files & 2,000 Labeled Commits

AI-Verify was run across 50,000 open-source files (10.1M LOC across Rust, Python, JavaScript, Go, and Java) and evaluated against a 2,000-file labeled set of AI-assisted commits (Superseded / corrected — see Nov 25, 2026 Errata below):

MetricAI-Verify (Deterministic CST)Frontier LLM Review Baseline (Dec 2025)Ratio / Delta (vs. LLM Baseline)
Precision (2,000 labeled files)94.7%86.1% (prompt-sensitive)+8.6 percentage points
Recall91.2%88.4%+2.8 percentage points
F1 Score92.9%87.2%+5.7 percentage points
Median Latency per File14.5 ms (68 files/s)3,200 – 6,500 ms220.7 – 448.3x faster (LLM ms / 14.5 ms)
Peak Resident Memory45 MBCloud GPU serviceLocal single-core process
Modeled Energy per File~0.05 J (14.5 ms x 3.5 W)35 – 50 J700 – 1,000x lower (LLM J / 0.05 J)

Formal & Methodological Limitations Errata (2026-11-25 Audit)

  1. Non-Monotonicity of Semantic Safety Under Syntactic Comments (// SAFETY: Gaming):
    • While F decreases monotonically in the raw syntactic detector count c_i, it is NOT monotonic in actual memory or semantic safety! Specifically, Category 3 (Undocumented Unsafe) checks only whether a Rust unsafe { ... } block or C pointer cast is preceded by a syntactic // SAFETY: comment—not whether the stated invariant holds mathematically or whether aliasing/lifetime rules are respected.
    • Consequently, an LLM coding agent that prepends // SAFETY: pointer is valid to an out-of-bounds dereference or data-racing unsafe block reduces c_3 to 0 and strictly increases its Fruition Score F while leaving memory unsafety completely intact. F therefore measures syntactic stub absence and documentation completeness, not semantic soundness (contrast RustBelt, Jung et al. POPL 2018, where unsafe blocks carry formal separation-logic proof obligations).
  2. Detector–Label Circularity in the 50,000-File Scan & 2,000-File Precision/Recall Benchmark:
    • In the December 2025 evaluation, both the 50,000-file repository prevalence audit and the 2,000-file human-verified ground-truth rubric defined “incomplete or placeholder code” primarily via explicit surface markers (TODO, FIXME, todo!(), unimplemented!(), NotImplementedError, fake_*/mock_* names, and empty exception handlers)—the exact same lexical and CST patterns encoded in AI-Verify’s rule set.
    • This detector–label circularity explains why a lightweight tree-sitter rule engine outscored an unconstrained LLM reviewer (92.9% vs. 87.2% F1) on marker-bearing stubs, while having zero recall on silent semantic incompleteness (e.g., an agent omitting todo!() and returning a plausible-looking arithmetic expression with a wrong boundary condition or missing authorization check).
  3. Epistemic & Licensing Status (est_j, Private Prototype): Both ~0.05 J/file (0.0145 s × ~3.5 W single-core TDP) and 35–50 J/file (cloud LLM TDP estimate) are analytical envelope estimates (est_j). Archival PDF (#02) is public at /papers/archive/02-Deterministic-Code-Auditing.pdf under CC BY-ND 4.0; the original openIE-dev/deterministic-coding source repository is private (unreproduced externally).

Chronological Evolution Within OpenIE Research

Recognizing that tree-sitter pattern lints cannot verify semantic behavior or prevent comment gaming motivated three stricter verification designs in our November 2026 stack:

  1. Executable Behavioral & Boundary Harnesses (SATB Harness): Moved beyond static identifier/comment linting to executable specification, boundary, and property harnesses that test input–output invariants directly.
  2. Machine-Checked IR Proof Obligations (RCE-VC): Replaced prose // SAFETY: comments with formal pre-/post-conditions and machine-checked verification conditions over Reality Code Engine IR nodes, backed by our 5,496-theorem Lean 4.36.0 suite (0 sorry).
  3. Hardware-Metered State-Mutation Gates (Metered Commit Gates): Tested deterministic state-commit gating on an AMD Kria KV260 FPGA, recording 11.43 nJ per gate decision via inline DC board shunts (measured_j) with 0 unsafe approvals observed in 209k simulated checks.
  • Rust Clippy (rust-lang/rust-clippy) — standard rustc HIR/MIR lint suite including clippy::todo, clippy::unimplemented, and clippy::undocumented_unsafe_blocks.
  • Semgrep (Return To Corp / Semgrep Inc., 2020–2026) — polyglot CST/tree-sitter pattern-matching static analysis engine with SARIF output.
  • SonarQube & Campbell, G. A. (2018). Cognitive Complexity: An Overview and Evaluation. TechDebt / ICSE 2018 — source of the nesting-weighted Cognitive Complexity metric alongside McCabe, T. J. (1976), A Complexity Measure, IEEE TSE, SE-2(4), 308–320.
  • Calcagno, C., Distefano, D., Dubreil, J., et al. (2015). Moving Fast with Software Verification (Meta Infer). NASA Formal Methods 2015 — compositional bi-abductive separation-logic analyzer catching real null-dereference, resource-leak, and concurrency bugs semantically.
  • Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Monniaux, D., & Rival, X. (2005). The ASTREE Analyzer. ESOP 2005 — sound abstract interpretation proving absence of runtime errors in safety-critical C.
  • Jung, R., Jourdan, J.-H., Krebbers, R., & Dreyer, D. (2018). RustBelt: Securing the Foundations of the Rust Programming Language. POPL 2018 — machine-checked Coq/Iris semantic soundness proofs for unsafe Rust encapsulations.

Changelog (2026-11-25)

  • Separated Part I (December 22, 2025 summary) from Part II (November 25, 2026 formal limitations errata, provenance, and related work).
  • Documented both formal limitations prominently: (a) syntactic // SAFETY: comments raise the Fruition Score without proving semantic memory safety, and (b) detector–label circularity in the 50,000-file / 2,000-file stub benchmark.
  • Qualified the Kria KV260 Commit Gate evolution reference strictly as 0 unsafe approvals observed in 209k simulated checks (11.43 nJ board shunt, measured_j).
  • Added citations to Clippy, Semgrep, SonarQube / Campbell (2018), McCabe (1976), Meta Infer (2015), Astrée (Cousot et al., 2005), and RustBelt (Jung et al., POPL 2018).
DC

David Charlot

Open Interface Engineering, Inc. · Signed Provenance · Self-Checked

Archival PDF (#02) public at /papers/archive/02-Deterministic-Code-Auditing.pdf under CC BY-ND 4.0; original AI-Verify codebase in openIE-dev/deterministic-coding is private (externally unreproduced). Full licensing & AI-use disclosure →

Archival PDF (#02, Dec 22, 2025); original AI-Verify source in private deterministic-coding repo (unreproduced externally)

Check the primary artifacts or run an independent replication

Inspect signed provenance manifests, rerun our public Apache-2.0 commodity-hardware replication kits, review our November 25, 2026 outside-review errata, or browse primary manuscripts on the Research Hub.