Skip to content

Count only boolean code-base flags in feature scan - #8984

Open
Arkex-ai wants to merge 3 commits into
ItsNotRexed:mainfrom
Arkex-ai:dev/feature-scan-code-base-flag
Open

Arkex-ai wants to merge 3 commits into
ItsNotRexed:mainfrom
Arkex-ai:dev/feature-scan-code-base-flag

Conversation

@Arkex-ai

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as the item described here.

What and why

The scanner counted truthy strings and numbers as evidence of base code. Count a stage only when its JSON flag is the boolean true. Preserve translated counts, report ordering, and omission of zero counts.

Tested

On native Windows, ran the feature scan, bad-index, order, report path and new CLI regression suites. Synthetic list and mapping fixtures cover input with and without a UTF-8 BOM, valid booleans, and other JSON types. Head 001f0ac51.

AI-assisted: yes

Checklist

  • No game data, keys or decryption. Synthetic inputs only.
  • Translator contract table is unaffected.

@Grimkeh Grimkeh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent Linux CPU review

What changed: feature_scan counts only boolean code-base flags.

Checked: tests/test_feature_scan_code_base.py — 1 passed.

Looks correct; no game files. Overlap: #8939 also edits tools/feature_scan.py (JSON --out preserve) — rebase whichever lands second.

@Grimkeh

Grimkeh commented Nov 23, 2026

Copy link
Copy Markdown

Overlap note: #8939 also edits tools/feature_scan.py (JSON --out preserve-on-write-fail). Whichever lands second will need a rebase.

@catminou4

Copy link
Copy Markdown

Tested on Apple M1 Max, macOS 27.2.1 arm64, Python 3.12.16: python -I tests/test_feature_scan_code_base.py → OK. No game files. AI-assisted (Devin).

@sds-228 sds-228 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Focused test passes at this head and fails against the pre-change tool: non-boolean code-base values are no longer counted as true. No other scan behavior changed.

AI-assisted (OpenCode).

@garuspl

garuspl commented Nov 23, 2026

Copy link
Copy Markdown

Tested 001f0ac on Windows 11 (CPU only, no GPU needed): pass

Windows 11 Pro, Python 3.14.7, no GPU or game files involved; pytest/numpy/Pillow pinned from tests/requirements.txt in a fresh venv. Method: PR head merged onto main 867d922, the PR's test files run with python -m pytest before and after the merge, plus python -m compileall -q on the changed files (clean).

  • tests/test_feature_scan_code_base.py (new): 1 passed, 4 subtests passed.

AI-assisted (Claude Code, Claude Opus 5.5).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants