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

#419 Add VaultAnnotationProvider conformance helpers to @systeminit/swamp-testing

Opened by stack72 · 5/23/2026· Shipped 5/23/2026

Problem

The @systeminit/swamp-testing package (v0.20260521.16) provides conformance helpers for VaultProvider (assertVaultExportConformance, assertVaultConformance) but has no equivalent for VaultAnnotationProvider. Extensions implementing annotation support (aws-sm in #414, and upcoming azure-kv and 1password) must use direct assertions instead of a shared conformance suite.

Proposed solution

Add two helpers:

  1. assertVaultAnnotationExportConformance(vaultExport, options) — structural check that createProvider returns an object with getAnnotation, putAnnotation, deleteAnnotation, listAnnotations as functions (mirrors the runtime duck-typing gate).

  2. assertVaultAnnotationConformance(provider) — behavioral check: putAnnotation/getAnnotation roundtrip, getAnnotation returns null for unannotated key, deleteAnnotation clears annotations, listAnnotations includes annotated keys only, merge() preserves existing fields, toData() serializes correctly, isEmpty() returns true for empty annotations.

Also export the VaultAnnotation and VaultAnnotationProvider types from vault_types.ts so extension authors don't need to define them locally.

Context

Discovered during #414 (aws-sm annotation support). The VaultAnnotation object returned by getAnnotation must include toData(), merge(), and isEmpty() methods — the swamp runtime calls all three. This is not documented anywhere yet and was found by inspecting the swamp binary. The conformance helpers should encode this contract so future extensions don't hit the same runtime errors.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

5/23/2026, 1:41:20 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/23/2026, 1:08:35 AM

Sign in to post a ripple.