Skip to main content
← Back to list
01Issue
BugShippedSwamp CLI
Assigneesstack72

#389 extension push publishes model files ending in _test.ts that no consumer can load

Opened by alvagante · 5/20/2026· Shipped 5/20/2026

Description

swamp extension push accepts and publishes an extension whose models: manifest entry is a file ending in _test.ts. Push succeeds and reports modelCount: 1, because it resolves models from the manifest's explicit models: list.

The extension loader's directory discovery (discoverFilesSync / discoverFiles in src/domain/extensions/extension_loader.ts) excludes any file ending in _test.ts as a unit-test file. So when a consumer pulls the extension, the model file is skipped, no catalog row is created, and the extension registers 0 modelsswamp model type search shows nothing, swamp workflow run fails with Unknown model type.

The failure is silent: no warning at push, no swamp-warning:/loaderError at load, and swamp doctor extensions reports pass (the pulled bundle becomes an orphan with no catalog row).

Steps to reproduce

  1. Author a model extension with the model file named docker_image_test.ts, manifest entry models: [docker_image_test.ts].
  2. swamp extension push manifest.yaml -> succeeds, modelCount: 1.
  3. Fresh repo: swamp extension pull @collective/name -> succeeds, extracts files.
  4. swamp model type search -> model type absent.
  5. swamp doctor extensions -> reports pass; bundle appears only as an orphan.

Expected

swamp extension push should reject (or warn) when a typed manifest entry (models, vaults, drivers, datastores, reports) names a file ending in _test.ts, since consumers can never load it. Alternatively/additionally, the consumer-side loader should emit a swamp-warning: when a manifest-declared file is skipped by the _test.ts filter, so the failure is diagnosable.

Affected components

  • src/domain/extensions/extension_loader.tsdiscoverFilesSync / discoverFiles apply the _test.ts exclusion to discovery.
  • The swamp extension push manifest-resolution path — does not apply or warn about the same exclusion, so push and consumer-load disagree.

Environment

  • swamp 20260519.225230.0-sha.4f9d3e72 (current latest 20260520.073520.0 not separately verified)
  • macOS (darwin 25.5.0)
  • Reproduced with @alvagante/docker-image-test 2026.05.20.3-.5; resolved in .6 solely by renaming the file off the _test.ts suffix.
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 3 MOREREVIEW+ 3 MOREPR_MERGEDSHIPPED

Shipped

5/20/2026, 9:51:00 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/20/2026, 4:05:34 PM

Sign in to post a ripple.