FIX Batch v1.0 conversation migration backfills#2266
Merged
romanlutz merged 5 commits intoJul 23, 2026
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3987fdd3-8422-4312-9d60-647cba9c6802
Reduce SQL Server round trips when backfilling Conversations and target identifier links. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fdbe13ad-99bf-443d-a98e-95ff5d7d023e
Revert v1.0 release metadata so this PR contains only the migration fix. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fdbe13ad-99bf-443d-a98e-95ff5d7d023e
behnam-o
approved these changes
Jul 23, 2026
hannahwestra25
approved these changes
Jul 23, 2026
Report bounded progress while inserting conversations, materializing target graphs, staging target links, and applying the final update. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fdbe13ad-99bf-443d-a98e-95ff5d7d023e
Batch scorer, scenario, converter, and attack identifier phases while preserving migration fallback behavior and bounded progress output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fdbe13ad-99bf-443d-a98e-95ff5d7d023e
romanlutz
added a commit
that referenced
this pull request
Jul 23, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3987fdd3-8422-4312-9d60-647cba9c6802 Copilot-Session: fdbe13ad-99bf-443d-a98e-95ff5d7d023e
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.
Description
The v1.0 upgrade path performs one database round trip per conversation while backfilling conversation and target-link data. At the production data shape, this leaves tens of thousands of SQL Server operations in both
b2f4c6a8d1e3ande5f7a9c1b3d2; the original migration has already rolled back after communication-link failures, and disposable SQL Server profiling showed the later target-link backfill becoming the dominant bottleneck after fixing the first one.This change:
Conversationsin bounded 400-row, 800-parameter statements;pyrit_version, best-effort identifier handling, and the outer Alembic transaction;This intentionally modifies two committed migration revisions. Production is still before both revisions, so a new later revision cannot reduce the round trips that the upgrade must execute first. The Alembic immutability guard therefore requires an explicit release-maintainer exception for this hotfix.
Disposable SQL Server 2022 validation reduced the complete
9c8b7a6d5e4fto v1 head upgrade to 33.141 seconds.e5f7a9c1b3d2fell from 398.68 seconds to 9.679 seconds. No production database was accessed.Tests and Documentation
tests/unit/memory/test_migration.py: 47 passed.git diff --checkpassed.