Skip to content

fix: track open dict copy keysets - #673

Open
ApexWorm wants to merge 1 commit into
peteromallet:mainfrom
ApexWorm:fix/dict-copy-keyset-provenance
Open

fix: track open dict copy keysets#673
ApexWorm wants to merge 1 commit into
peteromallet:mainfrom
ApexWorm:fix/dict-copy-keyset-provenance

Conversation

@ApexWorm

Copy link
Copy Markdown

Problem

The Python dict-key detector treated dict copies of externally supplied mappings as closed schemas. Reads of valid runtime keys were then reported as phantom reads and near misses.

Fix

Track keyset provenance through dict literals, dict constructors, tracked aliases, copy calls, unpacking, updates, and dynamic writes. Suppress phantom and near-miss findings only when the resulting keyset is open; retain typo detection for closed local schemas.

Verification

  • 42 focused and related dict-key detector tests passed
  • Ruff, py_compile, and diff checks passed
  • Live validation removed phantom findings from three representative external-mapping copies in the Frequency Coordination System repo
  • Full suite: 5,809 passed, 4 skipped; the two failures are duplicate instances of a pre-existing review-prompt assertion reproduced on pristine main

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