DashboardcraftresolveWorkspaceConfig Object.hasOwn pr…

resolveWorkspaceConfig Object.hasOwn prototype names

Category: gotcha
Confidence: 1.00
ID: 01a0385e-cc77-7573-b3c4-a2227e732ce5
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 0
Source session: 16AXMjUYkCm6y1U3X
Created: 2026-08-25 10:02:11
Updated: 2026-08-25 10:02:11

Content

Trap: workspaces[workspaceName] plus a truthiness check looks sufficient for a z.record config, but inherited names such as constructor, toString, and __proto__ resolve from Object.prototype and can silently select the base release config. Fix: reject unless Object.hasOwn(workspaces, workspaceName) before indexing; this preserves explicitly configured own keys. Regression-test all three inherited names as unknown workspaces.

Move to: