Skip to content

fix(test): make external model fixtures hermetic#154

Open
Rishabh060105 wants to merge 2 commits into
accordproject:mainfrom
Rishabh060105:Rishabh060105/fix-hermetic-tests
Open

fix(test): make external model fixtures hermetic#154
Rishabh060105 wants to merge 2 commits into
accordproject:mainfrom
Rishabh060105:Rishabh060105/fix-hermetic-tests

Conversation

@Rishabh060105
Copy link
Copy Markdown

@Rishabh060105 Rishabh060105 commented May 30, 2026

Closes #153

Summary

This change makes the test suite hermetic for the remaining external-model paths.

It replaces live model downloads in the affected tests with cached @models... fixtures, following the same naming pattern already used in Concerto tests and existing Accord Project archive fixtures.

Changes

  • add cached external Concerto model fixtures under test/models
  • add a shared test helper to load vendored external models into a ModelManager
  • mock external model fetches for the archive-based test path using cached local fixtures
  • update TemplateMarkInterpreter.test.ts to stop calling updateExternalModels() at runtime
  • update TemplateArchiveProcessor.test.ts to resolve external model fetches from local cached fixtures

Test

npm test -- --runInBand --coverage=false

Results:

  • 11 test suites passed
  • 63 tests passed
  • 38 snapshots passed

Rishabh Jain added 2 commits May 14, 2026 23:13
Signed-off-by: Rishabh Jain <rishabhj2005@email.com>
Signed-off-by: Rishabh Jain <rishabhj2005@email.com>
@Rishabh060105 Rishabh060105 requested a review from a team May 30, 2026 11:29
@Rishabh060105
Copy link
Copy Markdown
Author

Rishabh060105 commented May 30, 2026

Hi @mttrbrts, the fix follows the Concerto-style cached external model pattern.

What changed:

  • vendored the required external models as cached @models... fixtures under test/models
  • replaced the runtime updateExternalModels() dependency in TemplateMarkInterpreter.test.ts with local cached model loading
  • added a shared helper for offline external model resolution in tests
  • updated TemplateArchiveProcessor.test.ts to resolve external model fetches from cached local fixtures instead of live downloads

I also verified the full suite locally after the change:

npm test -- --runInBand --coverage=false

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.

Tests are not hermetic: several suites require live model downloads

1 participant