Skip to content

fix(tests): simplify allocation assertion for static analysis - #560

Merged
DevSkyLex merged 1 commit into
developfrom
fix/maintenance-quality
Oct 7, 2026
Merged

DevSkyLex merged 1 commit into
developfrom
fix/maintenance-quality

Conversation

@DevSkyLex

@DevSkyLex DevSkyLex commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Context

Change Summary

Introduce a local $sources array, 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

  • Regression risk

Functional Impact

  • No 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

  • No special risk

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

  • Targeted PHPUnit file with the standard repository bootstrap and isolated PostgreSQL templates: 18 tests, 119 assertions passed.
  • PHP 8.4 syntax check and scoped PHP CS Fixer check passed.
  • git diff --check passed.

CI Validation

  • I expect the standard PR checks to cover this change
  • This PR needs an extra manual verification outside standard CI

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

  • No special deployment step

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

Review this pull request using the repository Copilot instructions.
Focus on actionable findings in the changed assertion and its equivalence.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T10:51:47.117933Z 0362c95 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added area:tests Test-only changes size:xs Small PR: under 50 changed lines state:ready Ready for review labels Oct 7, 2026
@DevSkyLex
DevSkyLex merged commit 1b4420f into develop Oct 7, 2026
18 checks passed
@DevSkyLex
DevSkyLex deleted the fix/maintenance-quality branch October 9, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tests Test-only changes size:xs Small PR: under 50 changed lines state:ready Ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant