Skip to content

Expand array props in list storage API#909

Merged
tudddorrr merged 1 commit intodevelopfrom
expand-listed-storage-props
Mar 30, 2026
Merged

Expand array props in list storage API#909
tudddorrr merged 1 commit intodevelopfrom
expand-listed-storage-props

Conversation

@tudddorrr
Copy link
Copy Markdown
Collaborator

No description provided.

@tudddorrr tudddorrr added the enhancement New feature or request label Mar 30, 2026
@claude
Copy link
Copy Markdown

claude bot commented Mar 30, 2026

PR Review: Expand array props in list storage API

Overall this is a clean, well-tested change. One minor concern.


🔵 Minor - Code Quality

Unguarded JSON.parse on line 106 of list-storage.ts

if (isArrayKey(key)) {
const values: string[] = JSON.parse(prop.value)
return values.map((v) => ({ ...prop, value: v }))
}

If prop.value is not valid JSON (e.g. a stale/corrupted Redis entry), this throws a SyntaxError that surfaces as a 500. The data flow through GameChannelStorageProp.flatten() guarantees it will always be a JSON array string under normal conditions, so the risk is low. But a try/catch here would prevent a corrupted cache key from breaking the entire request:

if (isArrayKey(key)) {
try {
const values: string[] = JSON.parse(prop.value)
return values.map((v) => ({ ...prop, value: v }))
} catch {
return [prop] // fall back to raw value on parse failure
}
}


No other issues found. The expansion logic is correct, the caching behaviour is preserved, and the new tests cover both the DB and Redis-cached paths.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.41%. Comparing base (230291d) to head (952ec6a).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #909      +/-   ##
===========================================
+ Coverage    97.39%   97.41%   +0.01%     
===========================================
  Files          405      405              
  Lines         6599     6604       +5     
  Branches       870      871       +1     
===========================================
+ Hits          6427     6433       +6     
  Misses          88       88              
+ Partials        84       83       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tudddorrr tudddorrr merged commit 14fe8e1 into develop Mar 30, 2026
10 checks passed
@tudddorrr tudddorrr deleted the expand-listed-storage-props branch March 30, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant