Skip to content

[BUG] Backward compatibility issue in QuerySet serialization causing UI/Backend mismatchΒ #391

@iprithv

Description

@iprithv

Description:

After PR #264, the implementation of convertQuerySetQueriesList() in
PutQuerySetTransportAction.java was modified to change how query text is serialized and stored.

Previously:

  • Query text and reference answer were concatenated using a delimiter
  • UI expected this format and parsed it accordingly

New behavior:

  • Reference answer concatenation logic was removed
  • Instead, customizedKeyValueMap is serialized as JSON and appended
  • Storage format changed without backward compatibility handling

Observed Issue:

  • Existing query sets created with the old format are interpreted incorrectly
  • UI displays data differently than what backend stores
  • Inconsistent behavior when loading legacy query sets
  • No migration or parsing fallback implemented

Impact:

  • Breaks backward compatibility
  • UI and backend data format diverge
  • Existing stored query sets may appear corrupted or incorrectly rendered
  • Potential loss of reference answer visibility

Steps to Reproduce:

  1. Create query set using pre-PR version
  2. Upgrade to version with PR [SRW] LLM Judge Dynamic Template BackendΒ #264
  3. Load or update query set
  4. Observe UI rendering mismatch

Expected Behavior:

  • Legacy data should still render correctly
  • Either:
    • Maintain backward-compatible parsing
    • OR provide migration logic
    • OR version the storage format

Actual Behavior:

  • Data interpretation changes silently
  • UI output differs from stored representation

Root Cause (Suspected):

Serialization format changed from:
queryText + DELIMITER + referenceAnswer

To:

queryText + DELIMITER + JSON(customizedKeyValueMap)

Without compatibility handling.

Suggested Fix:

  • Add parsing fallback for legacy format
  • Introduce format versioning
  • Provide migration script
  • Update UI parsing logic accordingly

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    πŸ†• New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions