Skip to content

mcp-data-platform-v1.43.0

Choose a tag to compare

@github-actions github-actions released this 14 Mar 21:57
· 247 commits to main since this release
7208180

Highlights

This release adds asset version history with full browse and revert capabilities. Every content edit now creates a new immutable version instead of overwriting S3 objects in-place, providing complete change history, content recovery, and audit trail across all three content-update surfaces (portal UI, admin API, MCP tools).

Immutable Versioned Content

Content edits no longer overwrite S3 objects. Each update writes to a new versioned S3 key (portal/{owner}/{asset}/{versionID}/content{ext}), and previous versions remain accessible at their original keys indefinitely. Version numbers are assigned atomically using SELECT FOR UPDATE within a transaction, preventing race conditions when concurrent updates target the same asset.

  • New portal_asset_versions table tracks every version with its S3 key, content type, size, author, change summary, and timestamp
  • New current_version column on portal_assets always reflects the latest version number
  • CreateVersion performs a single atomic transaction: locks the asset row, increments the version, inserts the version record, and updates the asset's s3_key/content_type/size_bytes/thumbnail_s3_key in one commit
  • Existing assets are backfilled as v1 during migration with no S3 copies needed
  • Orphaned S3 objects are cleaned up if the version database write fails after upload

Version History Browsing

All three surfaces expose version history:

  • Portal REST API: GET /api/v1/portal/assets/{id}/versions (paginated), GET /api/v1/portal/assets/{id}/versions/{version}/content
  • Admin REST API: GET /api/v1/admin/assets/{id}/versions (paginated), GET /api/v1/admin/assets/{id}/versions/{version}/content
  • MCP Toolkit: manage_artifact with action: list_versions returns version history with total count

Revert to Any Previous Version

Reverting creates a new version (forward-only history) by reading the target version's content from S3, writing it to a new S3 key, and creating a new version record. The original version is never modified.

  • Portal REST API: POST /api/v1/portal/assets/{id}/versions/{version}/revert
  • Admin REST API: POST /api/v1/admin/assets/{id}/versions/{version}/revert
  • MCP Toolkit: manage_artifact with action: revert, asset_id: ..., version: N
  • Portal revert enforces ownership and editor share permissions; admin revert requires only that the asset is not soft-deleted

Frontend Version History Panel

A new VersionHistoryPanel component in the asset viewer sidebar shows:

  • Collapsible version list with version number, date, author, change summary, and size
  • Current version highlighted with a "(current)" badge
  • Revert button with a confirmation dialog on non-current versions (only for owners and editors)
  • Expand/collapse for assets with more than 3 versions
  • Integrated into both the portal AssetViewerPage and AdminAssetViewerPage

Bug Fixes

Provenance Parameter Storage (#247)

The provenance modal showed raw truncated JSON with literal \n instead of formatted SQL. Root cause: summarizeParams() serialized params to JSON then truncated at 200 bytes, producing invalid JSON that the frontend couldn't parse. The string Summary field is replaced with a map[string]any Parameters field on ProvenanceToolCall, so the frontend now reads parameters as a parsed object with no JSON.parse needed.

Sidebar and Share View Fixes (#246)

  • Fixed sidebar expand button not working on asset routes by tracking path transitions instead of reacting to sidebar state changes
  • Hidden misleading "(0 views)" on user shares where access isn't tracked; view count only shows on public links with > 0 views
  • Provenance now shows only Trino queries by default with a "Show all" toggle

Migration Notes

  • Database: Migration 000022 adds current_version INT NOT NULL DEFAULT 1 to portal_assets and creates the portal_asset_versions table with a UNIQUE(asset_id, version) constraint and ON DELETE CASCADE foreign key. Existing assets are backfilled as v1 using their current S3 key (no S3 copies). The migration is safe for zero-downtime deployment.
  • API: New endpoints on both portal and admin routes: GET .../versions, GET .../versions/{version}/content, POST .../versions/{version}/revert. These are additive and backward-compatible.
  • API: The Asset response now includes a current_version integer field. This is additive.
  • MCP: The manage_artifact tool accepts two new actions: list_versions and revert. The version input property is new. Existing actions are unchanged.
  • S3: New content writes use versioned S3 keys (portal/{owner}/{asset}/{versionID}/content{ext}). Existing S3 objects at the old key pattern are not moved; the v1 backfill row points to the original key.

Changelog

Features

  • feat: asset version history with browse and revert (#248)

Bug Fixes

  • fix: store full parameters in provenance instead of truncated JSON summary (#247)
  • fix: sidebar expand on asset view, share view counts, and provenance filtering (#246)

Installation

Homebrew (macOS)

brew install txn2/tap/mcp-data-platform

Claude Code CLI

claude mcp add mcp-data-platform -- mcp-data-platform

Docker

docker pull ghcr.io/txn2/mcp-data-platform:v1.43.0

Verification

All release artifacts are signed with Cosign. Verify with:

cosign verify-blob --bundle mcp-data-platform_1.43.0_linux_amd64.tar.gz.sigstore.json \
  mcp-data-platform_1.43.0_linux_amd64.tar.gz