[Backend] Remove 12 genuinely dead private parameters (SonarQube S1172) — the residue after the family's triage #647

Closed
opened 2026-07-17 07:25:53 +00:00 by spikerj · 2 comments
Owner

Final slice of the #641 S1172 family (74 findings total): after the FPs (uniform dispatch shapes, documented stubs, impossible-to-propagate tokens), the fixes (3 token propagations, PR #350), and the ticket-tracked real defects (#644 cross-org authz, #645 tunneling/attribution, #646 broken hierarchical A*), 12 parameters were verified genuinely dead — private methods, single call sites, no reflection/delegate dependence:

BuildAlert(state→), UpdateApproachPhase(currentPos→), CheckDeadlock(deltaTime→), FindChainAnchor(getSpacecraftById→), ComputePotentialField(start→), RedisVoxelCache private ctor (logger→), HandlePortalInteraction(portal→), SaveEpubCoverImageAsync(username→), ExtractEpubImagesAsync(uploadId,username→), ExtractAndStorePageImagesAsync(uploadId,username→), SaveToStagingAsync(uploadId→).

Deliberately skipped: SendBookProcessingNotificationAsync's unused bookId — 13-param signature with many call sites, and bookId plausibly BELONGS in the notification (left open in sonar as a feature question). DecompilerRouter's stub params FP'd (documented TODO).

Final slice of the #641 S1172 family (74 findings total): after the FPs (uniform dispatch shapes, documented stubs, impossible-to-propagate tokens), the fixes (3 token propagations, PR #350), and the ticket-tracked real defects (#644 cross-org authz, #645 tunneling/attribution, #646 broken hierarchical A*), 12 parameters were verified genuinely dead — private methods, single call sites, no reflection/delegate dependence: BuildAlert(state→), UpdateApproachPhase(currentPos→), CheckDeadlock(deltaTime→), FindChainAnchor(getSpacecraftById→), ComputePotentialField(start→), RedisVoxelCache private ctor (logger→), HandlePortalInteraction(portal→), SaveEpubCoverImageAsync(username→), ExtractEpubImagesAsync(uploadId,username→), ExtractAndStorePageImagesAsync(uploadId,username→), SaveToStagingAsync(uploadId→). Deliberately skipped: SendBookProcessingNotificationAsync's unused bookId — 13-param signature with many call sites, and bookId plausibly BELONGS in the notification (left open in sonar as a feature question). DecompilerRouter's stub params FP'd (documented TODO).
Author
Owner

Extended PR #352 with the S1144 fully-dead members verified this pass: FindChainAnchor (uncalled method), the Lean handler's PublishUploadReceivedEventAsync (dead since #574 moved publishing to the controller), and the embeddings _consumer field (never assigned). Two dangerous-fix FPs documented in SonarQube: PreRegistrationHub._cleanupTimer and KeycloakEventService._indexCreation are KEEP-ALIVE roots — the rule's 'remove unused field' would silently delete the rate-limit cleanup timer and Mongo index creation respectively.

Extended PR #352 with the S1144 fully-dead members verified this pass: FindChainAnchor (uncalled method), the Lean handler's PublishUploadReceivedEventAsync (dead since #574 moved publishing to the controller), and the embeddings _consumer field (never assigned). Two dangerous-fix FPs documented in SonarQube: PreRegistrationHub._cleanupTimer and KeycloakEventService._indexCreation are KEEP-ALIVE roots — the rule's 'remove unused field' would silently delete the rate-limit cleanup timer and Mongo index creation respectively.
Author
Owner

Resolved in spikersoft-backend PR #352 (merged, 28/28 checks green): the 12 verified-dead private parameters plus the fully-dead members the S1144 pass confirmed (FindChainAnchor, the Lean handler's superseded upload-received publisher, the unassigned embeddings consumer field). The dangerous-fix FPs from the same families (keep-alive timer/task roots, JSON-deserialization setters, the passport-audit side-effect call) are documented in SonarQube with their proofs. Closing.

Resolved in spikersoft-backend PR #352 (merged, 28/28 checks green): the 12 verified-dead private parameters plus the fully-dead members the S1144 pass confirmed (FindChainAnchor, the Lean handler's superseded upload-received publisher, the unassigned embeddings consumer field). The dangerous-fix FPs from the same families (keep-alive timer/task roots, JSON-deserialization setters, the passport-audit side-effect call) are documented in SonarQube with their proofs. Closing.
Sign in to join this conversation.