Skip to main content
← Back to list
01Issue
BugClosedSwamp Club
AssigneesNone

Auto-resolver fails when extensions/models/ directory does not exist for vault-only extensions

Opened by swampadmin · 11/5/2025

Description

When auto-resolving a vault-only extension (e.g., @swamp/1password), the installer fails if the extensions/models/ directory does not exist. The error is:

No such file or directory (os error 2): open '/private/tmp/swamp-vault-test/extensions/models/upstream_extensions.json.lock'

The installExtension adapter writes to upstream_extensions.json.lock inside the models directory regardless of whether the extension contains models. Vault-only extensions should not require the models directory to exist.

Steps to reproduce

  1. swamp repo init in a fresh directory (no extensions/models/ exists)
  2. Create a vault config referencing @swamp/1password (or any vault extension)
  3. Run a vault command that triggers auto-resolution (e.g., swamp vault list-keys <name>)
  4. The extension is found and downloaded, but installation fails because extensions/models/upstream_extensions.json.lock cannot be created

Workaround: manually mkdir -p extensions/models/ before triggering auto-resolution.

Environment

  • macOS (darwin-aarch64)
  • Compiled binary via deno run compile

Summary

This affects the extension install path in src/cli/commands/extension_pull.ts or src/cli/auto_resolver_adapters.ts. The upstream_extensions.json lockfile management assumes the models directory exists. The fix should either create the directory if it doesn't exist, or move the lockfile to a location that always exists (e.g., .swamp/).

02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.