feat(support): add support use case target#66
Merged
Conversation
… scoring stream Add new `support` target to databricks.yml with full DAG: - Support request generator (deterministic synthetic data from delivered events) - Support triage agent (DSPy ReAct with UC function tools, policy-based guardrails) - Scoring stream with fake-it-till-up pattern and inference capping Based on work from PR #63. Lakebase + App stages to follow. Co-authored-by: Andre Landgraf <andre@landgraf.dev> Co-authored-by: Isaac
…unction - Agent stream now depends on SDP directly (not generator), matching the refund pattern where all stages fan out from SDP - Fix get_order_overview to JOIN simulator.locations for location name (all_events has location_id, not location) Co-authored-by: Andre Landgraf <andre@landgraf.dev> Co-authored-by: Isaac
Generator is the split point - both Support_Request_Agent (leaf) and Support_Request_Agent_Stream fan out from Support_Request_Generator_Stream. Co-authored-by: Andre Landgraf <andre@landgraf.dev> Co-authored-by: Isaac
- Add support_lakebase stage: Lakebase instance, synced table for support_agent_reports, OLTP tables (operator_actions, support_replies, request_status, response_ratings), warehouse, app deployment - Port supportconsolek React/TS app from PR #63 - Dynamic app.yaml generation with computed warehouse/endpoint values - Add sync exclusions for supportconsolek build artifacts - Wire Support_Lakebase_And_App into DAG (depends on agent stream) Co-authored-by: Andre Landgraf <andre@landgraf.dev> Co-authored-by: Isaac
…tations - Use databricks_postgres as logical database (not caspers_support) so synced table and OLTP tables are in the same Postgres database - Rename synced table to support_agent_reports_sync to match what the support console app queries (support.support_agent_reports_sync) - Fix App resource database_name to databricks_postgres Co-authored-by: Andre Landgraf <andre@landgraf.dev> Co-authored-by: Isaac
…grants The previous approach blindly picked list_roles()[1] for DATABRICKS_SUPERUSER membership, which didn't grant schema-level permissions to the app principal. Now resolves the app's service principal IDs and explicitly grants: - USAGE, CREATE on support schema (OLTP + synced tables) - USAGE, CREATE on public schema (AppKit persistent cache) - SELECT, INSERT, UPDATE, DELETE on all tables in both schemas - Default privileges for future tables/sequences - Creates Postgres role via databricks_auth extension Co-authored-by: Andre Landgraf <andre@landgraf.dev> Co-authored-by: Isaac
UC function creation validates that referenced tables exist. Create empty stub tables with matching schemas before defining get_user_support_history and get_user_request_history functions. Downstream jobs use CREATE TABLE IF NOT EXISTS with identical schemas, so this is a no-op if tables already exist. Co-authored-by: Andre Landgraf <andre@landgraf.dev> Co-authored-by: Isaac
…ault The default databricks_postgres database doesn't register properly with the control plane for App resource role provisioning. Switch to an explicitly created caspers_support database (matching main's pattern of using a custom database name) so the platform can auto-provision roles during app creation. All components now consistently use caspers_support: - DatabaseCatalog, synced table, OLTP tables, app resource, app.yaml Co-authored-by: Andre Landgraf <andre@landgraf.dev> Co-authored-by: Isaac
The control plane fails to auto-provision roles for the database resource. Instead, create app with warehouse resource only and handle Postgres permissions via explicit psycopg2 grants. App connects to Lakebase via env vars (LAKEBASE_ENDPOINT, PGDATABASE). Co-authored-by: Andre Landgraf <andre@landgraf.dev> Co-authored-by: Isaac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
supporttarget todatabricks.ymlwith full DAGBased on work from PR #63.
Co-authored-by: Andre Landgraf andre@landgraf.dev
Test plan
databricks bundle deploy -t supportsupport.raw_support_requestssupport.support_agent_reportsThis pull request was AI-assisted by Isaac.