Skip to content

DOOM-rosetta: measurements-only golden, pytest -m doom_rosetta, doom_rosetta_check.py (Part of #5619) - #5809

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5619-20261021T0142Z
Oct 21, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5619-20261021T0142Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5619 (slice 2 of 4; slice 1 = #5717).

What

  • Manifest moved to tests/doom_rosetta/manifest.csv (class and license kept) with a new expected_fails column: doom-ios and doomsday language (the .h-beside-.m caveat), cssdoom and sqldoom functions (JavaScript counts above ctags and tree-sitter, 4.7% / 11.4% over ctags; unresolved, no claim made about which count is right).
  • Golden tests/golden_doom_rosetta/<port>.json.gz, 44 licensed ports, 552 KB total (gzip, mtime 0 so a re-bless is byte-identical; *.json is git-ignored, so .json.gz rather than a whitelist line). Measurements only: the six-check row, SARIF counts by rule and level, per first-party file language / LOC / function and class counts / hash of sorted (name, start_line, loc, complexity) tuples (no names), and the exclusion path + reason table. No third-party code.
  • pytest -m doom_rosetta: clones fetched at the manifest SHA (never committed), rescans every time (no reuse keyed by engine SHA), diffs against the golden and names port, file and field. DOOM_ROSETTA_PORTS=a,b narrows the run (for slice 3's shards). The test skips itself unless the marker expression selects it, because smoke-test.yml replaces addopts with its own -m and would otherwise run it in the full suite.
  • tests/tools/doom_rosetta_check.py [--only ..] [--update --yes] [--diagnose PORT [--file PATH]]: check, bless with scope report, and a local diagnose mode that prints the real function names of a drifted file.

Evidence

  • Bless then an independent full re-check: 44/44 ports ok, zero drift (default worker count, GITGALAXY_DISABLE_GIT_HISTORY=1). Serial wall on the owner's box: 7m36s for all 44 ports (a CI shard time is slice 3's measurement).
  • Deliberately broken extractor (C func_start anchor made to reject lines starting with static, reverted):
linuxdoom: 6 difference(s) from the golden
  summary.functions: 783 -> 781
  file sndserv/soundsrv.c: functions 9 -> 8, func_hash 'b8fcdc2374feca71' -> '1cf153adbc57e66f'
  file sndserv/wadread.c: functions 8 -> 7, func_hash 'd698fe9fc05d3f66' -> '129d9882aabea0c5'
  • Unbroken: pytest -m doom_rosetta on linuxdoom and gore passes. Plain pytest from an unrelated directory collects and runs the fast tests. pr_gates.py --fast 7/7.
  • Verdicts: 40 of 44 PERFECT; the 4 non-perfect are exactly the expected_fails above.

Owner decisions

Owner OK (2026-10-19): add/edit workflows only if needed (workflow itself is slice 3; do not add doom-rosetta.yml here). No workflow was needed or edited in this slice.

Cross-repo

None. Licensing: licensed ports only in the manifest and golden; one removed port set is not named (see #5717).

Remaining slices

  • 3: doom-rosetta.yml, matrix-sharded by LOC (reads the manifest, DOOM_ROSETTA_PORTS, caches clones keyed by hashFiles of the manifest, installs Universal Ctags), PR wall time and runner-minutes in the body.
  • 4: nightly run on main with --oracle (ctags + tree-sitter), clean-scan table artifact, diff --fail-on-regression.
  • Also open: tests/doom_rosetta/README.md (how to bless, add a port, policy) and refreshing tests/tools/doom_speedrun/README.md, which still says the manifest sits beside it (kept out of this PR by the hand-written-file cap).

Lessons for agents

  • A bare -m in smoke-test.yml replaces pyproject addopts, so an opt-in marker must also self-skip in the test (or every -m override in the workflows must repeat the exclusion).
  • *.json is git-ignored repo-wide; a committed generated data file is cheapest as .json.gz, no whitelist line needed.

🤖 Generated with Claude Code

…rosetta_check.py (Part of #5619)

Manifest moves to tests/doom_rosetta/manifest.csv with an expected_fails column. Golden under
tests/golden_doom_rosetta/<port>.json.gz (measurements and function-tuple hashes, no names, no
third-party code). Opt-in zero-drift test, bless tool and a local diagnose mode.

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 21, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 21, 2026 02:24
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 21, 2026 02:24
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab


import argparse
import contextlib
import csv
@squid-protocol
squid-protocol merged commit de6365a into main Oct 21, 2026
74 checks passed
@squid-protocol
squid-protocol deleted the churn/5619-20261021T0142Z branch October 21, 2026 02:45
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.

2 participants