Skip to content

FIX Preserve word-selection parameters in StringJoinConverter identifiers - #2976

Merged
Richard Lundeen (richlundeen) merged 10 commits into
microsoft:mainfrom
aspire488:fix/string-join-identifier-selection
Oct 6, 2026
Merged

Richard Lundeen (richlundeen) merged 10 commits into
microsoft:mainfrom
aspire488:fix/string-join-identifier-selection

Conversation

@aspire488

Copy link
Copy Markdown
Contributor

Description

Tests and Documentation

Description

Fixes #2973.

"StringJoinConverter._build_identifier()" previously replaced the identifier parameters from "WordLevelConverter" instead of preserving them. This caused converters with different "word_selection_strategy" configurations to produce the same identifier and registry name, even though they can produce different outputs.

Changes

  • Preserve the parent "WordLevelConverter" identifier parameters when building the "StringJoinConverter" identifier.
  • Keep "join_value" as the converter-specific parameter.
  • Add regression coverage for:
    • distinct word-selection configurations producing distinct identifiers
    • equivalent index selections producing the same identifier
    • independently registering converters with different selection configurations

Testing

Added focused unit tests in "tests/unit/converter/test_string_join_converter.py".

The PyRIT test suite was not executed in the connector environment; CI should provide full validation.

@LE0-Lin

Copy link
Copy Markdown
Contributor

Thanks for working on this. I had a local fix and regression tests prepared when filing #2973 and was waiting for issue curation. Could we coordinate on the remaining coverage and the default-identifier compatibility question? The local work used Codex assistance.

@aspire488

Copy link
Copy Markdown
Contributor Author

Thanks for raising the compatibility concern. I’ve updated the PR to preserve the legacy identifier for the default StringJoinConverter configuration while still including word-selection parameters for non-default strategies.
I also added regression coverage for:
default identifier compatibility
explicit AllWordsSelectionStrategy compatibility
distinct selection configurations producing distinct identifiers
equivalent index sets producing the same identifier
registering distinct configurations independently

@richlundeen

Copy link
Copy Markdown
Contributor

This fix looks good! Zhibo Lin (@LE0-Lin), also thank you for opening a great issue, which imo is just as important. I'll make sure to credit you in this merge and we can get it in

Co-authored-by: Zhibo Lin <147509942+LE0-Lin@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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.

Reviewed with GitHub Copilot. This addresses #2973: distinct word selections have distinct identifiers and registry names, equivalent index sets keep the same identity, and the legacy default identity is preserved. Added coverage for default/partial registration, exact parameter contents, and custom all-words subclasses. All 15 scoped tests and all pre-commit hooks passed locally. Credit to Joel (@aspire488) for the fix and Zhibo Lin (@LE0-Lin) for the original diagnosis and reproduction; LE0-Lin is also credited as a co-author in the new commit. CI must pass before this enters the merge queue.

@LE0-Lin

Copy link
Copy Markdown
Contributor

Thanks for the review and for crediting the original diagnosis and reproduction. I appreciate the coordination and the added compatibility coverage.

@richlundeen
Richard Lundeen (richlundeen) added this pull request to the merge queue Oct 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 5, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep cancellation cleanup guards independent of SQLite history and worker dispatch for the mocked SDK constructor.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@richlundeen
Richard Lundeen (richlundeen) added this pull request to the merge queue Oct 5, 2026
@richlundeen
Richard Lundeen (richlundeen) removed this pull request from the merge queue due to a manual request Oct 5, 2026
@richlundeen
Richard Lundeen (richlundeen) added this pull request to the merge queue Oct 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 6, 2026
Wait for durable progress and worker readiness or the original scenario failure, with a bounded whole-test timeout. Always cancel and drain owned tasks before memory fixture teardown. Preserve real persistence, cancellation, worker-exit, and resume assertions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@richlundeen
Richard Lundeen (richlundeen) added this pull request to the merge queue Oct 6, 2026
Merged via the queue into microsoft:main with commit 4659ebe Oct 6, 2026
50 checks passed
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.

BUG: StringJoinConverter identifiers collide across distinct word selections

3 participants