Repository navigation
fix(tests): simplify allocation assertion for static analysis - #560
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
9be758c6a55b8b180a5e288a2095e51343a8eaacwarned that it could not parse the array-literal/property expression in the maintenance cost allocation test.Change Summary
Introduce a local
$sourcesarray, pass it to the resolver and use it for the unchanged equipment identity assertion. All cycle, allocation and incomplete identity assertions remain intact.Review Guide
Modules / Areas
MaintenanceCost unit tests.
Main Files / Entry Points
tests/Unit/MaintenanceCost/Application/Service/MaintenanceCostAllocationResolverTest.php,testCyclicCurrentCorrectionsRetainTheirOwnIncompleteIdentities.Reviewer Focus
Functional Impact
Before
PHP 8.4 accepts
[$first, $second, $self][$index]->equipmentId, but Sonar logged a parser warning at line 263, column 57.After
The assertion reads
$sources[$index]->equipmentId. It uses the same readonly DTO instances passed by value to the resolver and compares the same values.Risk And Rollback
Risk Notes
Only an existing test expression changes; production code and the strength of its assertions are unchanged.
Rollback Plan
Revert this commit; no persisted data changes.
Validation
Local Validation
git diff --checkpassed.CI Validation
Additional Evidence
The original warning comes from API develop CI run 37602461089, Sonar job 112733059474. This correction does not establish why the Quality Gate failed; the exact merged revision must be analyzed again.
Deployment Notes
Details
The ordinary successful develop CI and Sonar gate remain required before development deployment. Development fixtures must be preserved.
Known Gaps
Merged develop verification: CI run 37611125954 analyzed commit 1b4420f. The parser warning is gone, Clover imports successfully and all ordinary API gates pass. Sonar still reports a failed Quality Gate; the current gate metrics and issue locations remain unresolved. No diagnostic workflow has been added by this PR. Development deployment remains blocked.
Copilot Review Request