mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:30:53 +01:00
[PR #730] [MERGED] OLD-8645: restore old upstream PR 8645 - vs_layout_census: refuse a --json that is an input or a directory before survey() (BUILD-589) #768
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#768
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/730
Author: @aslan2142
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:build589-vs-layout-census-guard📝 Commits (1)
ad136ffvs_layout_census: refuse a --json that is an input or a directory before survey() (BUILD-589)📊 Changes
2 files changed (+151 additions, -7 deletions)
View changed files
📝
scripts/vs_layout_census.py(+33 -7)📝
tests/test_vs_layout_census.py(+118 -0)📄 Description
Claimed in the coordination issue as: OLD-8645 https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7132204652
Restoration of my original pull request, old upstream PR 8645 in
ItsNotRexed/Leonida, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Rebased onto main at51f3160923; the one commit cherry-picked cleanly and is unchanged. The tool isscripts/vs_layout_census.py, and it already uses the sharedtools/report_paths.same_report_pathguard that CONTRIBUTING.md names.What and why
--jsonis compared only withindex.json, using a rawos.path.samefile(scripts/vs_layout_census.py:189).--jsonthat names an indexed.dxbccontainer or adisasm/<stem>.slisting overwrites that input.--jsonthat is a directory runssurvey()first (that includes llvm-mc on every unlisted payload) and fails only at the write.main()now checks--jsonbeforesurvey()runs and refuses:same_report_pathmatches toindex.jsonor to a container or listing named in the index.input_paths(). It shares the newload_index()withsurvey(), so the guard and the census read the same index.--jsonpath still runs as before.report_pathsworks inside, without changing the call. It shares no files with this one and does not conflict.Tested
Linux, Python 3.14.10, CPU only. All inputs are synthetic and built by the test:
index.json, FSSM payloads in DXBC containers and hand-written.slistings. No game files.python -I tests/test_vs_layout_census.py:python -I tests/test_report_paths.py: OK.python -m compileall -q tools tests scripts: clean.git diff --check: clean.python -I scripts/check_no_game_data.pyon both changed files: clean.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)AI-assisted (Claude Code, Claude Opus 5.5).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.