fix: remove dead serializeState + normalize PATCH error responses#4076
Merged
Conversation
#4057 follow-ups) Two audit cleanup items: 1. Remove dead serializeState() passthrough in local-storage.ts. Was just forwarding to serializeStateLightweight() with no callers. 2. Normalize PATCH /v1/sessions/:id error responses from reply.code() + return {} to reply.status().send() pattern matching all other routes.
Contributor
There was a problem hiding this comment.
β Approved β clean audit cleanup.
Review:
- Dead
serializeStatepassthrough removed β zero callers, no impact. Correct. - PATCH error responses normalized to
reply.status(N).send({...})β matches all other routes, behaviorally identical.
All 9 gates pass. CI green, 5192 tests, security scans clean, targets develop.
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.
Audit cleanup (#4051 #4057 follow-ups)
Two small items from Argus audit:
1. Dead
serializeStatepassthroughsrc/services/acp/local-storage.ts:951βserializeState()was justreturn serializeStateLightweight(state). Zero callers (not exported, not imported). Removed 6 lines.2. PATCH error response normalization
src/routes/sessions.tsβPATCH /v1/sessions/:idusedreply.code(400); return { error, code }pattern. All other routes usereply.status(400).send({ error, code }). Normalized to match.Verification