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

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

  1. mkdir orphan && cd orphan && mkdir .swamp — simulates an orphaned/partial .swamp/ (e.g. from an interrupted swamp repo init, a deleted .swamp.yaml, or a stray .swamp/ created by another command).
  2. Run any repo-requiring command, e.g. swamp model search or swamp 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.yaml marker — the repository looks partially initialized or corrupted. Run swamp repo init --force to 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)
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORECONTRIBUTOR_NOTIFIED

Shipped

5/27/2026, 10:44:18 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/27/2026, 8:07:57 PM
Editable. Press Enter to edit.

stack72 commented 5/27/2026, 11:01:56 PM

Thanks @magistr for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.