Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 28, 2025

Running simulation tests without git lfs pull produces cryptic TypeError: database.query is not a function because the .sqlite cache files are LFS pointers, not actual databases.

Changes

  • test/base/cache.ts: Detect LFS pointer files before loading SQLite databases

    • Added isLfsPointerFile() to check file headers
    • Added GitLfsNotPulledError with actionable error message
    • Check both base.sqlite and layer files in Cache constructor
  • CONTRIBUTING.md: Added note about git lfs pull requirement before running simulation tests

Example Output

================================================================================
                           GIT LFS FILES NOT PULLED
================================================================================

The file "test/simulation/cache/base.sqlite" is a Git LFS pointer file, not the actual SQLite database.

To fix this, run:

    git lfs pull

Then try running the simulation tests again.

================================================================================
Original prompt

If I pull this repo, run npm install and npm run get_token, and then run simulation tests, I get TypeError: database.query is not a function. I would like that if this error is hit, then the simulation terminates with the error printed and a big message saying that user should likely run git lfs pull.

The user has attached the following file paths as relevant context:

  • .github/copilot-instructions.md

Created from VS Code.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix simulation termination on TypeError for database query Add clear error message when Git LFS files not pulled before running simulation tests Nov 28, 2025
Copilot AI requested a review from ulugbekna November 28, 2025 14:24
Copilot finished work on behalf of ulugbekna November 28, 2025 14:24
@ulugbekna ulugbekna closed this Dec 1, 2025
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