Skip to content

DOOM study: lineage-based subsystem assignment (Part of #6097, slice 3) - #6846

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/6097-20261028T0120Z
Oct 28, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/6097-20261028T0120Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6097, slice 3 of 5 (after #6833): lineage-based subsystem assignment for the per-subsystem distributions.

Checklist: partial [c:5b53dc02] -- plots, study_report wiring (needs a real scan of the non-C ports) and the sfs-side pieces (undefined in the issue: owner to specify) remain.

What changed

  • lineage.name_index / assign_subsystem: a port function gets the subsystem of the linuxdoom function it descends from (same normalised name, p_ / r_ prefix optional), else the file-name placement. Only X_Name / XX_Name linuxdoom functions are indexed (main, Init say nothing); a name defined in two subsystems is ambiguous and dropped; a bare (prefix-less) name needs more than 6 characters and must not equal a full name (same guard as the landmark matcher).
  • subsystem_distribution.py: --assign lineage (default) / prefix (old behaviour); the report header says which. Renamed-file ports (Renderer.cs, game/play.rs) no longer land wholly in other.
  • Tests: renamed file placed by namesake incl. prefix-dropped name, prefix fallback, --assign prefix, index ambiguity / unprefixed / short names.

Class / Sibling gaps

Class: ways a port function can be tied to a linuxdoom subsystem. Handled: same-name (full), same-name (prefix dropped), file prefix. Not here: exact body-hash match (renamed AND moved functions; needs clone body reads per port, a different mechanism); names that change the stem (Draw for R_DrawColumn) have no signal. survival() still uses the full normalised name only (prefix blind spot, sibling gap from #6703).

Remaining slices

Plots; study_report wiring (needs a real scan including non-C ports); sfs-side pieces (ask owner).

Facts checked:

  • pytest tests/tools/test_doom_subsystem_distribution.py, test_doom_lineage.py, test_doom_study_report.py, tests/test_source_reads.py, test_change_classifier.py: 62 passed.
  • pr_gates.py --fast: 9/9 pass (ruff 0.17.1). --ratchets not run: tools only, no parsing or golden-relevant code touched.
  • Real scan (2ac09c8ae, C ports only; no non-C scan on this box): other % prefix -> lineage: chocolate-doom 28.4 -> 28.2, doomgeneric 11.0 -> 11.0, doom-ascii 4.9 -> 4.9. C ports keep their file names, so the gain is for renamed-file ports, which only the synthetic test covers so far.

Lessons for agents

  • A bare cat > file without a heredoc in a chained command blocks on stdin and leaves an empty file; write PR bodies with the Write tool.

🤖 Generated with Claude Code

…lone (Part of #6097)

A function goes to the linuxdoom subsystem of its namesake (prefix optional); file-name prefix is the fallback.
--assign prefix keeps the old placement.

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 28, 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 28, 2026 01:30
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 28, 2026 01:31
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 4b93fa1 into main Oct 28, 2026
62 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/6097-20261028T0120Z branch October 28, 2026 01:49
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