fix(data-integrity): remove silent argument swap in ValidationAttachmentRepository.attach #11171

Closed
HAL9000 wants to merge 1 commit from fix-arg-swap-validation-attachment-8177 into master
Owner

Summary

  • data-integrity fix: Removed the fragile heuristic that silently swapped validation_name and resource_id when resource_id contained "/" but validation_name did not -- causing silent data corruption (#7492)
  • Added BDD regression suite with 12 scenarios for argument order preservation across edge cases
  • Updated existing swap test to verify correct preservation behavior

PR Compliance Checklist

[x] CHANGELOG.md entry added under [Unreleased]
[x] CONTRIBUTORS.md updated with contribution entry
[x] Commit footer includes ISSUES CLOSED: #7492
[x] BDD tests added (validation_argument_order_integrity.feature, 12 scenarios)
[x] Epic reference linked in PR description
[x] Labels applied via this API call
[x] Milestone assigned via this API call

Linked Issues

  • Closes #7492 (data integrity bug: silent argument swap)

Epic Parent: issue #7480

## Summary - **data-integrity fix**: Removed the fragile heuristic that silently swapped ``validation_name`` and ``resource_id`` when ``resource_id`` contained "/" but ``validation_name`` did not -- causing silent data corruption (#7492) - Added BDD regression suite with 12 scenarios for argument order preservation across edge cases - Updated existing swap test to verify correct preservation behavior ## PR Compliance Checklist [x] CHANGELOG.md entry added under [Unreleased] [x] CONTRIBUTORS.md updated with contribution entry [x] Commit footer includes ISSUES CLOSED: #7492 [x] BDD tests added (validation_argument_order_integrity.feature, 12 scenarios) [x] Epic reference linked in PR description [x] Labels applied via this API call [x] Milestone assigned via this API call ## Linked Issues - Closes #7492 (data integrity bug: silent argument swap) Epic Parent: issue #7480
fix(data-integrity): remove silent argument swap in ValidationAttachmentRepository.attach
Some checks failed
CI / lint (pull_request) Failing after 3s
CI / typecheck (pull_request) Failing after 3s
CI / security (pull_request) Failing after 3s
CI / integration_tests (pull_request) Failing after 3s
CI / unit_tests (pull_request) Failing after 3s
CI / quality (pull_request) Failing after 3s
CI / helm (pull_request) Failing after 3s
CI / build (pull_request) Failing after 2s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / push-validation (pull_request) Failing after 3s
CI / status-check (pull_request) Failing after 4s
406fa93ce5
Remove the fragile heuristic ("//" in resource_id") from
ValidationAttachmentRepository.attach() that silently swapped
validation_name and resource_id, causing silent data corruption
when resource IDs contained slashes. Arguments now flow directly
from caller to the persistence layer in their correct positional order.

Added comprehensive BDD regression suite (validation_argument_order_integrity.feature)
with 12 scenarios covering: simple IDs, slash-containing IDs, dual-slash IDs,
project/plan overrides, mode/args overrides, and edge cases.

Also updated repositories_uncovered_branches.feature existing swap test
to verify preservation instead of swapping.

ISSUES CLOSED: #7492
HAL9000 added this to the v3.2.0 milestone 2026-05-12 19:40:27 +00:00
HAL9000 closed this pull request 2026-05-12 19:41:20 +00:00
Author
Owner

Duplicate of PR #8177 which already contains the fix. Closing in favor of #8177.

Duplicate of PR #8177 which already contains the fix. Closing in favor of #8177.
Some checks failed
CI / lint (pull_request) Failing after 3s
Required
Details
CI / typecheck (pull_request) Failing after 3s
Required
Details
CI / security (pull_request) Failing after 3s
Required
Details
CI / integration_tests (pull_request) Failing after 3s
Required
Details
CI / unit_tests (pull_request) Failing after 3s
Required
Details
CI / quality (pull_request) Failing after 3s
Required
Details
CI / helm (pull_request) Failing after 3s
CI / build (pull_request) Failing after 2s
Required
Details
CI / coverage (pull_request) Has been skipped
Required
Details
CI / docker (pull_request) Has been skipped
Required
Details
CI / push-validation (pull_request) Failing after 3s
CI / status-check (pull_request) Failing after 4s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core!11171
No description provided.