CI Failure: 32 tests in loader.test.ts failing after refactor #8

Closed
opened 2026-02-23 12:31:27 -08:00 by ci · 0 comments

CI Failure Report

Workflow: feat: refactor
Commit: 1d0f616fae
Run: https://git.brads.house/dungeonchurch/5e-tools-mcp/actions/runs/3411

Triage Analysis

Root Cause

The CI failure is in tests/loader.test.ts - 32 out of 91 tests failed. All failures are in the "loadAll against live data" test suite.

The tests expect the data loader to populate various data stores (monsters, spells, items, feats, races, etc.), but the loader is returning empty results.

Evidence

From the log, the loader attempts to load data from temp directories (e.g., /tmp/5etools-test-6oZrIq/) but encounters ENOENT errors for all expected data files:

[5etools] Skipping /tmp/5etools-test-6oZrIq/items.json: ENOENT: no such file or directory
[5etools] Skipping /tmp/5etools-test-6oZrIq/feats.json: ENOENT: no such file or directory
[5etools] Skipping /tmp/5etools-test-6oZrIq/backgrounds.json: ENOENT: no such file or directory

The loader only successfully loaded minimal test data:

  • 2 monster(s), 1 spell(s), 1 table(s) from bestiary directory tests
  • 2 item(s), 4 condition(s), 2 rule(s), 2 deity(s), 2 trap(s) from single file tests

Test Failures

All 32 failing tests have the same pattern: expected 0 to be greater than X

Examples:

  • expected 0 to be greater than 0 - loads monster from subdirectory
  • expected 0 to be greater than 1000 - populates byUri with a substantial number of entries
  • expected 0 to be greater than 30 - loads diseases into condition kind

Context

This is a major refactor commit (PR #7, 9778 additions, 2384 deletions) that:

  • Added new loader infrastructure (src/loader.ts, src/bootstrap.ts, src/helpers.ts)
  • Modified many existing source files
  • Added new test files including tests/loader.test.ts

The "loadAll against live data" test suite appears to rely on test fixtures being present, but after the refactor the fixture setup is not copying the expected JSON files to the test temp directories.

Recommendation

@brad The test fixture setup in tests/loader.test.ts needs to be updated to properly populate the test temp directories with the required data files. The refactor likely changed how test data is managed or the loader's expectations for file locations. Review the test's beforeAll or setup code to ensure fixture files are copied to the temp directory before tests run.

## CI Failure Report **Workflow:** feat: refactor **Commit:** 1d0f616fae5e2f580f1e4832868e35fc638412f0 **Run:** https://git.brads.house/dungeonchurch/5e-tools-mcp/actions/runs/3411 ## Triage Analysis ### Root Cause The CI failure is in `tests/loader.test.ts` - 32 out of 91 tests failed. All failures are in the "loadAll against live data" test suite. The tests expect the data loader to populate various data stores (monsters, spells, items, feats, races, etc.), but the loader is returning empty results. ### Evidence From the log, the loader attempts to load data from temp directories (e.g., `/tmp/5etools-test-6oZrIq/`) but encounters ENOENT errors for all expected data files: ``` [5etools] Skipping /tmp/5etools-test-6oZrIq/items.json: ENOENT: no such file or directory [5etools] Skipping /tmp/5etools-test-6oZrIq/feats.json: ENOENT: no such file or directory [5etools] Skipping /tmp/5etools-test-6oZrIq/backgrounds.json: ENOENT: no such file or directory ``` The loader only successfully loaded minimal test data: - 2 monster(s), 1 spell(s), 1 table(s) from bestiary directory tests - 2 item(s), 4 condition(s), 2 rule(s), 2 deity(s), 2 trap(s) from single file tests ### Test Failures All 32 failing tests have the same pattern: `expected 0 to be greater than X` Examples: - `expected 0 to be greater than 0` - loads monster from subdirectory - `expected 0 to be greater than 1000` - populates byUri with a substantial number of entries - `expected 0 to be greater than 30` - loads diseases into condition kind ### Context This is a major refactor commit (PR #7, 9778 additions, 2384 deletions) that: - Added new loader infrastructure (`src/loader.ts`, `src/bootstrap.ts`, `src/helpers.ts`) - Modified many existing source files - Added new test files including `tests/loader.test.ts` The "loadAll against live data" test suite appears to rely on test fixtures being present, but after the refactor the fixture setup is not copying the expected JSON files to the test temp directories. ## Recommendation @brad The test fixture setup in `tests/loader.test.ts` needs to be updated to properly populate the test temp directories with the required data files. The refactor likely changed how test data is managed or the loader's expectations for file locations. Review the test's `beforeAll` or setup code to ensure fixture files are copied to the temp directory before tests run.
brad closed this issue 2026-02-23 14:57:11 -08:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dungeonchurch/5e-tools-mcp#8
No description provided.