Skip to content

fix(analysis): pass reserved/prefix to safenames sanitize call (rebases #267)#293

Merged
jqnatividad merged 1 commit into
mainfrom
safenames-symmetry-rebased
May 16, 2026
Merged

fix(analysis): pass reserved/prefix to safenames sanitize call (rebases #267)#293
jqnatividad merged 1 commit into
mainfrom
safenames-symmetry-rebased

Conversation

@jqnatividad
Copy link
Copy Markdown
Collaborator

Summary

Cherry-picks #267 (by @minhajuddin2510) onto current main. The migration deleted `jobs.py` (where #267's 1-line change lived) so the original PR became dead-on-main — same situation as #270.

What the change does

Brings the qsv `safenames --mode conditional` (sanitize) call into parity with the `--mode json` (detect) call directly above it in `analysis.py`. The detect call already passes `reserved=conf.RESERVED_COLNAMES` + `prefix=conf.UNSAFE_PREFIX`; the sanitize call didn't, so qsv fell back to its built-in defaults — which could disagree with the detection rules and produce renamed columns that didn't match what was reported as unsafe.

Tests

95/95 unit tests pass in `dpp-test`.

Test plan

  • `ci.yml` (DataPusher+ Integration CI) — quick-dir matrix still green; no regression on files with unsafe column names.

🤖 Generated with Claude Code

Brings the qsv ``safenames --mode conditional`` (sanitize) call into
parity with the ``--mode json`` (detect) call directly above. The
detect call already passes ``reserved=conf.RESERVED_COLNAMES`` and
``prefix=conf.UNSAFE_PREFIX``; the sanitize call did not, so qsv
fell back to its built-in defaults — which could disagree with the
detection rules and produce renamed columns that didn't match what
was reported as unsafe.

Originally fixed in PR #267 by @minhajuddin2510 against the
pre-migration ``jobs.py`` (deleted by the Prefect 3 migration); this
PR carries the equivalent change to the new
``jobs/stages/analysis.py`` location.

Closes #267.

Co-Authored-By: @minhajuddin2510
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jqnatividad jqnatividad merged commit 560b1d2 into main May 16, 2026
1 check passed
@jqnatividad jqnatividad deleted the safenames-symmetry-rebased branch May 16, 2026 14:01
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.

1 participant