Skip to content

Fix runtime sidecar Day.js setup#467

Merged
Qt-dev merged 1 commit into
mainfrom
codex/fix-runtime-sidecar-dayjs
Jul 23, 2026
Merged

Fix runtime sidecar Day.js setup#467
Qt-dev merged 1 commit into
mainfrom
codex/fix-runtime-sidecar-dayjs

Conversation

@Qt-dev

@Qt-dev Qt-dev commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • register the Day.js isSameOrAfter plugin inside RunParser
  • add regression coverage for the inventory timestamp gate used during map completion
  • preserve the existing inventory timestamp and retry behavior

Root cause

RunParser relied on src/main/index.ts to register isSameOrAfter. Map processing now runs in a separate runtime-sidecar process, so that main-process Day.js configuration was never applied there. Completing a map therefore threw isSameOrAfter is not a function before item stats could finish.

Impact

Map completion in the runtime sidecar can proceed through inventory timestamp validation and finish counting the map.

Validation

  • npm run test:main -- test/main/modules/RunParser.spec.ts (16 tests passed)
  • full main Jest suite (394 tests passed)
  • npm run typecheck:main
  • npm run build:app
  • git diff --check

@Qt-dev
Qt-dev marked this pull request as ready for review July 23, 2026 01:14
@Qt-dev
Qt-dev requested a review from Copilot July 23, 2026 01:14
@Qt-dev

Qt-dev commented Jul 23, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a runtime-sidecar crash during map completion by ensuring Day.js is configured within RunParser itself (instead of relying on main-process initialization), and adds a regression test to cover the inventory timestamp gate used by getItemStats.

Changes:

  • Extend Day.js with isSameOrAfter inside src/main/modules/RunParser.ts so runtime-sidecar execution has the required plugin.
  • Add a unit test ensuring RunParser.getItemStats can compare timestamps and proceed to item stat generation without depending on main-process Day.js setup.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/main/modules/RunParser.ts Registers the isSameOrAfter Day.js plugin locally so timestamp comparisons work in the runtime sidecar process.
test/main/modules/RunParser.spec.ts Adds regression coverage for getItemStats timestamp gating and item stat generation path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: ee9d8575f3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Qt-dev
Qt-dev merged commit 051de31 into main Jul 23, 2026
1 check passed
@Qt-dev
Qt-dev deleted the codex/fix-runtime-sidecar-dayjs branch July 23, 2026 01:19
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.

2 participants