Relationships
#460 Orphaned .swamp/ without .swamp.yaml marker is reported as plain 'Not a swamp repository' — partial/corrupt repo not detected
Opened by magistr · 5/27/2026· Shipped 5/27/2026
Description
A directory that contains a .swamp/ runtime directory but no .swamp.yaml
marker is a partially-initialized or corrupted repository. swamp does not
detect this distinct state — every repo-requiring command emits the same
generic error it would for a directory with no .swamp/ at all:
Error: "Not a swamp repository: <dir>. To initialize a new repository, run 'swamp repo init', or specify an existing repository with 'swamp <command> --repo-dir /path/to/repo'."There is no hint that a .swamp/ directory is already present (i.e. that this
is likely a broken/partial repo rather than a fresh directory), and
swamp doctor doesn't flag it.
Steps to reproduce
mkdir orphan && cd orphan && mkdir .swamp— simulates an orphaned/partial.swamp/(e.g. from an interruptedswamp repo init, a deleted.swamp.yaml, or a stray.swamp/created by another command).- Run any repo-requiring command, e.g.
swamp model searchorswamp extension quality <manifest>.
Actual
Generic Not a swamp repository: <dir> — identical to the no-.swamp/-at-all
case. (The suggested swamp repo init does recover it, silently reusing the
existing .swamp/ directory.)
Expected
Detect a .swamp/ present without a valid .swamp.yaml and report it
distinctly, e.g.:
Found a
.swamp/directory but no.swamp.yamlmarker — the repository looks partially initialized or corrupted. Runswamp repo init --forceto repair.
A swamp doctor check for an orphaned/partial .swamp/ (and ideally a warning
before a plain swamp repo init silently reuses a stale .swamp/ DB) would
also help.
How I hit it
On a real workspace the repository root had a .swamp/ directory but no
.swamp.yaml, so swamp extension quality <subdir>/manifest.yaml run from the
root failed with the generic message even though .swamp/ was clearly present.
It took a while to realize the marker was missing rather than the directory not
being a repo. It would also be worth investigating how a .swamp/ can come to
exist at a location where swamp repo init never completed, to prevent the
orphaned state from arising in the first place.
Environment
- swamp 20260526.194925.0-sha.80b42672
- macOS (darwin)
Shipped
Click a lifecycle step above to view its details.