audit(#2498): kind wire-contract truth-up + swallowed kind-lookup error silently downgrades the concierge image #2507

Closed
opened 2026-06-10 05:29:11 +00:00 by core-devops · 0 comments
Member

2026-06-10 audit MEDIUM+LOW:

  1. The omitempty contract is dead on arrival: buildProvisionerConfig reads COALESCE(kind,'workspace') so EVERY ordinary workspace sends "kind":"workspace" on the wire — the pinned TestStart_OmitsKindForOrdinaryWorkspace only matches the DB-lookup-failure path, and the cross-deploy 'byte-identical' claim is false. Fix: forward kind only when == WorkspaceKindPlatform (one line in cp_provisioner.go Start), keeping the test honest.
  2. workspace_provision.go ~323: the kind lookup error is silently swallowed (if err == nil branch only) — a transient DB error during a concierge restart downgrades it to the plain image (recreating the core#2495 symptom) with no log. Log at ERROR level.

🤖 Generated with Claude Code

2026-06-10 audit MEDIUM+LOW: 1. The omitempty contract is dead on arrival: buildProvisionerConfig reads COALESCE(kind,'workspace') so EVERY ordinary workspace sends "kind":"workspace" on the wire — the pinned TestStart_OmitsKindForOrdinaryWorkspace only matches the DB-lookup-failure path, and the cross-deploy 'byte-identical' claim is false. Fix: forward kind only when == WorkspaceKindPlatform (one line in cp_provisioner.go Start), keeping the test honest. 2. workspace_provision.go ~323: the kind lookup error is silently swallowed (if err == nil branch only) — a transient DB error during a concierge restart downgrades it to the plain image (recreating the core#2495 symptom) with no log. Log at ERROR level. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2507