Skip to content

Asset ownership — code owners for assets (v0.3.24)#27

Merged
SylonZero merged 2 commits into
masterfrom
feat/asset-ownership
Jul 16, 2026
Merged

Asset ownership — code owners for assets (v0.3.24)#27
SylonZero merged 2 commits into
masterfrom
feat/asset-ownership

Conversation

@SylonZero

Copy link
Copy Markdown
Owner

What

Assets can now have one or more declared owners — like code owners. Ownership is routing and visibility, not an ACL: no approval gates or edit permissions. Unlike plan assignees (derived from task assignment), ownership is explicit — a durable responsibility with no activity to derive it from.

  • asset_owners join table, both dialects. The postgres migration is hand-written per house convention (postgres has no drizzle snapshots past 0000); sqlite generated.
  • setAssetOwners mutation + setAssetOwnersAction (with product-access check), ownersByAsset query helper feeding getProduct and getAssetDebtInfo, new getOwnedAssets rollup.
  • Owner picker in the asset edit sheet; OwnerAvatars stacks on asset cards and Tech Debt Register groups.
  • "Assets I Own" on My Work: health, effective debt score (manual override or severity-weighted derived), open-item count.
  • MCP: ownerEmails on create_asset/update_asset (replaces the full owner set; [] clears), resolved via the shared-workspace email check.

Verification (drove the running app, sqlite)

  • Applied migration via db:migrate; set owners through the real server-action surface → owner rows land, product page renders avatar stack (title="Owned by Alex Chen, Sarah Kim", fallbacks AC/SK), My Work shows "Assets I Own (1)" with debt score + health, work-items payload carries owners for the debt register.
  • Probes: duplicate userIds in one call → deduped (unique index holds); cross-org user setting owners on an inaccessible asset → rejected ("Asset not found or not accessible") — this check was added after the probe initially got through; clearing with [] → rows removed, My Work section disappears.
  • 167/167 vitest, tsc clean apart from pre-existing errors.

Notes

🤖 Generated with Claude Code

Sai Prakash and others added 2 commits July 15, 2026 23:20
Assets can now have one or more declared owners. Unlike plan assignees
(derived from task assignment), ownership is explicit: it is a durable
responsibility with no activity to derive it from.

- New asset_owners join table (both dialects + migrations; the postgres
  one hand-written per house convention).
- setAssetOwners mutation + setAssetOwnersAction; ownersByAsset query
  helper feeding getProduct assets and getAssetDebtInfo; new
  getOwnedAssets for per-owner rollups.
- Owner picker in the asset edit sheet; OwnerAvatars stacks on asset
  cards and Tech Debt Register groups.
- "Assets I Own" section on My Work: health, effective debt score, and
  open-item count per owned asset.
- MCP: ownerEmails on create_asset/update_asset (replaces the full
  owner set), resolved via the same shared-workspace email check as
  other owner/assignee params.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Base automatically changed from feat/work-items-filters-debt-register-view-persist to master July 16, 2026 03:24
@SylonZero SylonZero closed this Jul 16, 2026
@SylonZero SylonZero reopened this Jul 16, 2026
@SylonZero
SylonZero merged commit 23044f9 into master Jul 16, 2026
1 check passed
@SylonZero
SylonZero deleted the feat/asset-ownership branch July 16, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant