Relationships
#1915 swamp extension quality resolves datastores: against the repo root but models: against the manifest dir — datastore extensions are unscorable in a monorepo
Opened by magistr · 8/31/2026· Shipped 9/1/2026
Summary
swamp extension quality <manifest> --json resolves a manifest's datastores:
entries against the repository root, but models: entries against the
manifest's own directory. When an extension is vendored into a monorepo
(i.e. the extension directory is not the repo root), every datastore extension
becomes unscorable.
Reproduce
In a swamp repo whose root holds several extension subdirectories (a
.swamp.yaml at the workspace root), with a datastore extension vendored at
swamp-mongodb-datastore/:
$ swamp extension quality "$PWD/swamp-mongodb-datastore/manifest.yaml" --json
{
"error": "Datastore file not found: mongodb/mod.ts (expected at /.../swamp-workspace/extensions/datastores/mongodb/mod.ts)"
}The manifest declares:
datastores:
- mongodb/mod.tsand the file really is at
swamp-mongodb-datastore/extensions/datastores/mongodb/mod.ts.
A model extension in the SAME repo, invoked the same way, scores fine:
$ swamp extension quality "$PWD/telegram-send/manifest.yaml" --json
{ "status": "passed", "rubricVersion": 3, "earnedPoints": 12, ... }with
models:
- extensions/models/telegram_send.tsThe inconsistency
| manifest key | resolved against |
|---|---|
models: |
the manifest's directory — <manifestDir>/<entry> |
datastores: |
the repo root — <repoRoot>/extensions/datastores/<entry> |
In a standalone single-extension repo the two coincide, so this never shows. Vendored into a monorepo they diverge and the datastore file can never be found.
Writing the full path does not help
Changing the manifest to the model-style full relative path makes it worse — the
extensions/datastores/ prefix is applied on top of whatever is written:
datastores:
- extensions/datastores/mongodb/mod.ts"error": "Datastore file not found: extensions/datastores/mongodb/mod.ts
(expected at /.../swamp-workspace/extensions/datastores/extensions/datastores/mongodb/mod.ts)"So there is no manifest spelling that works in a monorepo; the entry is unreachable either way.
Impact
This is not just a bad error message — it fails a CI gate with no available
workaround. scripts/quality/score_ratchet.ts classifies a failed score read as
unscorable, which is a deliberate hard failure (its docblock explains that
this case used to be a silent skip and let a broken extension read as a pass for
weeks). So a monorepo containing any datastore extension with a quality.yaml
cannot get a green compliance job, and the standard offers no na/backlog
escape for it.
Encountered on a real PR: every other quality gate (compliance, allowlist, soak, soak-parity, property harness, upgrade chains) passes and reports all 54 extensions compliant; only the ratchet fails, purely on this path resolution.
Expected
datastores: entries resolve against the manifest's directory, the same as
models: — i.e. <manifestDir>/extensions/datastores/<entry> — so a datastore
extension is scorable wherever it is checked out.
Environment
- swamp
20260827.012103.0-sha.89734f5f - macOS arm64, and reproduced identically on
ubuntu-latestin GitHub Actions - Extension under test is a datastore-only package (
datastores:key, nomodels:)
Shipped
Click a lifecycle step above to view its details.
magistr commented 8/31/2026, 6:40:31 PM
Escalating impact: this does not only make a datastore extension unscorable, it makes it unpublishable from a monorepo. Same root cause, second command.
Merging the PR bumped the manifest version, which triggered the workspace's
extension-publish job. It failed on the identical path resolution:
Publish changed extensions
Error: Datastore file not found: mongodb/mod.ts
(expected at /home/[REDACTED]/work/swamp-workspace/swamp-workspace/extensions/datastores/mongodb/mod.ts)
Process completed with exit code 1The file is at
swamp-workspace/swamp-mongodb-datastore/extensions/datastores/mongodb/mod.ts;
publish looked for it under the repo root, exactly as extension quality does.
So for a datastore extension vendored in a monorepo, BOTH the quality score read
and the registry publish are unreachable, with no manifest spelling that works
(the extensions/datastores/ prefix is applied on top of whatever is written).
@magistr/mongodb-datastore@2026.08.31.1 is therefore committed to master but
absent from the registry, and the workspace's registry-drift check now fails
too — one publish failure leaves the repo permanently diverged from the registry
until this is fixed.
Model extensions in the same repo, same job, publish fine — so the asymmetry
between models: (manifest-dir-relative) and datastores: (repo-root-relative)
is the whole of it.
Sign in to post a ripple.