Skip to content

DOOM distribution.py: exclude vendored code (Part of #6097) - #6741

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/6097-20261026T1458Z
Oct 26, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/6097-20261026T1458Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6097. Checklist: partial [c:7aa491be] -- distribution.py was the one study consumer still counting vendored code; the three callgraph-oracle comparators are listed below.

What

tests/tools/doom_speedrun/distribution.py now drops functions under directories the engine's VendorDirectoryDetector calls vendored (load_metrics(db, vendored); run() reads <work>/repos/<port>, skipping a port with a scan but no clone, as lineage.py does). README blind-spot updated.

Class / Sibling gaps

Class: study readers of the per-port scan DB (function_data / file_data) that must not count vendored code. Members: doom_scorer.py (already excludes, #4545/#5464), lineage.py (already), doom_rosetta_check.read_scan (already; goldens unchanged), distribution.py (fixed here, tested over 6 detector rules: third_party_*/3rdparty-* prefix, known library name, versioned name, nested). Not DB-count consumers: fidelity.py, study_report.py.
Sibling gaps: callgraph_oracle.py:339, ts_callgraph_oracle.py:245, objc_callgraph_oracle.py:88 read the scan's functions to compare against a compiler/ctags reference; whether vendored files belong in that comparison is a different question (the reference covers them too), so not changed here. No burned-estate program needs any of these.

Facts checked

  • Golden rosetta fixtures (tests/golden_doom_rosetta) already apply the vendor test in read_scan; distribution output is not golden-pinned, so nothing to re-bless.
  • Only distribution.py selected from function_data without a path filter among the study modules that report distributions.
  • Not run: a real scan of the whole port set (needs the fetched clones and scans; not in this worktree). The test covers the detector rules on synthetic trees, so round-1-vs-now numbers for real ports are not measured here.

Gates

pr_gates --fast 8/8, --ratchets 9 pass / 0 skipped; test_doom_distribution/lineage/study_report, test_source_reads pass; plain pytest from /tmp passes.

🤖 Generated with Claude Code

…ons (Part of #6097)

load_metrics takes the engine's vendor test (doom_scorer._engine_vendor_test, as lineage.py and the rosetta check
already use) and run() reads each port's clone for it; a port with no clone is skipped.

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:09
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 26, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 26, 2026 15:11
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6741 @ 6a51f55: 1 failed check(s)

== full-suite part 1/3 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40346628397/job/121657243935
repro: python -m pytest -q tests
errors:
fail-on-cache-miss: false
[--ai-guardrails] [--fail-on-secrets]
[--fail-on-malware]
--fail-on-secrets CI/CD Gate: Fail build if hardcoded secrets are
--fail-on-malware CI/CD Gate: Fail build if ML threat inference flags
CI/CD Gate: Fail build if any file exceeds this risk
CI/CD Gate: fail the build if any file's structural
FAIL tests/tools/test_evidence_report.py::test_the_release_gate_fails_while_a_level_is_stale: 16.6s is over 15s and has no @pytest.mark.slow(reason=...) and no entry in tests/test_time_baseline.json
##[error]Process completed with exit code 1.
log tail:
env:
PYTHONUTF8: 1
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
OMP_NUM_THREADS: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
PYTEST_ADDOPTS: --ignore=tests/cobol_mainframe
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-part-1.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 211316
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 1019ea6a082c39e65d010d1695f6b7316b25059c01b6d236e33cd153f90f7875
Finalizing artifact upload
Artifact test-times-part-1 successfully finalized. Artifact ID 12662332347
Artifact test-times-part-1 has been successfully uploaded! Final size is 211316 bytes. Artifact ID is 12662332347
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/40346628397/artifacts/12662332347
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/d0410856-e2b2-4d62-b4df-4df58bb0d097' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-shepherd squid-shepherd Bot added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Oct 26, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 26, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

1 similar comment
@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