fix(data-integrity): remove silent argument swap in ValidationAttachmentRepository.attach
CI / helm (push) Successful in 1m2s
CI / push-validation (push) Successful in 52s
CI / benchmark-regression (push) Failing after 2m17s
CI / lint (push) Successful in 2m46s
CI / quality (push) Successful in 3m5s
CI / build (push) Successful in 2m20s
CI / typecheck (push) Successful in 3m21s
CI / security (push) Successful in 3m21s
CI / e2e_tests (push) Successful in 1m59s
CI / integration_tests (push) Successful in 5m38s
CI / unit_tests (push) Successful in 9m15s
CI / docker (push) Successful in 1m31s
CI / coverage (push) Successful in 10m23s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Successful in 1h31m47s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 1m7s
CI / push-validation (pull_request) Successful in 43s
CI / lint (pull_request) Successful in 1m31s
CI / quality (pull_request) Successful in 1m31s
CI / typecheck (pull_request) Successful in 1m42s
CI / security (pull_request) Successful in 1m51s
CI / integration_tests (pull_request) Successful in 3m58s
CI / unit_tests (pull_request) Failing after 5m8s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
CI / helm (push) Successful in 1m2s
CI / push-validation (push) Successful in 52s
CI / benchmark-regression (push) Failing after 2m17s
CI / lint (push) Successful in 2m46s
CI / quality (push) Successful in 3m5s
CI / build (push) Successful in 2m20s
CI / typecheck (push) Successful in 3m21s
CI / security (push) Successful in 3m21s
CI / e2e_tests (push) Successful in 1m59s
CI / integration_tests (push) Successful in 5m38s
CI / unit_tests (push) Successful in 9m15s
CI / docker (push) Successful in 1m31s
CI / coverage (push) Successful in 10m23s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Successful in 1h31m47s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 1m7s
CI / push-validation (pull_request) Successful in 43s
CI / lint (pull_request) Successful in 1m31s
CI / quality (pull_request) Successful in 1m31s
CI / typecheck (pull_request) Successful in 1m42s
CI / security (pull_request) Successful in 1m51s
CI / integration_tests (pull_request) Successful in 3m58s
CI / unit_tests (pull_request) Failing after 5m8s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
Fixes a critical data integrity bug where validation_name and resource_id arguments were being silently swapped based on a fragile heuristic when resource_id contained '/'. This caused silent data corruption without any error being raised. The 3-line conditional swap block has been removed from ValidationAttachmentRepository.attach(), ensuring arguments flow directly from caller to the persistence layer in the correct order.
This commit was merged in pull request #8177.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user