fix(extensions): remove silent @swamp/ datastore auto-update (swamp-club#478)#1472
Conversation
…lub#478) Datastore was the only extension kind that silently force-pulled registry-latest within a 24h window (maybeAutoUpdateDatastoreExtension, introduced by #942). Every other kind — models, workflows, vaults, drivers, reports — is pinned to the committed upstream_extensions.json lockfile (hardened by #465), reports available updates non-destructively via `swamp extension list` / `outdated`, and moves version only on an explicit `swamp extension pull` / `update`. This removes the datastore anomaly rather than gating it behind a flag, bringing datastores in line with every other kind. After this change no extension kind auto-updates. Fully closes the ADV-13 first-party residual identified during #465's autoupdate audit, with no new config surface. Effectively reverts #942 (which closed #939's daily-freshness request). The visibility #939 wanted is preserved by the `extension list`/`outdated` freshness surfaces; only the silent pull is gone. Shared machinery is retained (extension_update_check_cache, checkExtensionVersion, FileExtensionUpdateCheckRepository, local-edits detection, the freshness composer) — all have other live consumers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
CLI UX Review
Blocking
None.
Suggestions
None.
Verdict
PASS — This PR removes silent datastore auto-update behavior with no visible UX regressions. The user-facing extension surfaces (swamp extension list, swamp extension outdated, swamp extension pull) are untouched. The deleted buildLocalEditsWarning message was only reachable via the now-removed auto-update code path. The extension_list_freshness.ts changes are comment-only; the updateStatus output shape and values are identical. Users who want datastore updates now run swamp extension pull explicitly, which is more predictable than the previous silent behavior.
There was a problem hiding this comment.
Adversarial Review
This PR removes the silent datastore auto-update path (maybeAutoUpdateDatastoreExtension and all call sites), aligning datastores with every other extension kind that only moves version on explicit user action.
Critical / High
None found.
Medium
None found.
Low
-
src/cli/resolve_datastore.ts—resolveimport removed butjoinretained: Theresolveimport was only used by the deletedmaybeAutoUpdateSwampDatastorefunction. Its removal is correct and the remainingjoinimport is still used throughout the file. No issue — just noting completeness of the cleanup. -
Design doc phrasing (
design/extension.md:121): "no extension kind is auto-pulled or upgraded as a side effect" is a strong invariant claim. If a future PR introduces auto-pull for any kind, this line will need updating. Not a code bug — just a documentation maintenance note.
Verdict
PASS — Clean, mechanical deletion with no dangling references, no broken imports, and no behavioral regressions. All 4 call sites removed, both source files and their tests deleted, barrel exports trimmed, and stale comments updated. The shared infrastructure (extension_update_check_cache, checkExtensionVersion, FileExtensionUpdateCheckRepository, local-edits detection) is correctly retained as it has other live consumers. grep confirms zero remaining references to any deleted symbol across the codebase.
There was a problem hiding this comment.
Code Review
Clean removal of the datastore auto-update anomaly. The PR is well-scoped and thorough.
Blocking Issues
None.
Suggestions
None — this is a clean deletion. All references to the removed code have been eliminated:
datastore_auto_update.tsand its test deleted entirelymaybeAutoUpdateSwampDatastore,buildLocalEditsWarning, and all 4 call sites inresolve_datastore.tsremovedresolvecorrectly dropped from the@std/pathimport (onlyjoinremains)assertStringIncludesandbuildLocalEditsWarningremoved from test imports- libswamp barrel re-exports removed
- Stale comment references in
extension_list_freshness.tsupdated - Design doc updated to clarify no extension kind auto-pulls
- No dangling references remain anywhere in the codebase
- Shared machinery (
extension_update_check_cache,checkExtensionVersion,FileExtensionUpdateCheckRepository, local-edits detection) correctly retained for live consumers
The libswamp import boundary is respected — resolve_datastore.ts (a CLI module) no longer imports from src/libswamp/mod.ts for this feature, and the barrel no longer exports the deleted types.
Net −579 lines with a clear security improvement (closing ADV-13).
Summary
Closes swamp-club#478 — the first-party residual (finding ADV-13) identified during #465's autoupdate audit.
Datastore was the only extension kind that silently force-pulled registry-latest within a 24h window (
maybeAutoUpdateDatastoreExtension, introduced by #942). Every other kind — models, workflows, vaults, drivers, reports — is pinned to the committedupstream_extensions.jsonlockfile (hardened by #465), reports available updates non-destructively viaswamp extension list/swamp extension outdated, and moves version only on an explicitswamp extension pull/swamp extension update.This PR removes the datastore anomaly rather than gating it behind a config flag, bringing datastores in line with every other kind. After this change no extension kind auto-updates — closing ADV-13 with no residual and no new config surface.
Changes
src/libswamp/extensions/datastore_auto_update.tsand its test.maybeAutoUpdateSwampDatastore,buildLocalEditsWarning, the 4 call sites, and the now-dead imports fromsrc/cli/resolve_datastore.ts(datastore resolution now matches every other kind:resolveDatastoreType(lockfile-pinned) →createProvider, no registry round-trip).buildLocalEditsWarningtest + unused imports fromresolve_datastore_test.ts.extension_list_freshness.tsthat referenced the deleted file.design/extension.md: the 24h cache is no longer "used by datastore auto-update"; added a line clarifying the freshness surfaces never auto-pull.Shared machinery is retained —
extension_update_check_cache,checkExtensionVersion,FileExtensionUpdateCheckRepository, local-edits detection, and the freshness composer all have other live consumers (extension list/outdated/update/open).Net: −579 lines.
Relationship to prior work
extension list/outdatedfreshness surfaces; only the silent pull is removed.swamp extension pull --force, which is now the only way a datastore moves version.Test Plan
deno fmt --check,deno lint,deno check— cleandeno run test src/cli/resolve_datastore_test.ts— 23 passeddeno run test— 6444 passed; 1 unrelated pre-existing flake (integration/workflow_test.tsmodel-delete/workflow--jsonstdout parse under full-suite parallelism), which passes 33/33 in isolation and touches no datastore codedeno run compile— binary buildsFollow-ups (not in this PR)
🤖 Generated with Claude Code