Skip to content

DOOM study: per-subsystem complexity distributions, slice 1 (Part of #6097) - #6744

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/6097-20261026T1530Z
Oct 26, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/6097-20261026T1530Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6097. Checklist: partial [c:5b53dc02] -- complexity only; other metrics, plots and the sfs-side pieces are left.

Slice 1 of the per-subsystem distributions for the DOOM ports. New tests/tools/doom_speedrun/subsystem_distribution.py splits each licensed port's code functions by linuxdoom subsystem (lineage.subsystem, file directory and file-name prefix) and reports ONE metric family, complexity: count, median, p90, share >= 10, and the port's median over linuxdoom's median in the same subsystem (blank under 5 functions on either side). It is a separate module that imports only quantile, CODE_LANGUAGES and MIN_FUNCTIONS from distribution.py, so it does not conflict with #6741 (vendored exclusion): once that lands, vendored code would still be counted here, since this module reads the scan DB itself (see Sibling gaps).

Class / Sibling gaps

Class: per-subsystem distribution of the per-function engine metrics (complexity, LOC, fan-out, token mass, args) for the licensed ports. Handled here: complexity. A port that renamed its files has its functions under other; each port's other % column reports how much that is.

Sibling gaps (no burned-estate program needs any of these; all are DOOM study work):

Remaining slices

Other metric families; plots; lineage-based subsystem assignment; sfs-side pieces; wiring into study_report.py.

Evidence

  • 4 new tests on synthetic scan DBs (grouping, language filter, ratios, other share, skips, baseline required, CLI outputs); test_doom_distribution.py and the tree-wide guards pass (165 tests).
  • pr_gates.py --fast: 8/8 after regenerating docs_read_by_tests.txt (generated). Ruff 0.17.1 (pinned) used; mypy 2.4.0.
  • NOT run: a real scan of the ports (no scans for this engine SHA exist under the default work dir, and a 30-port scan is out of scope for this slice), --ratchets (no engine, golden or ledger input changed; tooling only).

🤖 Generated with Claude Code

…6097)

New subsystem_distribution.py: per port and linuxdoom subsystem, complexity count / median / p90 / share >= 10 and
the median ratio to linuxdoom's same subsystem. One metric family; plots, other metrics and sfs pieces are later slices.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 26, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 26, 2026 15:35
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant