Code Room
Vibe codingHardvc-g170
Subject Ai code reviewLevel Senior–Staff~18 minCommon in Algorithms & data structures interviewsIndustries Technology, Software development

Question

You asked an AI for "RBAC so the deployment controller can read configmaps in its namespace." It produced this and it works. The platform team rejects it. Why?

yaml
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:  name: app-controllerrules:  - apiGroups: ["*"]    resources: ["*"]    verbs: ["*"]---apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata:  name: app-controllersubjects:  - kind: ServiceAccount    name: app-controller    namespace: prodroleRef:  kind: ClusterRole  name: app-controller  apiGroup: rbac.authorization.k8s.io
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it — tests, edge cases, reading critically — and how you’d re-prompt or decompose to get it right.

Describe your solution

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.