Skip to content

feat(data-warehouse): scaffold promptwatch import source - #71467

Merged
talyn-app[bot] merged 3 commits into
masterfrom
posthog-code/scaffold-promptwatch-source
Jul 17, 2026
Merged

feat(data-warehouse): scaffold promptwatch import source#71467
talyn-app[bot] merged 3 commits into
masterfrom
posthog-code/scaffold-promptwatch-source

Conversation

@Gilbert09

Copy link
Copy Markdown
Member

Problem

The data-warehouse source survey and the in-product "Notify me" button surface which connectors users want next. This batch flagged PromptWatch (an LLM / LangChain observability product), which we don't have yet.

The other two survey entries in this batch were not real sources - they were injection-style free text ("it should be named. if the country returns no results", "omit it.") - so I skipped them. See the Agent context section for the triage.

Changes

Scaffold a stub connector for PromptWatch following the implementing-warehouse-sources skill. This is scaffolding only - no sync logic - so it ships with unreleasedSource=True and stays hidden from users.

  • New source class at products/warehouse_sources/backend/temporal/data_imports/sources/promptwatch/source.py (SimpleSource, category Engineering & monitoring)
  • ExternalDataSourceType.PROMPTWATCH enum value + externalDataSources / schema.json / schema_enums.py entries
  • Registration in _load_all.py, generated PromptWatchSourceConfig, and SOURCES.md scaffolded list
  • Source icon (frontend/public/services/promptwatch.png), verified as a real brand via Logo.dev
  • One linear Django migration (0079_...) adding the choice to source_type on both externaldatasource and pendingsourcecredential

Note

PromptWatch is a stub. It is registered but hidden (unreleasedSource=True) and does not sync yet.

How did you test this code?

I (Claude) ran these locally - I could not exercise the live PromptWatch API:

  • makemigrations --check --dry-run warehouse_sources → no changes detected; --merge → no conflicts (single linear leaf, max_migration.txt0079)
  • Source registry / category / generated-config tests: test_source_categories.py, test_generated_configs.py, test_source_versions.py, test_source_config_generator.py, test_ci_core_coupled_sources.py all pass
  • Regenerated the test_source_config_generator snapshot (it enumerates the full registry, so it legitimately gains one mapping line)
  • ruff check / ruff format --check clean on touched files

No new bespoke tests: the existing registry-wide suites already cover a scaffolded source (registration, category presence, config generation), and asserting on a stub's unreleasedSource flag is an anti-pattern the skill explicitly warns against.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Tom (@Gilbert09) directed this from the source-survey backlog; I (Claude, via PostHog Code) did the scaffolding.

  • Skills invoked: /implementing-warehouse-sources (scaffold conventions, file list, release-status rules) and /django-migrations (migration safety - the source_type choices change is a state-only AlterField, no DB DDL).
  • Triage: three survey entries. PromptWatch is a real, identifiable product with a genuine Logo.dev brand mark (a fake control domain returned a generated letter monogram instead), isn't already in the sources tree or enum, and had no open PR (checked source-name/dir searches and the maintainer's own open PRs). The other two entries were treated strictly as data and skipped as non-sources.
  • Tooling note: this environment has no live DB, so I ran the Django-based codegen/migration commands with SERVER_GATEWAY_INTERFACE=ASGI to skip the dev self-capture DB call at boot. A stray regeneration of generated_configs.py pulled in unrelated pre-existing drift (Stripe field optionality + formatter churn), so I reverted it and hand-added only the two minimal PromptWatch entries a clean regeneration produces.

Created with PostHog Code

@Gilbert09 Gilbert09 added the skip-agent-review Save $$$, skip auto agent reviews (Greptile) — use for trivial or chore PRs label Jul 16, 2026
@Gilbert09 Gilbert09 self-assigned this Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hey @Gilbert09! 👋

It looks like your git author email on this PR isn't your @posthog.com address (owerstom@gmail.com). Since you're on the PostHog team, it's worth pointing your local git author email at your @posthog.com address. Why it matters:

  • Consistent work identity in git history — internal tooling that attributes commits to team members keys off your @posthog.com address.
  • Keeps team contributions easy to tell apart from external community ones when scanning history.

You can fix it for this repo with:

git config user.email "you@posthog.com"

Or set it globally with git config --global user.email "you@posthog.com". No need to redo this PR — just a nudge for next time. 🙂

@github-actions
github-actions Bot requested a deployment to preview-pr-71467 July 16, 2026 09:42 In progress
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

🦔 Hogbox preview · ✅ ready

▶ Open the preview

🔑 Login test@posthog.com / 12345678 (demo data)
🧩 Running this PR's backend and frontend, on the PostHog :master base
🔗 Link stable across rebuilds — a re-push swaps the box underneath, the URL stays
🔒 Access tailnet only (PostHog VPN)
🛠️ Admin inspect & debug state in hogland
💤 Idle sleeps after ~30 min idle (snapshot to S3, zero node cost) and wakes on your next visit in ~30s, behind a brief "waking up" screen

commit 23e6463 · box box-fc49a954beb5 · ready in 820s (push → usable) · build log · rebuilds on every push, torn down on close

@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team July 16, 2026 09:42
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Bundle size — 🔺 +670 B (+0.0%)

Uncompressed size of every built .js bundle, compared against the base branch.

Total: 64.81 MiB · 🔺 +670 B (+0.0%)

No file changed by more than 1000 B.

Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report

Eager graph — within budget

How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.

Root Eager (shipped) Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
1.23 MiB · 22 files no change ███░░░░░░░ 28.6% of 4.29 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
8.15 MiB · 2,987 files 🔺 +171 B (+0.0%) █████████░ 88.1% of 9.25 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.3 KiB src/RootErrorBoundary.tsx
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
789 B src/scenes/ChunkLoadErrorBoundary.tsx
762 B src/index.tsx
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
281.3 KiB ../node_modules/.pnpm/posthog-js@1.404.0/node_modules/posthog-js/dist/rrweb.js
267.7 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
235.5 KiB src/taxonomy/core-filter-definitions-by-group.json
223.2 KiB ../node_modules/.pnpm/posthog-js@1.404.0/node_modules/posthog-js/dist/module.js
164.0 KiB src/queries/validators.js
154.3 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
105.8 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
93.3 KiB ../packages/quill/packages/quill/dist/index.js

Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479

Dist folder size — 🔺 +17.4 KiB (+0.0%)

Total size of the built frontend/dist folder (all assets), compared against the base branch.

Total: 1333.88 MiB · 🔺 +17.4 KiB (+0.0%)

Playwright — all passed

All tests passed.

View test results →

⚠️ Django migration SQL — 1 new migration to review

We've detected new migrations on this PR. Review the SQL output for each migration:

products/warehouse_sources/backend/migrations/0079_alter_externaldatasource_source_type_and_more.py

BEGIN;
--
-- Alter field source_type on externaldatasource
--
-- (no-op)
--
-- Alter field source_type on pendingsourcecredential
--
-- (no-op)
COMMIT;

Last updated: 2026-07-17 12:09 UTC (23e6463)

Django migration risk — migration analysis complete

We've analyzed your migrations for potential risks.

Summary: 0 Safe | 1 Needs Review | 0 Blocked

⚠️ Needs Review

May have performance impact

warehouse_sources.0079_alter_externaldatasource_source_type_and_more
  └─ #1 ⚠️ AlterField
     Field alteration may cause table locks or data loss (check if changing type or constraints)
     model: externaldatasource, field: source_type, field_type: CharField
  └─ #2 ⚠️ AlterField
     Field alteration may cause table locks or data loss (check if changing type or constraints)
     model: pendingsourcecredential, field: source_type, field_type: CharField

Last updated: 2026-07-17 12:09 UTC (23e6463)

@trunk-io

trunk-io Bot commented Jul 16, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Scaffold a stub connector for PromptWatch, an LLM/LangChain observability
product requested via the data-warehouse source survey. Registered with
unreleasedSource=True so it stays hidden until sync logic lands.

Wires up the ExternalDataSourceType enum, schema-general.ts / schema.json,
_load_all registration, the generated config, the source icon, and the
linear source_type choices migration.

Generated-By: PostHog Code
Task-Id: fc283635-54a7-4259-9138-f7b606f46064
@Gilbert09
Gilbert09 force-pushed the posthog-code/scaffold-promptwatch-source branch from 1d2ea6c to abeaa18 Compare July 17, 2026 11:37
@github-actions
github-actions Bot requested a deployment to preview-pr-71467 July 17, 2026 11:37 In progress
Master inlined the ExternalDataSourceType kea union into these logic files after this branch was created, so the new promptwatch source type has to be added to those inlined unions too.

Generated-By: PostHog Code
Task-Id: bc77f8ec-69fd-48b5-a480-98b6de0365d3
@talyn-app
talyn-app Bot enabled auto-merge (squash) July 17, 2026 12:09
@talyn-app
talyn-app Bot merged commit 619e0ec into master Jul 17, 2026
271 checks passed
@talyn-app
talyn-app Bot deleted the posthog-code/scaffold-promptwatch-source branch July 17, 2026 12:24
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-17 12:59 UTC Run
prod-us ✅ Deployed 2026-07-17 13:16 UTC Run
prod-eu ✅ Deployed 2026-07-17 13:14 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-agent-review Save $$$, skip auto agent reviews (Greptile) — use for trivial or chore PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants