diff --git a/CHANGELOG.md b/CHANGELOG.md index e20fc86cb..98811b5b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ Changed `wf10_batch.robot` to be less likely to create files, and ## [Unreleased] +Data integrity fix: ValidationAttachmentRepository argument swap (#7492): Fixed +a critical data integrity issue in `ValidationAttachmentRepository.attach` where +`validation_name` and `resource_id` arguments were being silently swapped based on a +fragile heuristic (`"/" in resource_id`). Arguments are now passed in the correct order, +ensuring data is stored with proper parameter values. + - Hardened the TDD bug-fix quality gate for issue #629: PR parsing now requires whole-word closing keywords (avoids false positives like "prefixes #12"), TDD bug tag discovery now uses exact token matching diff --git a/src/cleveragents/infrastructure/database/repositories.py b/src/cleveragents/infrastructure/database/repositories.py index c8f9e6144..95da8038d 100644 --- a/src/cleveragents/infrastructure/database/repositories.py +++ b/src/cleveragents/infrastructure/database/repositories.py @@ -3916,9 +3916,6 @@ class ValidationAttachmentRepository: from ulid import ULID as _ULID - if "/" in resource_id and "/" not in validation_name: - validation_name, resource_id = resource_id, validation_name - session = self._session() try: # Check for existing attachment with same validation+resource+scope