Repository navigation
fix: preserve distinct identifier types throughout CLI traversal - #3449
Merged
Merged
Conversation
Keep identifier types in pending and completed target identity, preserve the public extraction mapping API, and disambiguate same-run report filename collisions without changing ordinary writer labels. Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
Add offline regressions for batch, recursive and link-derived target identity; ordinary and colliding report paths; legacy slash-containing writer labels; and public extraction mapping compatibility. Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
Owner
|
Thanks, keying the queue and the dedup set on (value, type) is the right fix. The report filename collision logic adds a lot for the rare same value, different type case, though. Could you drop it, along with the unrelated blank-line changes, and keep the PR to the typed queue, dedup and recursive extraction? |
Drop the report filename collision handling and the unrelated blank-line changes, as asked in review. The typed queue, dedup and recursive extraction are unchanged. Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
Remove the tests for the dropped report filename collision handling, and the one assertion in the slash-label test that needed distinct filenames. Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
Owner
|
Thanks for trimming it down! Keying the queue on value and type is a clean fix, and the PR reads much easier now. |
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.
Summary
Preserve the identifier type when queuing and deduplicating CLI targets. A username and a VK ID can contain the same text without naming the same target.
extract_ids_from_resultsmapping API unchanged. The CLI uses a private iterator to retain typed pairs across sites and links.Reproduction
An input file containing
username:12345andvk_id:12345currently runs only the latter search. A recursive search starting from username12345also skips an extracted VK ID12345as already checked. Local synthetic fixtures reproduce both without contacting any external profile service.The fix searches both site sets and retains both results in the general report tuple list. Within-type case-insensitive deduplication and input order remain unchanged.
Validation
Base:
a6d585479f7a47b9e1400481d12b73eb477f6475.make test: base 725 passed, 5 skipped, 82% coverage; candidate 746 passed, 5 skipped, 84% coverage.make formatrun; unrelated baseline formatting drift restored. New test file is Black clean.git diff --checkpasses.make lintremains baseline-red: 139 mypy errors in 21 files on both base and candidate, with identical normalized file/message diagnostics. Hard flake8 errors: zero.Boundaries
This prevents same-run filename collisions, not normal overwrite-on-rerun behavior. The first target keeps its existing stem; later collisions receive typed suffixes.
Public mapping APIs keep their existing behavior. The CLI cannot recover types already collapsed inside one upstream mapping; it now preserves every typed pair received across batch entries, result mappings and links.
For slash-containing identifiers, filenames and per-target writer labels keep their existing sanitization. Raw typed target identity remains intact for traversal and the general result list.