Skip to content

fix(evaluation): reject duplicate scenario IDs - #695

Merged
DhavalRepo18 merged 1 commit into
IBM:mainfrom
KRYSTALM7:bugfix/detect-scenario-id-collisions
Nov 24, 2026
Merged

DhavalRepo18 merged 1 commit into
IBM:mainfrom
KRYSTALM7:bugfix/detect-scenario-id-collisions

Conversation

@KRYSTALM7

Copy link
Copy Markdown
Contributor

Summary

Fixes #679.

Previously, join_records() constructed a scenario lookup using scenario IDs as dictionary keys. When multiple scenarios shared the same ID, later entries silently overwrote earlier ones, potentially associating trajectories with incorrect reference scenarios.

Changes

  • Detect duplicate scenario IDs before processing trajectories.
  • Raise a deterministic ValueError listing all conflicting IDs.
  • Preserve existing behavior for unique IDs, null trajectory IDs, and unmatched trajectory IDs.
  • Add regression tests covering duplicate detection and existing join behavior.

Validation

  • Loader tests: 16 passed.
  • Full evaluation test suite: 107 passed, 6 unrelated baseline failures.
  • git diff --check: passed.

The six existing failures concern static JSON scorer behavior and were reproduced on the unchanged baseline.

Ruff also reports pre-existing diagnostics and formatting differences, with no new diagnostics introduced by this change.

Signed-off-by: KRYSTALM7 <sujankumar7702@gmail.com>
@KRYSTALM7

Copy link
Copy Markdown
Contributor Author

Hi @DhavalRepo18 , I've completed the duplicate scenario ID validation and regression tests for #679. The focused loader tests are passing, and I've verified that the remaining evaluation test failures are also present on the unchanged baseline. I've Opened a PR for this. Review this at your convenience

@DhavalRepo18
DhavalRepo18 merged commit 075bd1a into IBM:main Nov 24, 2026
3 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.

Scenario id values collide across scenario files

2 participants