posthog icon indicating copy to clipboard operation
posthog copied to clipboard

feat: ai viz

Open aspicer opened this issue 1 month ago • 4 comments

Problem

Changes

How did you test this code?

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Changelog: (features only) Is this feature complete?

aspicer avatar Dec 10 '25 00:12 aspicer

Hey @aspicer! 👋 This pull request seems to contain no description. Please add useful context, rationale, and/or any other information that will help make sense of this change now and in the distant Mars-based future.

posthog-bot avatar Dec 10 '25 00:12 posthog-bot

Migration SQL Changes

Hey 👋, we've detected some migrations on this PR. Here's the SQL output for each migration, make sure they make sense:

products/ai_visibility/backend/migrations/0001_initial.py

BEGIN;
--
-- Create model AiVisibilityRun
--
CREATE TABLE "posthog_ai_visibility_run" ("id" uuid NOT NULL PRIMARY KEY, "domain" varchar(255) NOT NULL, "workflow_id" varchar(255) NOT NULL, "status" varchar(20) NOT NULL, "error_message" text NULL, "created_at" timestamp with time zone NOT NULL, "completed_at" timestamp with time zone NULL, "s3_path" varchar(512) NULL);
CREATE INDEX "posthog_ai_visibility_run_domain_e746bb2e" ON "posthog_ai_visibility_run" ("domain");
CREATE INDEX "posthog_ai_visibility_run_domain_e746bb2e_like" ON "posthog_ai_visibility_run" ("domain" varchar_pattern_ops);
CREATE INDEX "posthog_ai_visibility_run_created_at_7a5b731d" ON "posthog_ai_visibility_run" ("created_at");
CREATE INDEX "posthog_ai__domain_23b213_idx" ON "posthog_ai_visibility_run" ("domain", "created_at" DESC);
COMMIT;

products/ai_visibility/backend/migrations/0002_aivisibilityrun_progress_step.py

BEGIN;
--
-- Add field progress_step to aivisibilityrun
--
ALTER TABLE "posthog_ai_visibility_run" ADD COLUMN "progress_step" varchar(30) DEFAULT 'starting' NOT NULL;
ALTER TABLE "posthog_ai_visibility_run" ALTER COLUMN "progress_step" DROP DEFAULT;
COMMIT;

Last updated: 2025-12-10 22:43 UTC (00f1013)

github-actions[bot] avatar Dec 10 '25 00:12 github-actions[bot]

🔍 Migration Risk Analysis

We've analyzed your migrations for potential risks.

Summary: 2 Safe | 0 Needs Review | 0 Blocked

✅ Safe

Brief or no lock, backwards compatible

ai_visibility.0001_initial
  └─ #1 ✅ CreateModel
     Creating new table is safe
     model: AiVisibilityRun
  │
  └──> ℹ️  INFO:
       ℹ️  Skipped operations on newly created tables (empty tables
       don't cause lock contention).
ai_visibility.0002_aivisibilityrun_progress_step
  └─ #1 ✅ AddField
     Adding NOT NULL field with constant default (safe in PG11+)
     model: aivisibilityrun, field: progress_step

Last updated: 2025-12-10 22:44 UTC (00f1013)

github-actions[bot] avatar Dec 10 '25 00:12 github-actions[bot]

Wiz Scan Summary

⚠️ Many findings detected
Many findings were detected, but only a subset of the findings are displayed inline due to API constraints. To view all findings inline, please click here.
Scanner Findings
Vulnerability Finding Vulnerabilities 22 High 22 Medium 13 Low
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Total 22 High 22 Medium 13 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

wiz-7ad640923b[bot] avatar Dec 10 '25 01:12 wiz-7ad640923b[bot]