Skip to content

v0.5.2 — Asset archive & attribution visibility

Choose a tag to compare

@SylonZero SylonZero released this 12 Sep 23:28
· 9 commits to master since this release

Assets can now be archived instead of hard-deleted: a reversible tombstone that hides an asset from lists, pickers, and Atlas without touching anything that references it. And a gap from v0.5.1 is closed — creator/updater attribution was correctly backfilled in the database but never actually surfaced to anyone reading it.

What's new

  • Asset archive/soft-delete: replaces Asset's hard delete with archivedAt/archivedById/archivedByKind — the same pattern already proven for asset capabilities. Archiving hides an asset from default listing/picker views and Atlas, but never nulls out or unlinks anything pointing at it: work items, tasks, dependency edges, and plan/release links all keep working. Reversible via restore.
  • New MCP tools: archive_asset / restore_asset, each disclosing accurate reference counts (work items, tasks, dependency edges, plan targets, release stamps) in the response — so an agent caller can see exactly what still points at an asset before or after archiving it.
  • New shared authorization rule: canDeleteAsset in lib/db/authz.ts — org owner/admin, the asset's creator, or a declared asset owner — enforced identically by the UI and MCP, following the same shared-policy pattern established in v0.5.1.
  • UI: the product page's asset editor now shows an accurate, non-destructive "Archive" confirmation (no more "cannot be undone" language for something that can be undone), plus a collapsible "archived assets" section with a Restore action.
  • Attribution now visible, not just stored: createdById/updatedById are exposed through the query layer for plans, tasks, work items, and releases — v0.5.1 backfilled this data correctly, but no get_*/list_* query or MCP tool ever returned it, confirmed live against production.

Upgrading

One additive, schema-only migration (0021) adding three nullable columns to assets. No backfill needed — existing assets are simply unarchived.

pnpm install --frozen-lockfile
pnpm db:migrate

Validation

287 tests passing (13 new this release), pnpm exec tsc --noEmit clean of anything this release touched, pnpm build, and the new migration verified against a real, previously-populated local dev DB.

Implemented across #70#71, version-tagged in #73.

Full changelog: v0.5.1...v0.5.2