Relationships
#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 models — swamp 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
- Author a model extension with the model file named
docker_image_test.ts, manifest entrymodels: [docker_image_test.ts]. swamp extension push manifest.yaml-> succeeds,modelCount: 1.- Fresh repo:
swamp extension pull @collective/name-> succeeds, extracts files. swamp model type search-> model type absent.swamp doctor extensions-> reportspass; 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.ts—discoverFilesSync/discoverFilesapply the_test.tsexclusion to discovery.- The
swamp extension pushmanifest-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 latest20260520.073520.0not separately verified) - macOS (darwin 25.5.0)
- Reproduced with
@alvagante/docker-image-test2026.05.20.3-.5; resolved in.6solely by renaming the file off the_test.tssuffix.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.