Skip to content

feat: add native Steam and GOG ID index - #375

Merged
ReenigneArcher merged 2 commits into
LizardByte:masterfrom
sol-aeternum:feat/native-store-id-index
Dec 3, 2026
Merged

ReenigneArcher merged 2 commits into
LizardByte:masterfrom
sol-aeternum:feat/native-store-id-index

Conversation

@sol-aeternum

Copy link
Copy Markdown
Contributor

Description

Add optional versioned Steam/GOG ID lookup shards generated from the existing IGDB game records. This lets clients locate candidate GameDB records directly by a known store ID rather than relying entirely on name variations and title-bucket searches.

The index writes 256 deterministic shards per supported store using the first byte of SHA-256 over each canonical decimal UID (ASCII). This avoids the modulo skew of Steam IDs that are multiples of 10. It retains every linked game ID when a UID is shared, and exposes a manifest with schema information, coverage counts and a test-mode partial flag. Malformed or unsupported IDs are ignored. The existing game records and title/localized buckets are unchanged; no new IGDB queries or credentials are required. Consumers should still verify the store ID in the retrieved game record.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Testing

Rebased on current master (0a7cc54f62da65dace3f4f24a15edb73b3736989). Added regression tests for SHA-256 shard vectors including odd/even shards for Steam-style IDs, supported source IDs, numeric bounds, malformed inputs, duplicate UID claims and same-shard collisions, deterministic output, shard replacement, manifest flags, and unchanged legacy output.

  • uv sync --locked --extra dev --python 3.14 --no-build --no-install-project --no-python-downloads: passed.
  • uv run --no-build --no-sync python -m pytest tests: 1,256 passed, 100% measured Python coverage (Python 3.14.10).
  • npm ci --ignore-scripts and npm test: passed; 205 Jest tests across six suites, 100% measured JS coverage; ESLint passed (Node 24.22.3).
  • Flake8 (all tracked Python files), yamllint (tracked YAML with the shared configuration), actionlint (shared configuration), patch application to a clean checkout of current master, table alignment and whitespace checks: passed.

The authenticated full generator/deployment workflow and hosted CodeQL/CI were not run locally. The generator integration test uses mocked existing data retrieval, and no live catalogue was downloaded.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

@CLAassistant

CLAassistant commented Dec 3, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Separate game record and external link validation from index construction. Keep the decimal UID expression ASCII-only when using the digit shorthand, and cover mixed ASCII/non-ASCII input.
@sonarqubecloud

sonarqubecloud Bot commented Dec 3, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0a7cc54) to head (93724fb).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #375   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines         1052      1100   +48     
=========================================
+ Hits          1052      1100   +48     
Files with missing lines Coverage Δ
src/update_db.py 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a7cc54...93724fb. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ReenigneArcher
ReenigneArcher merged commit d46050e into LizardByte:master Dec 3, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants