chore: delete dead JS scripts with hardcoded personal paths; extend path guard to .js - #201
Open
gadievron wants to merge 1 commit into
Open
chore: delete dead JS scripts with hardcoded personal paths; extend path guard to .js#201gadievron wants to merge 1 commit into
gadievron wants to merge 1 commit into
Conversation
…ath guard to .js Two orphaned JavaScript scripts shipped hardcoded personal paths (/Users/nahumkorda/...) that the machine-path guard never caught because it swept *.py only: - parsers/javascript/generate_report.js — a run-only script (top-level readFileSync of an absolute path), no exports, no callers. - parsers/javascript/dataset_enhancer.js — an orphaned duplicate of the live, imported+tested Python parsers/python/dataset_enhancer.py; unreachable (no module.exports, no requirer, no npm/CI/subprocess invocation). Both deleted. tests/test_no_hardcoded_paths.py's shipped-source sweep now also covers .js/.ts (stripping // comments, with an anti-vacuous floor + JS self-test) so this class can't recur. Also gitignore /bughunt-repros/ (a local scratch dir that carries personal paths). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
gadievron
requested review from
dgeyshis,
shahar-davidson and
sounil
as code owners
July 30, 2026 07:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Delete two dead JavaScript scripts that ship hardcoded personal paths, and extend the machine-path guard to
.js/.tsso this class can't recur.Why
Found while auditing merged PRs whose CI had failed on the same hardcoded-scratch-path class.
tests/test_no_hardcoded_paths.pysweeps*.pyonly, so two orphaned JS scripts carrying/Users/nahumkorda/...shipped undetected:parsers/javascript/generate_report.js— a run-only script (top-levelreadFileSyncof an absolute path), no exports, no callers.parsers/javascript/dataset_enhancer.js— an unreachable orphaned duplicate of the live, imported+testedparsers/python/dataset_enhancer.py(nomodule.exports, no requirer, no npm/CI/subprocess invocation).How
.js/.ts(strip//comments, anti-vacuous floor>= 3, JS self-test line)./bughunt-repros/(a local scratch dir carrying personal paths).Tests
tests/test_no_hardcoded_paths.py: 405 passed (now including the 6 surviving shipped JS files). JS parser + multi-language suites: 236 passed — the deletions break nothing (no importers).Compatibility
None — both files are unreachable dead code; the live parser path is unaffected.
Note for maintainers
The deeper cause behind this class: ~30 PRs merged with red CI on the same hardcoded-path failures (later healed on
master). Consider branch protection onmaster— require the CI check green before merge and disable admin override-merge on red — so a green guard actually gates the merge.