Add Sortium - #231
Conversation
There was a problem hiding this comment.
Pull request overview
Adds the Sortium plugin to the Millennium Plugin Database as a Git submodule under plugins/, enabling advanced Steam library sorting using external completion/achievement metrics.
Changes:
- Register
plugins/sortiumas a new submodule pointing tohttps://github.com/SalvadorCorreia/Sortium. - Configure the submodule to track the
prodbranch (via.gitmodules).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Nice plugin, and an unusual one to review: a Lua backend that reaches out to third party APIs deserves a closer look than a display-only plugin, so I read all of it rather than skimming. Short version: I found nothing concerning on the security side, one blocker, and one bug I think you will want to fix before anyone runs a full sync. 1. Blocker: the build fails from a clean checkoutReproduced exactly as the store CI runs it ( Cause. TypeScript 7 no longer exposes Fix, verified. Declaring TypeScript explicitly is enough. With only this change, "devDependencies": {
"typescript": "5.9.3"
},
"pnpm": {
"overrides": {
"typescript": "5.9.3"
}
}I hit precisely this on my own plugin, and a reviewer caught it the same way, so this is me passing the favour along rather than anything clever. Related. Minor. 2. Serious: one failed request parks the whole queue
if (isHigh) this.highPriority.push(target);
else this.lowPriority.push(target);
await new Promise((r) => setTimeout(r, 1000000));
It runs on any failure not classified as a rate limit, so anything outside The queue is a single sequential loop, so this does not delay one item, it stops everything behind it for nearly 17 minutes. The failing target is also pushed back before the sleep, and the high priority queue is LIFO ( For what it is worth, I could not trigger it through unknown app ids: both Suggested shape: a short backoff, a retry cap per app, and moving a repeatedly failing app out of the queue instead of back onto the top of it. 3. No cleanup on unload
4. Hardening notes on the Lua backendNone of these are remotely exploitable. They matter because the backend is not sandboxed the way the frontend is. Path built from unvalidated IPC input. local function get_cache_path(stream_id)
return millennium.get_install_path() .. "/cache_" .. stream_id .. ".json"
end
App id interpolated into the URL. Correct already: no 5. Transparency: the HLTB data comes from a third partyThe feature is presented as HowLongToBeat and the metric ids are To state the thing a reviewer should actually answer: only the app id leaves the machine, over HTTPS, to two hardcoded hosts. No SteamID, no account identifier, no library listing, no telemetry, no analytics. I grepped for the usual suspects and found none: no 6. Smaller points
Happy to re-test once the build is sorted, and to take screenshots of the sort views for the PR if that helps. |
|
@Norphirion, thank you very much for your thorough analysis of my codebase and for your detailed feedback |
Adds Sortium https://github.com/SalvadorCorreia/Sortium as a submodule under
plugins/.Sortium introduces advanced collection sorting to the Steam client using external data metrics.
Key Features
MIT licensed.