Back to Zeroclaw

v0.8.0 Branch Line-Count Report

docs/maintainers/excision-v0.8.0-line-count-report.md

0.8.25.9 KB
Original Source

v0.8.0 Branch Line-Count Report

Comparison of integration/v0.8.0 (after the excision pass) vs upstream/master at a461b016d.

Method

Lines counted via /tmp/lcount.py against:

  • Rust files under crates/, src/, tools/, xtask/, tests/, benches/, fuzz/
  • TypeScript / TSX / JS under web/src/
  • Markdown under docs/

Categories:

  • logic — production source code lines (Rust + TS) excluding the four below
  • tests — files under tests/ directories AND #[cfg(test)] mod blocks within source files
  • docstrings — Rust /// and //!, TypeScript /** ... */
  • comments — Rust // (non-doc), TypeScript // and /* ... */
  • docs — Markdown under docs/
  • blank — whitespace-only lines (excluded from totals where noted)

Excluded: target/, node_modules/, dist/, .git/, tmp/, docs/book/book/ (generated mdbook output), web/src/lib/api-generated.ts (generated TS bindings), docs/book/po/ and po-extract/ (translation artifacts).

Totals

categorymasterbranchΔ
logic187,521193,324+5,803
tests118,974123,007+4,033
docstrings14,76517,100+2,335
comments7,5728,894+1,322
docs11,51214,131+2,619
blank42,59044,138+1,548
TOTAL382,934400,594+17,660

What this means

The v0.8.0 branch grows the repo by +17,660 lines total, of which:

componentΔshare of growth
logic+5,80333%
tests+4,03323%
docs+2,61915%
docstrings+2,33513%
blank+1,5489%
comments+1,3227%

~67% of the growth is non-logic (tests, documentation, comments, blank). The hypothesis that "a lot of the code bloat size is docs/comments/doc strings" is supported: actual production code accounts for one-third of the branch's expansion. The branch ships V0.8.0 schema overhaul + multi-agent runtime (#6272) + typed-family providers + peer-auth refactor, and most of the line count went into documenting and testing those changes rather than implementing them.

Per-area logic growth (sorted by Δ)

areamaster logicbranch logicΔ
zeroclaw-config12,98017,377+4,397
zeroclaw-runtime38,48039,373+893
web20,74221,518+776
zeroclaw-macros9121,581+669
zeroclaw-memory5,7896,856+1,067
zeroclaw-gateway8,7599,323+564
zeroclaw-channels34,55634,576+20
zeroclaw-api1,5111,536+25
zerocode704705+1
zeroclaw-tool-call-parser1,1681,1680
zeroclaw-hardware5,7605,7600
zeroclaw-plugins9549540
robot-kit1,9511,940−11
zeroclaw-infra1,0241,021−3
src (root binary)6,3265,956−370
zeroclaw-tools24,10623,311−795
zeroclaw-providers17,58216,152−1,430

Per-area test growth

areamaster testsbranch testsΔ
zeroclaw-channels24,82527,392+2,567
zeroclaw-config9,67311,562+1,889
zeroclaw-runtime30,66531,493+828
zeroclaw-memory4,2174,801+584
tests (workspace)8,2758,162−113
zeroclaw-providers12,14010,838−1,302
zeroclaw-tools15,83115,446−385
src (root binary)3,9753,614−361
(others < 200 Δ)

Excision-pass contribution

The branch's pre-excision tip would have been roughly +19,200 total (extrapolating from the diff between the excision-pass commits — 200b8d6ec..6473818c2 — which net ≈ −1,540 lines). The excision pass accounts for roughly 8% of the branch's net growth being shaved off.

By category, the excision pass:

  • Deleted ~−1,500 lines of dead-on-arrival files, WIP stubs, dead provider helpers + tests, channel-WIP clusters, schema bloat (FeishuConfig fold), Claude Code residue, and dead config sections.
  • Added ~+150 lines of new code: V2→V3 migration step for the FeishuConfig fold, three new migration tests, and the audit trail under docs/maintainers/excision-v0.8.0-incidents.md.

The deletions explain the negative deltas in zeroclaw-providers (−1,430), zeroclaw-tools (−795), and the test reductions in providers (−1,302). The +669 in zeroclaw-macros is non-excision V3 work (Configurable derive extensions for the schema overhaul).

Headline

Total branch growth+17,660
Production logic growth+5,803 (33%)
Excision pass net−1,540

The branch is large because V0.8.0 is a large feature delivery, but the production-code surface grew by roughly one-third of the headline number. The remaining two-thirds is documentation, tests, docstrings, comments, and whitespace — the supporting infrastructure for the feature work, not the work itself.