15. Ylogx live — ConvBI blast radius, RLS/RBAC how, and issue classes from this repo

Adarsh Vishwakarma · SDE I AUTA APJ · Job 10454435 · ADCI Karnataka. R1 on 13 Aug 2026 and R2 on 18 Aug 2026 are done; the OA was not a round. This is for later-loop depth, with no prediction. Java Live Code is on Zoom. Ylogx production was Python FastAPI plus TypeScript NestJS/React, Docker, and ECS — not the JVM.

Every item below is a failure class grounded in the ConvBI checkout at December25, never a fabricated ticket, timestamp, named incident, or outage. Resume metrics only: 40% faster reports; 99.9% uptime; SQL RAG +65% analysis productivity; RLS + RBAC for 3 tiers; Redis −35% bot DB latency; 30 dashboards with +60% operations efficiency; sub-210 ms; CloudFront, ECS, Docker, ALB, Route 53. Where this repo disagrees with the resume or with its own docs, speak the split — do not launder either side into a fake sample size.

No invented TTL, p95, bill, missed 99.9%, named incident, SEO-403 lead, Qdrant, EKS, Kafka, shard, Datadog protocol, launch day, or war-room hours. Generated SQL never runs as table owner. Do not steal IQVIA LangGraph or LangSmith onto this intern. Do not quote secrets from task definitions.

1. 60–90 second Ylogx pitch (this product)

Q1. “Walk me through Ylogx: customer, architecture, hard part, result.” Resume-derived

Mapping / evidence. Ylogx Software Developer Intern, Nov 2024–Oct 2025, remote. Product in this checkout is ConvBI: React SPA, NestJS API, FastAPI SQL proposer, Postgres with RLS. Resume evidence is reports, LangChain SQL RAG, three-tier RLS/RBAC, Redis, 30 dashboards, and CloudFront/ALB/ECS.

Situation. Operators who are not SQL experts needed custom reports, ad-hoc natural-language analysis, and live KPI tiles over shared warehouse facts at three organizational scopes.

Task. I had to make analysis useful without one tier reading another, keep known KPI reads deterministic and fast, and deploy repeatably.

Action. I shipped React at the browser; NestJS for JWT, RBAC, report CRUD, dashboard REST, and the SQL executor; FastAPI for LangChain SQL generation; Postgres for facts and RLS; Docker images on ECS behind ALB and CloudFront.

Action — hard part. FastAPI proposes SQL and never executes warehouse reads as the caller. NestJS opens a per-request Sequelize transaction, runs SET ROLE to the mapped Postgres role, and executes SELECT under that transaction. Dashboard GETs use the same transaction and never call the model.

Result. The resume records 40% faster report generation, 99.9% uptime, +65% analysis productivity, −35% bot database latency, 30 dashboards with +60% operations efficiency, and sub-210 ms. I do not invent a baseline sample.

Mechanism flow

  1. Browser loads the Vite React SPA (nginx in the frontend image).
  2. Axios sends Authorization: Bearer from localStorage.
  3. CloudFront serves static assets; dynamic HTTP hits ALB → healthy ECS tasks.
  4. JwtMiddleware verifies the access token; RLSMiddleware begins a transaction and SET ROLE.
  5. Dashboard/report routes run fixed SQL on req.dbTransaction.
  6. Chat path: Nest POST /queryDB/chat-query calls FastAPI POST /chatbot; FastAPI returns eventQuery; Nest runs it through executeRawSelectQuery.
  7. SELECT-only parse, table allow-list, optional org predicate, then Postgres RLS.
  8. FinishTransactionMiddleware commits on HTTP finish.

Do not use GenAI for. Authorization, known KPI calculation, cache identity, DNS, health, and rollout approval.

Honest 10×. More RLS fixtures, pool/cache tests, query optimization, then more ECS desired tasks. I did not shard Ylogx. Pool max is 20 from sequelize.module.ts and backend-docs.

Concrete example. “Top SKU for my scope” becomes FastAPI SQL plus Nest execution as the caller role. The Sales dashboard GET uses deterministic SQL in DashboardsService and never waits on generation.

They might ask nextWhat you say
What did you do versus we?I name mechanisms I implemented in this stack. Product outcomes are team-owned. I was an intern, not the manager.
Was FastAPI LangGraph?No. FastAPI is LangChain ChatOpenAI plus a Pydantic SQL parser. LangGraph is IQVIA.
How do you know the metric?Aug 2026 resume outcomes only. I will not invent percentile labels or an SLO PDF.

2. Dev → QA → prod is blast-radius promotion

These are environments and GitHub Actions gates from this repo, not invented private names. A new image tag does not make a release safe. I do not invent war-room hours.

Q2. “What did dev test, and what could still fail?” Resume-derived Standard CS

Mapping / evidence. Local path: convbi-backend/docker-compose.yml, Nest NODE_ENV, SQL logging, FastAPI on port 80 in its Dockerfile. convbi-ai GUIDELINES call dev the base branch; this Nest remote also has qa and a developement spelling. Speak files, not a fake topology.

Situation. In dev I can break my own user and still see a plausible chatbot answer.

Task. Practice production-safe habits before they become a tenant problem.

Action. Run generated SQL through Nest as a non-owner role; reject non-SELECT; keep KPI GETs off FastAPI; do not treat a single-account click as three-tier isolation.

Result. Dev catches path mistakes cheaply. A successful single-user click is not evidence of SUPER_ADMIN / ADMIN / USER isolation.

Concrete example. Wiring POST /queryDB/chat-query into a dashboard GET returns a number and is already the wrong path: a fixed tile now waits on ChatOpenAI.

They might ask nextWhat you say
What can still fail?Single-account testing hides JOIN leaks, fieldsCache collisions, and CORS *.
CORS in this repo?Nest defaults CORS_ORIGIN || '*' in main.ts. FastAPI hard-codes allow_origins=["*"].

Q3. “What did QA prove, and how did it deploy?” Resume-derived

Mapping / evidence. convbi-backend/.github/workflows/convbi-qa.yml: push to branch qa, environment qa, build/push ECR image tagged with the commit SHA and qa, render .aws/task-definition.json, deploy ECS service convbi-backend-service on cluster convbi-cluster, wait-for-service-stability: true. No manual approval step on QA. Region in the workflow is ap-south-1.

Situation. A feature that passed for one account could leak or over-deny another tier.

Task. Prove permission and denial, then promote an image that ALB will only send to healthy tasks.

Action. Cross-tier fixtures, denied JOINs, golden NL → expected SQL shape, rls_no_access for unassigned roles, dashboard GETs without generation. QA workflow rolling-replaces ECS after image push.

Result. Promotion required role-correct behavior. I do not invent a QA pass-rate percent.

Concrete example. ADMIN with no SYSTEM db_role_name must hit SET ROLE "rls_no_access", not RESET ROLE. The commented-out older middleware in rls.middleware.ts is the leak class that comment names.

They might ask nextWhat you say
Did QA use CodeBuild?backend-docs chapter 7 still draws CodeBuild. The runnable deploy is GitHub Actions. Speak Actions as what this repo runs.
What is wait-for-service-stability?The workflow waits until the ECS service is stable after the new task definition — a sick replacement should not be “deployed” in name only.

Q4. “What changed in prod, and what was the blast radius?” Resume-derived

Mapping / evidence. convbi-prod.yml: push to main, environment production, same ECR/ECS names, image tag latest plus SHA. After render, a Wait for approval step uses trstringer/manual-approval@v1 with timeout-minutes: 3 and minimum-approvals: 1. Then ECS deploy with wait-for-service-stability: true. That timeout is a FACT in the file. I do not invent who sat in a war room or how many hours.

Situation. Blast radius became every authorized user across three organizational tiers.

Task. Preserve isolation, availability, and deterministic KPI latency while live tasks were replaced.

Action. CloudFront → ALB → healthy ECS; role-bound SQL; no LLM on dashboard GET; prod workflow blocks deploy until the approval action completes or times out.

Result. 99.9% uptime and sub-210 ms on the resume. No missed target is invented.

Concrete example. A health-green task using RESET ROLE on warehouse reads is still unsafe. Health and RLS are different gates.

They might ask nextWhat you say
Who approved prod?The workflow names a GitHub approver field. I do not turn that into a personal drama or a hours-long incident.
Dockerfile user?Backend image ends with USER node then CMD ["node", "dist/main"]. That is a FACT from the Dockerfile and backend-docs.

3. Full browser → data path

Q5. “Trace one request and define every hop.” Resume-derived Standard CS

Mapping / evidence. Resume names React, CloudFront, ALB, ECS, Docker, NestJS/FastAPI, Redis, Postgres, Route 53, GoDaddy. This checkout names the Nest/FastAPI/Postgres files. Redis is on the resume, not in this Nest/FastAPI source tree.

Problem. A logo dump cannot identify latency, authorization, or rollback ownership.

Checks. Classify static asset, deterministic dashboard/report API, or ad-hoc chatbot request.

Change / mechanism.

  1. Hostname: registrar (GoDaddy on the resume) delegates to Route 53.
  2. CloudFront serves the nginx-built SPA from convbi-frontend/Dockerfile.
  3. API HTTP → ALB → ECS task listening on container port 5000 (task definition family convbi-backend, cpu 1024, memory 3072 — no secret values).
  4. main.ts: CORS, 50mb body parser, ValidationPipe whitelist, FinishTransaction listener, Swagger at /api.
  5. AppModule applies Jwt then RLS on all routes except health and public auth.
  6. Dashboard: DashboardsController passes req.dbTransaction into DashboardsService.
  7. Chat SQL: QueryDBService.executeChatQuery fetches CHATBOT_API_URL (FastAPI /chatbot), then executeRawSelectQuery.
  8. Health: GET /health uses Terminus sequelizeHealth.pingCheck('postgresDB'). FastAPI has its own /health plus a Docker HEALTHCHECK.

Result. Same serving story as the resume. I will not claim this Nest process contains a Redis client.

Concrete example. React bundle from CloudFront. KPI JSON: ALB → Nest → RBAC → RLS transaction → fixed SQL. Chatbot POST: Nest → FastAPI generation → Nest SELECT under RLS.

They might ask nextWhat you say
Cookies or Bearer?COOKIE_AUTH_IMPLEMENTATION_COMPLETE.md describes HTTP-only cookies. jwt.middleware.ts still splits Authorization: Bearer. Frontend axiosInterceptor.ts still reads localStorage token. Speak the code that runs.
Does FastAPI see the user?No. The FastAPI body is { query, options }. Isolation is Nest’s transaction plus SELECT allow-list.

Q6. “CI/CD, Docker, ECS, ALB, health, rollback.” Resume-derived

Mapping / evidence. GitHub Actions as above. Dockerfiles: Nest USER node; FastAPI gunicorn 8 Uvicorn workers, timeout 180s; frontend multi-stage nginx with HEALTHCHECK wget. backend-docs still say CodeBuild — that is a docs/code split.

Problem. Patching one mutable host creates drift.

Change. CI builds a Docker image, pushes ECR, renders the task definition container image, (prod) waits for manual approval, deploys the ECS service, waits for stability.

Definitions. A task is one running copy. A service maintains desired count and replaces unhealthy tasks. ALB is L7 HTTP plus target health. CloudFront is edge/static delivery.

Rollback. Bad image → previous known image/task definition. Wrong RLS → stop privileged path and restore tested policy. DNS → delegation/Alias, not app rollback.

Do not use GenAI for. Secret placement, health approval, authorization policy, or rollout acceptance.

They might ask nextWhat you say
Why not Kubernetes?ECS is what shipped. Kubernetes is listed knowledge, not cluster ownership. I do not say EKS.
Pool?Sequelize pool max 20, min 0, acquire 30000 ms, idle 10000 ms. Each authenticated request holds a transaction until response finish. That is the 10× pressure.

4. RLS versus RBAC — how this repo actually does it

Q7. “Explain RLS vs RBAC, SET ROLE, rls_no_access, and deny tests.” Resume-derived

Mapping / evidence. Resume: RLS + RBAC for three organizational tiers as roles. Code tiers: RoleEnum SUPER_ADMIN, ADMIN, USER (plus GUEST, blocked on dashboards). Files: jwt.middleware.ts, rls.middleware.ts, policyManagement.service.ts, dashboards.service.ts.

Situation. Users at three scopes shared warehouse facts; handwritten and generated SQL could join shared tables.

Task. Control both what action a caller may perform and which rows that allowed action may return.

Action — RBAC. JWT payload carries role. Nest route middleware requires a valid Bearer token. Feature flags and admin modules further gate UI. That is necessary and not sufficient.

Action — RLS.

  1. RLSMiddleware opens sequelize.transaction().
  2. SUPER_ADMIN: RESET ROLE plus set_config('app.is_SUPER_ADMIN','true', true).
  3. ADMIN with a SYSTEM role that has db_role_name: SET ROLE "<db_role_name>" (first such role only — Postgres has one active role).
  4. USER with roles: same SET ROLE on the primary db_role_name, then resolve policies → allowedModules → ModuleRegistry.tables onto req.user.allowedTables.
  5. ADMIN or USER with no usable db_role_name: SET ROLE "rls_no_access" and, for users, noDataAccess=true. Comment in code: previously RESET ROLE caused a data leak.
  6. set_config writes app.current_user_id, app.organizationId, app.is_admin, app.user_role as transaction-local settings.
  7. Policy DDL: CREATE POLICY ... FOR SELECT TO <policyRole> USING (conditions AND "organizationId" = current_setting('app.organizationId')::uuid), then ENABLE ROW LEVEL SECURITY.
  8. Dashboard SQL uses that same open transaction so policies apply.

Result. Three-tier analysis stays trustworthy while reports became 40% faster and analysis productivity improved 65%.

SQL / code sketch — explanatory, not dumped prod DDL

-- mechanism sketch matching policyManagement.service.ts
SET ROLE "db_role_name";
SELECT set_config('app.organizationId', :organizationId, true);
-- CREATE POLICY ... USING (
--   <module rules> AND
--   ("organizationId" = current_setting('app.organizationId')::uuid)
-- );
-- generated SELECT runs on req.dbTransaction

Do not use GenAI for. Assigning roles, writing final policy, authorizing tables, or interpreting denial.

Honest 10×. Scaling ECS without RLS scales the leak. Test pooled role set/reset. I did not shard.

Concrete example. A mid-tier route is allowed. Generated JOIN omits an app helper. RBAC permits “view”; RLS still removes foreign facts at row access.

They might ask nextWhat you say
Can owner bypass RLS?Table owner / RESET ROLE can. That is why generated warehouse SQL must stay on the SET ROLE transaction, and why SUPER_ADMIN is an explicit bypass path.
Why SET ROLE on a transaction?Pool connections are reused. Role and set_config(..., true) must die with COMMIT/ROLLBACK or the next borrower inherits another user’s role.
Docs vs code on session vars?architecture-docs/08 draws app.user_guid / app.organization_id. Code sets app.current_user_id / app.organizationId. Speak the code.

Q8. “Contain prompt injection and hallucinated SQL.” Resume-derived

Mapping / evidence. FastAPI extractor.py + prompts.py (SELECT-only instructions, include_tables list). Nest executeRawSelectQuery: must start with select, regex FROM/JOIN tables, hasTableAccess, then run on dbTransaction.

Problem. A prompt can request catalog dumping, invent a table, or generate a broad JOIN.

Checks. FastAPI allow-listed tables in SQLDatabase(include_tables=...). Nest rejects non-SELECT, unknown tables, then RLS.

Change. Treat the model as an untrusted SQL proposer. Deterministic Nest controls execute a bounded query or fail closed.

Result. Prompt text cannot promote privilege; +65% means useful analysis, not blind acceptance of fluent SQL.

Concrete example. FastAPI may wrap a WITH CTE as SELECT * FROM (...) so Nest’s startsWith('select') check passes. A raw WITH without that wrap is rejected. A plausible unknown table fails hasTableAccess.

They might ask nextWhat you say
Does the prompt authorize?No. Prompt text is not an authorization boundary.
LangSmith here?No. LangSmith is IQVIA. Ylogx eval is SQL-shape / deny fixtures.

5. Cache honesty — resume Redis versus this Nest Map

Q9. “You listed Redis −35%. Show me Redis in this repo.” Resume-derived

Mapping / evidence. Resume: Redis caching reduced bot database latency by 35%. This December25 Nest and FastAPI trees have no Redis client. What exists: QueryDBService.fieldsCache, an in-process Map keyed fields:${tableName}, TTL 5 minutes.

Situation. Uncached SQL RAG repeated Postgres work; the resume records Redis on that bot DB path.

Task. Reduce repeat DB latency without crossing tier boundaries.

Action — resume. Redis cache-aside on the bot path, key must include tier/role; miss executes under RLS; Redis-down falls back to Postgres as the same role.

Action — this snapshot. Dataset field metadata is cached in a process-local Map without org or role in the key. Warehouse answers are not cached there. Dashboards are not served from this Map.

Failure class. A Map keyed only by table name is shared across every tenant on that Nest task. Even if values are column names, it is the wrong isolation shape, and it is not Redis.

Result. I keep the resume −35% as the intern outcome. I will not invent an ioredis module that is not in this tree.

# this repo (queryDB.service.ts) — NOT Redis
key = "fields:" + tableName
Map.get(key)  # no org, no role, 5 min TTL

# resume Redis sketch — not a file in this checkout
key = tier | role | fingerprint(schema, question)
miss → Postgres as caller role → SET → return

Do not use GenAI for. Constructing authorization keys or approving cached access.

Honest 10×. Process-local Maps do not survive multiple ECS tasks and do not isolate tenants. If we reintroduce Redis, every key still needs role. I did not shard.

They might ask nextWhat you say
Did dashboards use Redis?I do not claim that. Resume −35% is bot DB latency. Sub-210 ms is the dashboard path with no LLM.
CloudFront versus Redis?Edge static versus application cache. Do not edge-cache tenant JSON.
Dive Deep lead?Redis + RLS together on the resume. In this checkout the Dive Deep pair is RLS SET ROLE plus the Map-without-tier failure class.

6. Issue classes — speak the class, never fake a ticket

Each answer uses problem → checks → change → result. Pick one and stop. None of these is a named production incident.

Class 1 — Wrong-organization rows through a JOIN Resume-derived

Mapping / evidence. Generated SQL in executeRawSelectQuery plus app-level org injection and Postgres policies. Not a claim that a named customer leak occurred.

Problem. Syntactically valid JOIN returns a good-looking chart but includes another organization through a shared mapping path.

Checks. Executing role; whether the query used req.dbTransaction; RLS on joined tables; whether Nest also string-injected "alias"."organizationId" = '<id>' only on tables that have that column.

Change. Caller-mapped non-owner role, RLS at row access, table allow-list before execute, RBAC at route.

Result. Trustworthy three-tier analysis supports +65% productivity without inventing a leak event.

Concrete example. App helper filters sales but generated JOIN reaches a mapping table without organizationId. Under caller role, RLS must still remove foreign rows. If the handler used executeWithoutRLS here, that wall is gone.

They might ask nextWhat you say
Was this a named incident?No. Failure class I designed against; no ticket, timestamp, customer, or outage duration.
Is the org AND-inject enough?No. It is a helper. RLS is the wall when the JOIN table has no org column or the regex missed the name.

Class 2 — Cache / Map without tier Resume-derived

Mapping / evidence. fieldsCache in queryDB.service.ts. Resume Redis must not be described as this Map.

Problem. Different tiers type identical English or hit the same table metadata. A key without identity is a cross-tenant hit.

Checks. Key identity; fill role; Redis-down (resume) or process-local Map (this repo); denied/empty result handling.

Change. Resume: tier/role + fingerprint; fill after RLS. This snapshot: do not treat fields:${tableName} as tenant-safe; do not put warehouse result sets in that Map.

Result. −35% remains a win only if reuse does not undo isolation.

Concrete example. Two orgs on the same ECS task call GET /queryDB/dataset/sales/fields. The second request can reuse the first Map entry. Column names may be shared schema — still the wrong key shape the moment values become tenant-specific.

They might ask nextWhat you say
Was this a named incident?No. Class from this file, not a ticket.
TTL?This Map uses 5 minutes in code. Resume Redis has no TTL printed. I do not invent a Redis expiry.

Class 3 — LLM on a KPI tile hot path Resume-derived IE-asked

Mapping / evidence. Resume: 30 dashboards, +60% ops, sub-210 ms. This repo: 9 predefined dashboard types in architecture-docs/06 and DashboardsController (overview, sales, receivables, payables, stock, collections, profit-loss, balance-sheet, cashflow), some multi-page. I keep 30 as the resume KPI count and 9 as this snapshot’s type enum. I do not invent a third number.

Problem. A fixed tile becomes variable, slower, costlier, and capable of inventing a KPI when it calls a model per refresh.

Checks. Route file: dashboards.controller.ts has no FastAPI call. Chat lives at queryDB/chat-query.

Change. Identity → RLS transaction → grouped SQL → JSON → Recharts (predefined pages) or Chart.js (report builder / chatbot ElementRenderer). Optional explanation stays off path.

Result. 30 dashboards / +60% / sub-210 ms / 99.9% on resume.

Concrete example. Nine dashboard types each calling FastAPI is still a regression. getSalesDashboardData runs fixed aggregates on req.dbTransaction.

They might ask nextWhat you say
Recharts or Chart.js?Both. Predefined KPI pages use Recharts. Report builder and chatbot charts use Chart.js via ElementRenderer. Resume says Recharts; I do not hide Chart.js in this repo.
Was this a named incident?No.

Class 4 — Sick ECS task Resume-derived Standard CS

Mapping / evidence. Nest Terminus /health pings Postgres. FastAPI Dockerfile HEALTHCHECK curls /health. Frontend nginx HEALTHCHECK wget /. Workflows set wait-for-service-stability: true. ALB target health is the resume serving hop.

Problem. A task can bind the port, fail the DB ping, or loop on startup, and still be “deployed” if nobody waits on health.

Checks. /health vs /health/simple (simple does not ping Postgres). ALB target state. ECS service events. Do not debug RLS when the name does not resolve or the target is draining.

Change. Keep health off JWT (AppModule excludes health, healthcheck, health/simple). ALB only forwards to healthy tasks. Deploy waits for service stability.

Result. 99.9% is a serving result, not a claim that every failed task was a named outage.

Concrete example. A Nest task that cannot reach RDS fails Terminus and should leave the target group. A task that is healthy but runs as table owner is a different class (RLS), not a health class.

They might ask nextWhat you say
Was this a named incident?No. I do not invent crash-loop minutes.
FastAPI timeout?gunicorn timeout 180s because generation is slow. Dashboard path must not sit on that worker pool.

Class 5 — Hallucinated table or wrong SQL shape Resume-derived

Mapping / evidence. FastAPI SQLQueryAndDetailsExtractor with ChatOpenAI (default model name in code gpt-4.1, temperature 0). Nest SELECT allow-list. Not IQVIA LangSmith.

Problem. Model emits nonexistent/unapproved table or a wrong-grain JOIN that runs and lies.

Checks. eventQuery present; starts with SELECT; FROM/JOIN names in hasTableAccess; execute on RLS transaction; inspectable SQL on failure returns chatbot message with showChart: false.

Change. Fail closed on unknown table; execute accepted SQL as caller role; do not let FastAPI’s privileged SQLDatabase engine run the user query (it is for schema get_table_info() only).

Result. +65% analysis refers to useful analysis, not confident prose over a guessed FROM.

Concrete example. Daily question groups weekly and doubles through a mapping JOIN. RLS keeps tenant correct, but SQL-shape fixture still fails. Frontend Gemini SDK is in package.json and unused in src — do not say the chatbot is Gemini.

They might ask nextWhat you say
Was this a named incident?No.
Who executes SQL?Nest. FastAPI returns JSON. Mixing those is how you run generation as superuser.

Class 6 — DNS / GoDaddy / Route 53 / ALB Resume-derived IE-asked Standard CS

Mapping / evidence. Resume: configured GoDaddy DNS with Route 53 to route through an ALB. Not a named live question for Job 10454435.

Problem. Hostname fails before app, points at the wrong environment, has host/TLS mismatch, or reaches ALB with unhealthy targets.

Checks. Registrar NS; hosted zone/Alias; CloudFront/ALB target; host/certificate; target health; origin.

Change. Correct only delegation, Alias, host route, or health. Keep app/RLS diagnosis separate.

Result. Configured path makes 99.9% and sub-210 ms reachable; no downtime duration invented.

Concrete example. Old nameserver delegation means Route 53 Alias is never consulted. Resolving name plus ALB 502 points to target health instead.

They might ask nextWhat you say
Was this a named incident?No. I configured the path. I do not claim a war room.

Class 7 — rls_no_access versus RESET ROLE Resume-derived

Mapping / evidence. Live rls.middleware.ts comments: Admin with no SYSTEM roles previously used RESET ROLE which caused a data leak; fallback is now SET ROLE "rls_no_access". backend-docs table matches: ADMIN (no roles) → rls_no_access.

Problem. An ADMIN JWT without an assigned Postgres role looks “logged in.” RESET ROLE returns the connection’s login role — typically the table owner — so RLS does not apply.

Checks. db_role_name present? SYSTEM scope for ADMIN? noDataAccess on USER? Guest hitting dashboards?

Change. Fail closed to a role with zero table grants. Empty dashboard is correct; full warehouse is not.

Result. Unassigned users do not inherit owner reads. I will not invent a customer who saw the leak.

Concrete example. New ADMIN created before role assignment. Expected: empty KPI tiles / permission errors. Unexpected: every org’s sales table.

They might ask nextWhat you say
Was this a named incident?No. The comment in source is the class. I do not turn a code comment into a date.
SUPER_ADMIN?Explicit RESET ROLE by design. That is a privileged path, not the unassigned-admin path.

Class 8 — executeWithoutRLS misuse Resume-derived

Mapping / evidence. ChatService.executeWithoutRLS opens a new transaction, runs RESET ROLE, then CRUD on chat tables. architecture-docs/05 lists createChat, getChats, getChatMessages, createMessage, toggleFavorite, createFeedback. Isolation for chats is then getOrganizationFilter (app organizationId).

Problem. Chat metadata tables may not be granted to the restricted warehouse role, so the happy path needs a bypass. The same helper on sales / outstanding_receivable would skip RLS.

Checks. Which tables sit inside the callback? Is this chat_* or warehouse facts? Is the filter SUPER_ADMIN → no org predicate?

Change. Keep RESET ROLE only for application tables the restricted role cannot touch. Warehouse reads stay on req.dbTransaction.

Result. Chat history works; generated analytics still hit RLS. Mixing those is the class.

Concrete example. createMessage under RESET ROLE is intended. executeRawSelectQuery using that helper instead of dbTransaction would be a warehouse leak class.

They might ask nextWhat you say
Was this a named incident?No.
Why not grant chat tables to every db role?Frugality of grants versus a scoped bypass. Either way, the bypass must never wrap fact tables.

Class 9 — FinishTransaction commit-on-finish Resume-derived

Mapping / evidence. finish-transaction.middleware.ts registers res.on('finish') and always commit(), rolling back only if commit throws. architecture-docs/03 and backend-docs text say “COMMIT on success / ROLLBACK on error.” That is docs versus code.

Problem. HTTP 4xx/5xx still finishes the response. The listener commits the open RLS transaction, including any writes that already ran.

Checks. Did the handler write before throwing? Did the client see an error while the DB committed? Did a pooled connection return with a leftover role if commit failed oddly?

Change. The intended design is: success commit, error rollback, always RESET ROLE before release. The file as checked in does not inspect status codes.

Result. I describe the class and the would-do. I do not invent a corrupt-row incident.

// finish-transaction.middleware.ts — actual
res.on('finish', async () => {
  const tx = req.dbTransaction;
  if (!tx) return;
  try { await tx.commit(); }
  catch (e) { await tx.rollback(); }
});

Concrete example. A report save throws after INSERT but the response is 500. finish still commits. Callers retry and duplicate. Isolation is a different class; this is transaction hygiene.

They might ask nextWhat you say
Was this a named incident?No.
What would you do differently?Commit only on 2xx, rollback otherwise, and reset role in finally so pool reuse cannot leak SET ROLE.

Class 10 — FastAPI CORS * (and Nest default *) Resume-derived

Mapping / evidence. convbi-ai/main.py allow_origins=["*"], allow_credentials=True. Nest enableCors({ origin: process.env.CORS_ORIGIN || '*', credentials: true }). Cookie MD claims specific origins — that file does not match main.ts.

Problem. A browser from any origin can call the FastAPI proposer. FastAPI has no JWT. Nest is supposed to be the only caller, but CORS * plus an exposed chatbot URL is a generation endpoint on the public internet.

Checks. Is FastAPI reachable without going through Nest? Does Nest attach user identity to that POST? (It does not.) Spec: * + credentials is not a valid browser CORS combination.

Change. Lock FastAPI to the Nest origin or keep it private; never let the browser talk to the generator; keep execution on Nest under SET ROLE.

Result. Isolation still depends on Nest executing SQL. CORS is not RLS, but it is how an unauthenticated client reaches the proposer.

Concrete example. Browser → FastAPI /chatbot returns SQL text. Harmless until someone also exposes a non-RLS execute. Defense in depth is Nest-only execution plus a private generator.

They might ask nextWhat you say
Was this a named incident?No.
Cookie migration?Docs say cookies landed. Running code is still Bearer + localStorage. I will not speak cookies as shipped in this snapshot.

7. Honest 10×

Q10. “What breaks at 10× and what do you do first?” Resume-derived Standard CS

Mapping / evidence. Pool max 20; one open transaction per request until finish; FastAPI 8 gunicorn workers; Sequelize synchronize: true in this module (schema-auto-sync risk, not a scale feature). No operated shard, Kafka, EKS, or multi-region.

Situation. 10× raises concurrent connections, cache misses, role-policy combinations, task demand, and harm from isolation mistakes.

Task. Scale after measuring the current mechanism.

Action.

  1. Expand protected-table/role deny matrix including JOIN fixtures.
  2. Test pooled role set/reset; do not rely on commit-on-finish.
  3. Stop treating a process Map as a distributed cache.
  4. Remove dashboard N+1; keep the model off tiles.
  5. Size the pool against desired task count (20 × tasks can exhaust RDS max_connections).
  6. Increase ECS desired count behind ALB health.
  7. Turn off synchronize: true in prod-shaped deploys.
  8. Re-measure before new architecture.

Result. More of the mechanism that supports current outcomes. I explicitly did not shard Ylogx.

Concrete example. More tasks without pool sizing creates connection exhaustion. First test pool/cache/task capacity together, not draw shards.

They might ask nextWhat you say
Why not Kafka/EKS/shard?No operated evidence. First measured bottleneck is pool + RLS transactions, not a bus.
How do you know the metric?Add real load evidence later. Do not invent values today.

8. Skills honesty and spoken selector

Q11. “Java, Kubernetes, FAISS, Auth0, Gemini, cookies — listed versus this repo?” Resume-derived

Java. Live Code language on Zoom. Ylogx was not Spring/JVM production.

Kubernetes. Listed knowledge. Ylogx shipped Docker on ECS. I was not a production cluster owner and do not claim EKS.

FAISS / Qdrant. Not this intern. Ylogx used Postgres + SQL RAG.

Auth0. Listed skill. This snapshot is JWT Bearer from Nest jsonwebtoken.

Gemini. Frontend dependency and docs package table. Extractor is ChatOpenAI. No GoogleGenerativeAI import in frontend src.

Cookies. A completed-migration markdown exists. Running middleware is Bearer.

Redis. Resume −35%. Not in this Nest tree.

Q12. “Give me the problems when it went live.” Resume-derived

Problem. Went live meant blast radius moved from my user to three organizational tiers on one warehouse.

Checks. Classes: wrong-org JOIN; Map/cache without tier; LLM on KPI tile; sick ECS task; hallucinated SQL; DNS; rls_no_access; executeWithoutRLS misuse; FinishTransaction commit-on-finish; FastAPI CORS *.

Change. Caller-role RLS + NestJS RBAC; no LLM on dashboards; constrained SQL failing closed; hop-by-hop DNS/health; fail closed when no db role.

Result. 40% faster reports, 99.9% uptime, +65% analysis, −35% bot DB latency, 30 dashboards +60% operations, sub-210 ms.

Stop. Let the interviewer choose one class. Do not restart the architecture or invent a ticket.

Concrete example. “Would you like isolation, cache identity, dashboard path, SQL validation, serving/DNS, or transaction hygiene?”

They might ask nextWhat you say
Best Dive Deep?RLS SET ROLE plus Redis-on-resume / Map-without-tier honesty. Never SEO 403 lead.
Ownership / Frugality?Ownership: isolation as a ship blocker. Frugality: Redis vs bigger RDS on the resume; ECS not Kubernetes in this intern.

9. Section B — practice STAR, not yours

These outlines exist so you can see the shape of a weak versus strong answer. They are not intern facts.

Practice — “I owned a six-hour prod war room” Standard CS

DO NOT SPEAK THIS AS YOUR STORY. Fabricated stories get busted in Bar Raiser follow-ups.

A generic Amazon-style outline would invent a PagerDuty page, a timestamp, a customer name, and a manager quote, then claim you personally rolled DNS for three hours. That is exactly what this chapter forbids. Ylogx answers stay at failure classes, file names, and resume numbers.

Strong shape (still not a fake ticket). “I designed against unassigned ADMIN inheriting owner reads by mapping that path to rls_no_access. I have no incident ID.”