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

Relationships

#3319 datastore namespace list --json reports a corrupt .namespace.json as an unexpected exception with a stack trace

Opened by zack · 10/12/2026· Shipped 10/13/2026

Found while working on #3316; unrelated to that fix.

A namespace manifest that is not valid JSON makes swamp datastore namespace list --json exit with an error envelope that carries a stack field, which marks an unexpected exception rather than a handled refusal. The JSON.parse SyntaxError escapes instead of being reported as a UserError (or the manifest being skipped).

Affects: swamp 20261012.194115.0-sha.9b7f54f4 (released binary), and source main at 421e0b1e.

Steps to reproduce

  1. swamp init, then swamp datastore namespace set corrupt-ns
  2. Overwrite .swamp/corrupt-ns/.namespace.json with {INVALID JSON!!!}
  3. swamp datastore namespace list --json

Expected

Either the unreadable manifest is skipped or flagged (exit 0), or the command refuses with a handled error (exit 1) whose JSON envelope has a message and no stack.

Actual

Exit 1 with a JSON error envelope that includes stack.

How it was found

swamp-uat branch test-investigation, tests/cli/adversarial/namespace_isolation_test.ts, test: swamp datastore namespace list handles corrupt .namespace.json gracefully. It fails against the released binary and against a build of the #3316 fix alike. Root cause not investigated; manifest reading lives in src/infrastructure/persistence/namespace_manifest.ts (listNamespaceManifests).

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 13 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/13/2026, 12:14:03 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7210/12/2026, 11:31:37 PM

Sign in to post a ripple.