Skip to content

chore: split cloud/ and marketing/ to private gradata-cloud#76

Merged
Gradata merged 2 commits into
mainfrom
chore/split-cloud-to-private-repo
Apr 15, 2026
Merged

chore: split cloud/ and marketing/ to private gradata-cloud#76
Gradata merged 2 commits into
mainfrom
chore/split-cloud-to-private-repo

Conversation

@Gradata

@Gradata Gradata commented Apr 15, 2026

Copy link
Copy Markdown
Owner

Summary

Architectural split per the 2-repo plan:

  • cloud/ and marketing/ now live at Gradata/gradata-cloud (private)
  • Full git history preserved via git-filter-repo
  • Public OSS repo is now SDK-only (SDK + plugin + npm wrapper + docs + examples)

Also removed

  • .github/workflows/dashboard-source-maps.yml (targeted cloud/dashboard/**)
  • .github/workflows/loadtest-nightly.yml (ran k6 from cloud/loadtest/)

Both workflows are being migrated to the private repo separately.

Not touched

  • pyproject.toml cloud = [] extra — this is an SDK Python extra for the cloud client, unrelated to the cloud/ directory
  • .gitignore docs/cloud/ — unrelated generated docs path
  • sdk/mkdocs.yml cloud docs nav — references SDK-side cloud docs, not the removed directory

Test plan

  • CI passes on this branch (should, since removed workflows targeted the removed paths)
  • Verify Gradata/gradata-cloud private repo contains preserved history
  • Confirm no remaining references to cloud/ or marketing/ paths break SDK build

- Moves cloud/dashboard, cloud/backend, and marketing/ to new private repo
- Full git history preserved via git-filter-repo
- gradata (public) now contains SDK + plugin + npm wrapper + docs + examples only
- Proprietary dashboard/backend/marketing code closed-sourced per architectural split
- Removes dashboard-source-maps.yml and loadtest-nightly.yml (both targeted cloud/ paths)

Signed-off-by: Oliver Le <oliver@gradata.ai>
@greptile-apps

greptile-apps Bot commented Apr 15, 2026

Copy link
Copy Markdown

Too many files changed for review. (249 files found, 100 file limit)

@coderabbitai

coderabbitai Bot commented Apr 15, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: eb262f93-7bd1-4163-920f-5cb3a93695f4

📥 Commits

Reviewing files that changed from the base of the PR and between a100a3a and d34b356.

⛔ Files ignored due to path filters (5)
  • cloud/dashboard/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • cloud/dashboard/public/favicon.svg is excluded by !**/*.svg
  • cloud/dashboard/public/icons.svg is excluded by !**/*.svg
  • marketing/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • marketing/public/favicon.svg is excluded by !**/*.svg
📒 Files selected for processing (244)
  • .github/workflows/dashboard-source-maps.yml
  • .github/workflows/loadtest-nightly.yml
  • cloud/.env.example
  • cloud/Dockerfile
  • cloud/OPS.md
  • cloud/RAILWAY-ENV.md
  • cloud/RUNBOOK-INCIDENT.md
  • cloud/SENTRY-SETUP.md
  • cloud/SUPABASE-SETUP.md
  • cloud/app/__init__.py
  • cloud/app/auth.py
  • cloud/app/config.py
  • cloud/app/db.py
  • cloud/app/main.py
  • cloud/app/middleware.py
  • cloud/app/models.py
  • cloud/app/rate_limit.py
  • cloud/app/routes/__init__.py
  • cloud/app/routes/activity.py
  • cloud/app/routes/analytics.py
  • cloud/app/routes/api_keys.py
  • cloud/app/routes/billing.py
  • cloud/app/routes/brains.py
  • cloud/app/routes/corrections.py
  • cloud/app/routes/gdpr.py
  • cloud/app/routes/health.py
  • cloud/app/routes/lessons.py
  • cloud/app/routes/meta_rules.py
  • cloud/app/routes/operator.py
  • cloud/app/routes/proof.py
  • cloud/app/routes/public.py
  • cloud/app/routes/rule_patches.py
  • cloud/app/routes/sync.py
  • cloud/app/routes/team.py
  • cloud/app/routes/telemetry.py
  • cloud/app/routes/users.py
  • cloud/app/sentry_init.py
  • cloud/dashboard/.env.example
  • cloud/dashboard/.gitignore
  • cloud/dashboard/.nvmrc
  • cloud/dashboard/CLOUDFLARE-PAGES.md
  • cloud/dashboard/README.md
  • cloud/dashboard/SOURCE-MAPS.md
  • cloud/dashboard/app/(dashboard)/api-keys/page.tsx
  • cloud/dashboard/app/(dashboard)/billing/page.tsx
  • cloud/dashboard/app/(dashboard)/brain/page.tsx
  • cloud/dashboard/app/(dashboard)/corrections/page.tsx
  • cloud/dashboard/app/(dashboard)/dashboard/page.tsx
  • cloud/dashboard/app/(dashboard)/docs/page.tsx
  • cloud/dashboard/app/(dashboard)/layout.tsx
  • cloud/dashboard/app/(dashboard)/meta-rules/page.tsx
  • cloud/dashboard/app/(dashboard)/notifications/page.tsx
  • cloud/dashboard/app/(dashboard)/observability/page.tsx
  • cloud/dashboard/app/(dashboard)/operator/page.tsx
  • cloud/dashboard/app/(dashboard)/privacy/page.tsx
  • cloud/dashboard/app/(dashboard)/proof/page.tsx
  • cloud/dashboard/app/(dashboard)/rules/page.tsx
  • cloud/dashboard/app/(dashboard)/self-healing/page.tsx
  • cloud/dashboard/app/(dashboard)/settings/page.tsx
  • cloud/dashboard/app/(dashboard)/setup/page.tsx
  • cloud/dashboard/app/(dashboard)/team/members/page.tsx
  • cloud/dashboard/app/(dashboard)/team/page.tsx
  • cloud/dashboard/app/error.tsx
  • cloud/dashboard/app/forgot-password/page.tsx
  • cloud/dashboard/app/globals.css
  • cloud/dashboard/app/layout.tsx
  • cloud/dashboard/app/legal/privacy/page.tsx
  • cloud/dashboard/app/legal/terms/page.tsx
  • cloud/dashboard/app/login/page.tsx
  • cloud/dashboard/app/not-found.tsx
  • cloud/dashboard/app/page.tsx
  • cloud/dashboard/app/signup/page.tsx
  • cloud/dashboard/components.json
  • cloud/dashboard/eslint.config.js
  • cloud/dashboard/instrumentation.ts
  • cloud/dashboard/next.config.ts
  • cloud/dashboard/package.json
  • cloud/dashboard/postcss.config.mjs
  • cloud/dashboard/public/_headers
  • cloud/dashboard/public/_redirects
  • cloud/dashboard/public/robots.txt
  • cloud/dashboard/sentry.client.config.ts
  • cloud/dashboard/sentry.edge.config.ts
  • cloud/dashboard/sentry.server.config.ts
  • cloud/dashboard/src/components/brain/ABProofPanel.tsx
  • cloud/dashboard/src/components/brain/ActiveRulesPanel.tsx
  • cloud/dashboard/src/components/brain/ActivityFeed.tsx
  • cloud/dashboard/src/components/brain/CategoriesChart.tsx
  • cloud/dashboard/src/components/brain/ClearDemoButton.tsx
  • cloud/dashboard/src/components/brain/CorrectionDecayCurve.tsx
  • cloud/dashboard/src/components/brain/GraduationProgressBar.tsx
  • cloud/dashboard/src/components/brain/KpiStrip.tsx
  • cloud/dashboard/src/components/brain/MetaRulesGrid.tsx
  • cloud/dashboard/src/components/brain/MethodologyLink.tsx
  • cloud/dashboard/src/components/brain/PlanBadge.tsx
  • cloud/dashboard/src/components/brain/PrivacyPosturePanel.tsx
  • cloud/dashboard/src/components/layout/AuthLegalLinks.tsx
  • cloud/dashboard/src/components/layout/DashboardLayout.tsx
  • cloud/dashboard/src/components/layout/GlassCard.tsx
  • cloud/dashboard/src/components/layout/NoiseOverlay.tsx
  • cloud/dashboard/src/components/operator/CustomerRow.tsx
  • cloud/dashboard/src/components/providers/AuthProvider.tsx
  • cloud/dashboard/src/components/shared/EmptyState.tsx
  • cloud/dashboard/src/components/shared/ErrorState.tsx
  • cloud/dashboard/src/components/shared/LoadingSpinner.tsx
  • cloud/dashboard/src/components/team/TeamLeaderboard.tsx
  • cloud/dashboard/src/components/ui/avatar.tsx
  • cloud/dashboard/src/components/ui/badge.tsx
  • cloud/dashboard/src/components/ui/button.tsx
  • cloud/dashboard/src/components/ui/card.tsx
  • cloud/dashboard/src/components/ui/dialog.tsx
  • cloud/dashboard/src/components/ui/dropdown-menu.tsx
  • cloud/dashboard/src/components/ui/input.tsx
  • cloud/dashboard/src/components/ui/label.tsx
  • cloud/dashboard/src/components/ui/select.tsx
  • cloud/dashboard/src/components/ui/separator.tsx
  • cloud/dashboard/src/components/ui/table.tsx
  • cloud/dashboard/src/components/ui/tabs.tsx
  • cloud/dashboard/src/components/ui/tooltip.tsx
  • cloud/dashboard/src/hooks/useApi.ts
  • cloud/dashboard/src/hooks/useAuth.ts
  • cloud/dashboard/src/lib/analytics-client.ts
  • cloud/dashboard/src/lib/api.ts
  • cloud/dashboard/src/lib/auth-errors.ts
  • cloud/dashboard/src/lib/errors.ts
  • cloud/dashboard/src/lib/fixtures/demo-dashboard.ts
  • cloud/dashboard/src/lib/fixtures/mock-activity.ts
  • cloud/dashboard/src/lib/fixtures/mock-meta-rules.ts
  • cloud/dashboard/src/lib/fixtures/mock-proof.ts
  • cloud/dashboard/src/lib/fixtures/mock-self-healing.ts
  • cloud/dashboard/src/lib/format.ts
  • cloud/dashboard/src/lib/operator.ts
  • cloud/dashboard/src/lib/supabase.ts
  • cloud/dashboard/src/lib/team.ts
  • cloud/dashboard/src/lib/utils.ts
  • cloud/dashboard/src/types/api.ts
  • cloud/dashboard/tests/ActiveRulesPanel.test.tsx
  • cloud/dashboard/tests/ActivityFeed.test.tsx
  • cloud/dashboard/tests/CategoriesChart.test.tsx
  • cloud/dashboard/tests/ClearDemoButton.test.tsx
  • cloud/dashboard/tests/CorrectionDecayCurve.test.tsx
  • cloud/dashboard/tests/GraduationProgressBar.test.tsx
  • cloud/dashboard/tests/KpiStrip.test.tsx
  • cloud/dashboard/tests/MetaRulesGrid.test.tsx
  • cloud/dashboard/tests/OperatorPage.test.tsx
  • cloud/dashboard/tests/PlanBadge.test.tsx
  • cloud/dashboard/tests/PlanGate.test.tsx
  • cloud/dashboard/tests/TeamLeaderboard.test.tsx
  • cloud/dashboard/tests/analytics-client.test.ts
  • cloud/dashboard/tests/dashboard-page.test.tsx
  • cloud/dashboard/tests/operator.test.ts
  • cloud/dashboard/tests/proof.test.tsx
  • cloud/dashboard/tests/setup.ts
  • cloud/dashboard/tests/team.test.ts
  • cloud/dashboard/tsconfig.json
  • cloud/dashboard/vitest.config.ts
  • cloud/dashboard/wrangler.toml
  • cloud/data/proof_results.json
  • cloud/infra/cf_worker_api_proxy.js
  • cloud/loadtest/README.md
  • cloud/loadtest/k6/authed-read.js
  • cloud/loadtest/k6/baseline.js
  • cloud/loadtest/k6/spike.js
  • cloud/loadtest/k6/sync-write.js
  • cloud/migrations/001_initial_schema.sql
  • cloud/migrations/002_notification_prefs.sql
  • cloud/migrations/003_workspace_invites.sql
  • cloud/migrations/004_seed_demo_brain.sql
  • cloud/migrations/005_lessons_unique_constraint.sql
  • cloud/migrations/005_processed_webhooks.sql
  • cloud/migrations/006_soft_delete.sql
  • cloud/migrations/007_telemetry_events.sql
  • cloud/pyproject.toml
  • cloud/railway.toml
  • cloud/scripts/export_ab_proof.py
  • cloud/supabase/email-templates/README.md
  • cloud/supabase/email-templates/change-email.html
  • cloud/supabase/email-templates/confirm-signup.html
  • cloud/supabase/email-templates/invite-user.html
  • cloud/supabase/email-templates/magic-link.html
  • cloud/supabase/email-templates/reauthentication.html
  • cloud/supabase/email-templates/reset-password.html
  • cloud/tests/__init__.py
  • cloud/tests/conftest.py
  • cloud/tests/test_auth.py
  • cloud/tests/test_billing.py
  • cloud/tests/test_brains.py
  • cloud/tests/test_db_guards.py
  • cloud/tests/test_gdpr.py
  • cloud/tests/test_health.py
  • cloud/tests/test_models.py
  • cloud/tests/test_new_endpoints.py
  • cloud/tests/test_new_routes.py
  • cloud/tests/test_notifications.py
  • cloud/tests/test_operator.py
  • cloud/tests/test_proof.py
  • cloud/tests/test_rate_limit.py
  • cloud/tests/test_seed_demo.py
  • cloud/tests/test_sentry.py
  • cloud/tests/test_sync.py
  • cloud/tests/test_team.py
  • cloud/tests/test_telemetry.py
  • marketing/.env.example
  • marketing/.gitignore
  • marketing/README.md
  • marketing/app/docs/page.tsx
  • marketing/app/globals.css
  • marketing/app/how-it-works/page.tsx
  • marketing/app/layout.tsx
  • marketing/app/legal/dpa/page.tsx
  • marketing/app/legal/privacy/page.tsx
  • marketing/app/legal/sla/page.tsx
  • marketing/app/legal/subprocessors/page.tsx
  • marketing/app/legal/terms/page.tsx
  • marketing/app/page.tsx
  • marketing/app/pricing/page.tsx
  • marketing/app/robots.ts
  • marketing/app/sitemap.ts
  • marketing/next-env.d.ts
  • marketing/next.config.ts
  • marketing/package.json
  • marketing/postcss.config.mjs
  • marketing/public/.well-known/security.txt
  • marketing/public/_headers
  • marketing/public/_redirects
  • marketing/src/components/CodeBlock.tsx
  • marketing/src/components/Footer.tsx
  • marketing/src/components/GlassCard.tsx
  • marketing/src/components/Header.tsx
  • marketing/src/components/Hero.tsx
  • marketing/src/components/HomeFooterCta.tsx
  • marketing/src/components/KpiProofRow.tsx
  • marketing/src/components/LegalPageHeader.tsx
  • marketing/src/components/NoiseOverlay.tsx
  • marketing/src/components/PlausibleScript.tsx
  • marketing/src/components/PricingCard.tsx
  • marketing/src/components/SignupCompleteTracker.tsx
  • marketing/src/lib/analytics.test.ts
  • marketing/src/lib/analytics.ts
  • marketing/src/lib/cn.ts
  • marketing/src/lib/site.ts
  • marketing/tsconfig.json
  • marketing/vitest.config.ts
  • marketing/wrangler.toml
💤 Files with no reviewable changes (188)
  • cloud/.env.example
  • cloud/Dockerfile
  • cloud/OPS.md
  • cloud/RAILWAY-ENV.md
  • cloud/app/init.py
  • cloud/app/config.py
  • cloud/app/routes/init.py
  • cloud/app/routes/corrections.py
  • cloud/app/routes/team.py
  • cloud/dashboard/.env.example
  • cloud/dashboard/.gitignore
  • cloud/dashboard/.nvmrc
  • cloud/dashboard/CLOUDFLARE-PAGES.md
  • cloud/dashboard/README.md
  • cloud/dashboard/SOURCE-MAPS.md
  • cloud/dashboard/app/(dashboard)/layout.tsx
  • cloud/dashboard/app/(dashboard)/proof/page.tsx
  • cloud/dashboard/app/error.tsx
  • cloud/dashboard/app/forgot-password/page.tsx
  • cloud/dashboard/app/globals.css
  • cloud/dashboard/app/layout.tsx
  • cloud/dashboard/app/legal/terms/page.tsx
  • cloud/dashboard/app/not-found.tsx
  • cloud/dashboard/app/page.tsx
  • cloud/dashboard/components.json
  • cloud/dashboard/eslint.config.js
  • cloud/dashboard/instrumentation.ts
  • cloud/dashboard/package.json
  • cloud/dashboard/postcss.config.mjs
  • cloud/dashboard/public/_headers
  • cloud/dashboard/public/_redirects
  • cloud/dashboard/public/robots.txt
  • cloud/dashboard/sentry.client.config.ts
  • cloud/dashboard/sentry.edge.config.ts
  • cloud/dashboard/sentry.server.config.ts
  • cloud/dashboard/src/components/brain/ActiveRulesPanel.tsx
  • cloud/dashboard/src/components/brain/CategoriesChart.tsx
  • cloud/dashboard/src/components/brain/KpiStrip.tsx
  • cloud/dashboard/tests/GraduationProgressBar.test.tsx
  • cloud/dashboard/tests/KpiStrip.test.tsx
  • cloud/dashboard/tests/PlanGate.test.tsx
  • cloud/dashboard/tests/CorrectionDecayCurve.test.tsx
  • cloud/dashboard/tests/dashboard-page.test.tsx
  • cloud/dashboard/tests/proof.test.tsx
  • cloud/dashboard/tests/setup.ts
  • cloud/dashboard/vitest.config.ts
  • cloud/dashboard/tests/operator.test.ts
  • cloud/dashboard/wrangler.toml
  • cloud/data/proof_results.json
  • cloud/migrations/002_notification_prefs.sql
  • cloud/dashboard/tsconfig.json
  • cloud/infra/cf_worker_api_proxy.js
  • cloud/migrations/005_lessons_unique_constraint.sql
  • cloud/supabase/email-templates/README.md
  • cloud/supabase/email-templates/invite-user.html
  • cloud/tests/init.py
  • cloud/supabase/email-templates/confirm-signup.html
  • cloud/supabase/email-templates/magic-link.html
  • cloud/supabase/email-templates/change-email.html
  • cloud/railway.toml
  • cloud/tests/test_brains.py
  • cloud/dashboard/src/components/layout/AuthLegalLinks.tsx
  • cloud/dashboard/src/components/brain/MethodologyLink.tsx
  • cloud/dashboard/src/components/shared/EmptyState.tsx
  • cloud/dashboard/src/components/layout/NoiseOverlay.tsx
  • cloud/dashboard/src/components/providers/AuthProvider.tsx
  • cloud/dashboard/src/components/ui/badge.tsx
  • cloud/dashboard/src/components/team/TeamLeaderboard.tsx
  • cloud/dashboard/src/components/ui/input.tsx
  • cloud/dashboard/src/components/shared/LoadingSpinner.tsx
  • cloud/dashboard/src/components/shared/ErrorState.tsx
  • cloud/dashboard/src/components/ui/separator.tsx
  • cloud/dashboard/src/components/ui/label.tsx
  • .github/workflows/dashboard-source-maps.yml
  • .github/workflows/loadtest-nightly.yml
  • cloud/RUNBOOK-INCIDENT.md
  • cloud/SENTRY-SETUP.md
  • cloud/app/main.py
  • cloud/app/middleware.py
  • cloud/app/models.py
  • cloud/app/routes/activity.py
  • cloud/app/routes/analytics.py
  • cloud/app/routes/api_keys.py
  • cloud/app/routes/brains.py
  • cloud/app/routes/health.py
  • cloud/app/routes/lessons.py
  • cloud/app/routes/operator.py
  • cloud/app/routes/proof.py
  • cloud/app/routes/public.py
  • cloud/app/routes/sync.py
  • cloud/dashboard/app/(dashboard)/billing/page.tsx
  • cloud/dashboard/app/(dashboard)/brain/page.tsx
  • cloud/dashboard/app/(dashboard)/corrections/page.tsx
  • cloud/dashboard/app/(dashboard)/docs/page.tsx
  • cloud/dashboard/app/(dashboard)/meta-rules/page.tsx
  • cloud/dashboard/app/(dashboard)/privacy/page.tsx
  • cloud/dashboard/app/(dashboard)/rules/page.tsx
  • cloud/dashboard/app/(dashboard)/self-healing/page.tsx
  • cloud/dashboard/app/(dashboard)/settings/page.tsx
  • cloud/dashboard/app/(dashboard)/team/members/page.tsx
  • cloud/dashboard/app/(dashboard)/team/page.tsx
  • cloud/dashboard/next.config.ts
  • cloud/dashboard/src/components/brain/ActivityFeed.tsx
  • cloud/dashboard/src/components/brain/CorrectionDecayCurve.tsx
  • cloud/dashboard/src/components/brain/MetaRulesGrid.tsx
  • cloud/dashboard/src/components/brain/PlanBadge.tsx
  • cloud/dashboard/src/lib/supabase.ts
  • cloud/dashboard/tests/ClearDemoButton.test.tsx
  • cloud/dashboard/src/lib/team.ts
  • cloud/dashboard/tests/ActivityFeed.test.tsx
  • cloud/dashboard/src/types/api.ts
  • cloud/dashboard/tests/MetaRulesGrid.test.tsx
  • cloud/dashboard/tests/analytics-client.test.ts
  • cloud/dashboard/tests/OperatorPage.test.tsx
  • cloud/dashboard/tests/PlanBadge.test.tsx
  • cloud/loadtest/README.md
  • cloud/loadtest/k6/authed-read.js
  • cloud/migrations/007_telemetry_events.sql
  • cloud/loadtest/k6/baseline.js
  • cloud/dashboard/tests/team.test.ts
  • cloud/loadtest/k6/sync-write.js
  • cloud/migrations/001_initial_schema.sql
  • cloud/migrations/003_workspace_invites.sql
  • cloud/dashboard/src/components/brain/GraduationProgressBar.tsx
  • cloud/dashboard/src/components/brain/PrivacyPosturePanel.tsx
  • cloud/dashboard/src/components/layout/DashboardLayout.tsx
  • cloud/dashboard/src/components/ui/dialog.tsx
  • cloud/dashboard/src/components/operator/CustomerRow.tsx
  • cloud/dashboard/src/components/ui/avatar.tsx
  • cloud/dashboard/src/components/layout/GlassCard.tsx
  • cloud/dashboard/src/components/ui/button.tsx
  • cloud/dashboard/src/components/ui/card.tsx
  • cloud/dashboard/src/components/ui/dropdown-menu.tsx
  • cloud/supabase/email-templates/reset-password.html
  • cloud/dashboard/src/hooks/useApi.ts
  • cloud/dashboard/src/hooks/useAuth.ts
  • cloud/dashboard/src/lib/errors.ts
  • cloud/dashboard/src/lib/api.ts
  • cloud/dashboard/src/lib/fixtures/mock-proof.ts
  • cloud/dashboard/src/lib/fixtures/mock-activity.ts
  • cloud/pyproject.toml
  • cloud/dashboard/src/lib/operator.ts
  • cloud/dashboard/src/lib/auth-errors.ts
  • cloud/dashboard/src/lib/utils.ts
  • cloud/dashboard/tests/CategoriesChart.test.tsx
  • cloud/dashboard/tests/ActiveRulesPanel.test.tsx
  • cloud/dashboard/app/signup/page.tsx
  • cloud/dashboard/app/(dashboard)/observability/page.tsx
  • cloud/dashboard/app/(dashboard)/notifications/page.tsx
  • cloud/SUPABASE-SETUP.md
  • cloud/app/auth.py
  • cloud/app/db.py
  • cloud/app/rate_limit.py
  • cloud/app/routes/billing.py
  • cloud/app/routes/gdpr.py
  • cloud/app/routes/meta_rules.py
  • cloud/app/routes/rule_patches.py
  • cloud/app/routes/telemetry.py
  • cloud/app/sentry_init.py
  • cloud/dashboard/app/(dashboard)/api-keys/page.tsx
  • cloud/dashboard/app/(dashboard)/operator/page.tsx
  • cloud/dashboard/app/(dashboard)/setup/page.tsx
  • cloud/dashboard/app/legal/privacy/page.tsx
  • cloud/dashboard/app/login/page.tsx
  • cloud/dashboard/tests/TeamLeaderboard.test.tsx
  • cloud/loadtest/k6/spike.js
  • cloud/migrations/004_seed_demo_brain.sql
  • cloud/migrations/005_processed_webhooks.sql
  • cloud/scripts/export_ab_proof.py
  • cloud/migrations/006_soft_delete.sql
  • cloud/tests/conftest.py
  • cloud/tests/test_db_guards.py
  • cloud/dashboard/src/components/brain/ABProofPanel.tsx
  • cloud/tests/test_auth.py
  • cloud/dashboard/src/components/ui/tooltip.tsx
  • cloud/dashboard/src/components/ui/table.tsx
  • cloud/supabase/email-templates/reauthentication.html
  • cloud/dashboard/src/components/ui/tabs.tsx
  • cloud/app/routes/users.py
  • cloud/tests/test_billing.py
  • cloud/dashboard/src/components/ui/select.tsx
  • cloud/dashboard/src/lib/fixtures/mock-self-healing.ts
  • cloud/dashboard/src/lib/analytics-client.ts
  • cloud/dashboard/src/lib/fixtures/demo-dashboard.ts
  • cloud/dashboard/src/lib/fixtures/mock-meta-rules.ts
  • cloud/dashboard/src/lib/format.ts
  • cloud/dashboard/src/components/brain/ClearDemoButton.tsx
  • cloud/dashboard/app/(dashboard)/dashboard/page.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages

📝 Walkthrough

Architectural split: Removes cloud/ and marketing/ directories to new private repository (Gradata/gradata-cloud) with full git history preserved via git-filter-repo

Backend removal: Deletes entire FastAPI backend including all /api/v1/* endpoints (auth, sync, billing, team, GDPR, operator, analytics, health checks)

Dashboard removal: Deletes Next.js React dashboard application and all UI components across 50+ page and component files

Database schema removal: Deletes all Supabase migrations (001-007), including tables for brains, corrections, lessons, meta-rules, webhooks, telemetry, and soft-delete infrastructure

Infrastructure removal: Eliminates Docker configuration, Railway deployment settings, k6 load test scripts, Cloudflare Workers proxy, and Sentry integrations

Workflow deletion: Removes .github/workflows/dashboard-source-maps.yml and .github/workflows/loadtest-nightly.yml targeting moved paths

Breaking changes: All cloud-hosted services (API, dashboard, Stripe billing, authentication, GDPR endpoints) are no longer in the public repository

SDK unchanged: Documentation references in pyproject.toml (cloud extra), .gitignore (docs/cloud/), and mkdocs.yml cloud docs remain; these are SDK-related rather than infrastructure-specific

Walkthrough

This pull request removes the entire Gradata Cloud infrastructure, including the FastAPI backend API on Railway, the Next.js dashboard frontend on Cloudflare Pages, all database migrations, GitHub Actions workflows, documentation, and supporting infrastructure files totaling 170+ deletions.

Changes

Cohort / File(s) Summary
Backend API Core
cloud/app/__init__.py, cloud/app/main.py, cloud/app/config.py, cloud/app/auth.py, cloud/app/db.py, cloud/app/sentry_init.py, cloud/app/middleware.py, cloud/app/rate_limit.py, cloud/app/models.py, cloud/Dockerfile, cloud/pyproject.toml
Complete removal of FastAPI application initialization, authentication, database client, Sentry integration, middleware setup, rate limiting, and Pydantic models. Deletes app factory, all dependencies, configuration loading, and request validation logic.
Backend API Routes
cloud/app/routes/__init__.py, cloud/app/routes/sync.py, cloud/app/routes/brains.py, cloud/app/routes/users.py, cloud/app/routes/api_keys.py, cloud/app/routes/lessons.py, cloud/app/routes/corrections.py, cloud/app/routes/analytics.py, cloud/app/routes/meta_rules.py, cloud/app/routes/rule_patches.py, cloud/app/routes/activity.py, cloud/app/routes/health.py, cloud/app/routes/billing.py, cloud/app/routes/team.py, cloud/app/routes/gdpr.py, cloud/app/routes/operator.py, cloud/app/routes/telemetry.py, cloud/app/routes/public.py, cloud/app/routes/proof.py
Removal of all REST API endpoints including brain sync/management, lesson/correction queries, analytics, billing/Stripe integration, team member management, GDPR export/deletion, operator dashboards, telemetry, and health checks.
Database Migrations
cloud/migrations/001_initial_schema.sql, cloud/migrations/002_notification_prefs.sql, cloud/migrations/003_workspace_invites.sql, cloud/migrations/004_seed_demo_brain.sql, cloud/migrations/005_lessons_unique_constraint.sql, cloud/migrations/005_processed_webhooks.sql, cloud/migrations/006_soft_delete.sql, cloud/migrations/007_telemetry_events.sql
Deletion of all Supabase/PostgreSQL schema definitions including tables for workspaces, brains, lessons, corrections, rules, events, webhooks, GDPR exports, and telemetry; removal of RLS policies, indexes, and auto-seeding functions.
Dashboard Root & Pages
cloud/dashboard/app/layout.tsx, cloud/dashboard/app/page.tsx, cloud/dashboard/app/error.tsx, cloud/dashboard/app/not-found.tsx, cloud/dashboard/app/login/page.tsx, cloud/dashboard/app/signup/page.tsx, cloud/dashboard/app/forgot-password/page.tsx, cloud/dashboard/app/(dashboard)/layout.tsx, cloud/dashboard/app/(dashboard)/dashboard/page.tsx, cloud/dashboard/app/(dashboard)/setup/page.tsx, cloud/dashboard/app/(dashboard)/api-keys/page.tsx, cloud/dashboard/app/(dashboard)/billing/page.tsx, cloud/dashboard/app/(dashboard)/settings/page.tsx, cloud/dashboard/app/(dashboard)/brain/page.tsx, cloud/dashboard/app/(dashboard)/rules/page.tsx, cloud/dashboard/app/(dashboard)/corrections/page.tsx, cloud/dashboard/app/(dashboard)/lessons/page.tsx, cloud/dashboard/app/(dashboard)/meta-rules/page.tsx, cloud/dashboard/app/(dashboard)/self-healing/page.tsx, cloud/dashboard/app/(dashboard)/rule-patches/page.tsx, cloud/dashboard/app/(dashboard)/activity/page.tsx, cloud/dashboard/app/(dashboard)/analytics/page.tsx, cloud/dashboard/app/(dashboard)/team/page.tsx, cloud/dashboard/app/(dashboard)/team/members/page.tsx, cloud/dashboard/app/(dashboard)/notifications/page.tsx, cloud/dashboard/app/(dashboard)/docs/page.tsx, cloud/dashboard/app/(dashboard)/privacy/page.tsx, cloud/dashboard/app/(dashboard)/proof/page.tsx, cloud/dashboard/app/(dashboard)/observability/page.tsx, cloud/dashboard/app/(dashboard)/operator/page.tsx, cloud/dashboard/app/legal/privacy/page.tsx, cloud/dashboard/app/legal/terms/page.tsx, cloud/dashboard/app/globals.css
Complete removal of all Next.js pages: authentication flows (login, signup, password reset), main dashboard, brain/lesson/correction viewers, team management, billing, settings, observability, operator dashboard, legal pages, and global styling.
Dashboard Components & Brain UI
cloud/dashboard/src/components/brain/ABProofPanel.tsx, cloud/dashboard/src/components/brain/ActiveRulesPanel.tsx, cloud/dashboard/src/components/brain/ActivityFeed.tsx, cloud/dashboard/src/components/brain/CategoriesChart.tsx, cloud/dashboard/src/components/brain/ClearDemoButton.tsx, cloud/dashboard/src/components/brain/CorrectionDecayCurve.tsx, cloud/dashboard/src/components/brain/GraduationProgressBar.tsx, cloud/dashboard/src/components/brain/KpiStrip.tsx, cloud/dashboard/src/components/brain/MetaRulesGrid.tsx, cloud/dashboard/src/components/brain/MethodologyLink.tsx, cloud/dashboard/src/components/brain/PlanBadge.tsx, cloud/dashboard/src/components/brain/PrivacyPosturePanel.tsx
Deletion of all brain analytics visualization components including KPI displays, graduation tracking, correction decay curves, active rules panels, categories charts, and demo data management UI.
Dashboard Layout & Shared Components
cloud/dashboard/src/components/layout/AuthLegalLinks.tsx, cloud/dashboard/src/components/layout/DashboardLayout.tsx, cloud/dashboard/src/components/layout/GlassCard.tsx, cloud/dashboard/src/components/layout/NoiseOverlay.tsx, cloud/dashboard/src/components/shared/EmptyState.tsx, cloud/dashboard/src/components/shared/ErrorState.tsx, cloud/dashboard/src/components/shared/LoadingSpinner.tsx, cloud/dashboard/src/components/team/TeamLeaderboard.tsx, cloud/dashboard/src/components/operator/CustomerRow.tsx, cloud/dashboard/src/components/providers/AuthProvider.tsx
Removal of layout containers, reusable UI components (cards, spinners, empty/error states), authentication provider, and team/operator dashboard components.
Dashboard UI Component Library
cloud/dashboard/src/components/ui/avatar.tsx, cloud/dashboard/src/components/ui/badge.tsx, cloud/dashboard/src/components/ui/button.tsx, cloud/dashboard/src/components/ui/card.tsx, cloud/dashboard/src/components/ui/dialog.tsx, cloud/dashboard/src/components/ui/dropdown-menu.tsx, cloud/dashboard/src/components/ui/input.tsx, cloud/dashboard/src/components/ui/label.tsx, cloud/dashboard/src/components/ui/select.tsx, cloud/dashboard/src/components/ui/separator.tsx, cloud/dashboard/src/components/ui/table.tsx, cloud/dashboard/src/components/ui/tabs.tsx, cloud/dashboard/src/components/ui/tooltip.tsx
Complete removal of Base UI primitive component library and styling definitions (buttons, inputs, dialogs, dropdowns, tables, tabs, tooltips, badges, etc.).
Dashboard Hooks & Utilities
cloud/dashboard/src/hooks/useApi.ts, cloud/dashboard/src/hooks/useAuth.ts, cloud/dashboard/src/lib/api.ts, cloud/dashboard/src/lib/supabase.ts, cloud/dashboard/src/lib/auth-errors.ts, cloud/dashboard/src/lib/errors.ts, cloud/dashboard/src/lib/analytics-client.ts, cloud/dashboard/src/lib/format.ts, cloud/dashboard/src/lib/operator.ts, cloud/dashboard/src/lib/team.ts, cloud/dashboard/src/lib/utils.ts
Deletion of client-side hooks (API fetching, authentication), Supabase/Axios client setup, error handling utilities, analytics computations, formatting helpers, and team/operator domain utilities.
Dashboard Types & Fixtures
cloud/dashboard/src/types/api.ts, cloud/dashboard/src/lib/fixtures/demo-dashboard.ts, cloud/dashboard/src/lib/fixtures/mock-activity.ts, cloud/dashboard/src/lib/fixtures/mock-meta-rules.ts, cloud/dashboard/src/lib/fixtures/mock-proof.ts, cloud/dashboard/src/lib/fixtures/mock-self-healing.ts
Removal of TypeScript API types (Brain, Lesson, Correction, BrainAnalytics, etc.) and all mock/demo data fixtures used for development and fallback UI rendering.
Dashboard Tests
cloud/dashboard/tests/..., cloud/dashboard/tests/*.test.tsx, cloud/dashboard/tests/*.test.ts, cloud/dashboard/tests/setup.ts
Deletion of all Vitest/React Testing Library test suites covering components (ActiveRulesPanel, ClearDemoButton, KpiStrip, PlanBadge, MetaRulesGrid, etc.), utilities (analytics-client, team, operator), and page integration tests.
Dashboard Build & Config
cloud/dashboard/next.config.ts, cloud/dashboard/tsconfig.json, cloud/dashboard/eslint.config.js, cloud/dashboard/vitest.config.ts, cloud/dashboard/postcss.config.mjs, cloud/dashboard/components.json, cloud/dashboard/package.json, cloud/dashboard/wrangler.toml, cloud/dashboard/.gitignore, cloud/dashboard/.nvmrc, cloud/dashboard/.env.example
Removal of all build system configuration, TypeScript/ESLint/Vitest setup, PostCSS/Tailwind configuration, package manifest, and environment variable templates.
Dashboard Documentation
cloud/dashboard/README.md, cloud/dashboard/CLOUDFLARE-PAGES.md, cloud/dashboard/SOURCE-MAPS.md
Deletion of dashboard setup guides and deployment documentation (Vite setup, Cloudflare Pages deployment, Sentry source maps upload).
GitHub Workflows
.github/workflows/dashboard-source-maps.yml, .github/workflows/loadtest-nightly.yml
Removal of CI/CD workflows for automatic dashboard source map uploads to Sentry and scheduled nightly load testing.
Backend Documentation
cloud/OPS.md, cloud/RAILWAY-ENV.md, cloud/RUNBOOK-INCIDENT.md, cloud/SENTRY-SETUP.md, cloud/SUPABASE-SETUP.md, cloud/.env.example
Deletion of operational runbooks, incident response procedures, environment variable documentation, Sentry integration guide, and Supabase setup instructions.
Email Templates & Supabase
cloud/supabase/email-templates/README.md, cloud/supabase/email-templates/*.html
Removal of Supabase email template documentation and all HTML email templates (confirmation, password reset, magic links, invites, reauthentication).
Load Testing
cloud/loadtest/README.md, cloud/loadtest/k6/baseline.js, cloud/loadtest/k6/spike.js, cloud/loadtest/k6/authed-read.js, cloud/loadtest/k6/sync-write.js
Deletion of k6 load testing suite including baseline health checks, spike testing, authenticated read workloads, and API sync write testing scripts with documentation.
Infrastructure & Data
cloud/infra/cf_worker_api_proxy.js, cloud/data/proof_results.json, cloud/railway.toml
Removal of Cloudflare Worker API proxy configuration, proof/validation results data, and Railway deployment configuration.
Backend Tests
cloud/tests/..., cloud/tests/*.py, cloud/tests/conftest.py
Deletion of all pytest test suites and fixtures covering authentication, billing, brains, database guards, and migrations.
Proof Export Scripts
cloud/scripts/export_ab_proof.py
Removal of A/B testing proof aggregation script that computed statistical results from judgment files.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/split-cloud-to-private-repo

Gradata added a commit that referenced this pull request Apr 15, 2026
The return type was list[tuple[object, float]] which made pyright reject
attribute access on the unpacked rule (r.state, r.confidence, etc).
Switch to the actual Lesson type (or Any if Lesson import is awkward).

Unblocks PR #76 (cloud-split) which inherits this CI failure.

Signed-off-by: Oliver Le <oliver@gradata.ai>
Gradata added a commit that referenced this pull request Apr 15, 2026
- Move Lesson import into TYPE_CHECKING block (ruff TC001)
- Cast scope-applies expression to bool to satisfy pyright reportReturnType
- rule_context fix is pre-existing on main, blocking the same CI as PR #76

Signed-off-by: Oliver Le <oliver@gradata.ai>
Gradata added a commit that referenced this pull request Apr 15, 2026
* fix(types): annotate rank_rules_for_draft to satisfy pyright

The return type was list[tuple[object, float]] which made pyright reject
attribute access on the unpacked rule (r.state, r.confidence, etc).
Switch to the actual Lesson type (or Any if Lesson import is awkward).

Unblocks PR #76 (cloud-split) which inherits this CI failure.

Signed-off-by: Oliver Le <oliver@gradata.ai>

* fix(types): TYPE_CHECKING for Lesson + bool-narrow rule_context return

- Move Lesson import into TYPE_CHECKING block (ruff TC001)
- Cast scope-applies expression to bool to satisfy pyright reportReturnType
- rule_context fix is pre-existing on main, blocking the same CI as PR #76

Signed-off-by: Oliver Le <oliver@gradata.ai>

* fix(types): group TYPE_CHECKING with stdlib imports (ruff I001)

Signed-off-by: Oliver Le <oliver@gradata.ai>

* refactor(rule_context): drop redundant bool() wrapper per CR

startswith() already returns bool; the 'and applies' short-circuit is also
redundant since startswith() on empty string is False for any non-empty pattern.

Signed-off-by: Oliver Le <oliver@gradata.ai>

---------

Signed-off-by: Oliver Le <oliver@gradata.ai>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 15, 2026

Copy link
Copy Markdown

Deploying gradata-dashboard with  Cloudflare Pages  Cloudflare Pages

Latest commit: c27834d
Status:🚫  Build failed.

View logs

@Gradata Gradata merged commit a0070ac into main Apr 15, 2026
10 of 11 checks passed
@Gradata Gradata deleted the chore/split-cloud-to-private-repo branch April 15, 2026 10:08
Gradata added a commit that referenced this pull request Apr 15, 2026
…ebase onto main

Rewrite TestSelfHealingE2E::test_inline_auto_heal_emits_rule_patched and
TestCorrectAutoHealIntegration::test_auto_heal_emits_patch_when_retroactive_test_passes
to exercise ONLY the inline `brain.correct(auto_heal=True)` path. Remove
the manual `review_rule_failures()` + `brain.patch_rule()` fallback so a
regression in the inline orchestration fails the test instead of being
masked by the fallback emitting RULE_PATCHED on its own.

Also address three smaller CR items:
- `_core.py`: forward `auto_heal` through the cloud branch by falling
  back to the local pipeline when the flag is set (cloud client does
  not yet carry the flag), so `auto_heal=True` is no longer silently
  dropped in cloud-connected brains.
- `_core.py`: route the auto-heal notice through `_log.warning` instead
  of `print(..., file=sys.stderr)` to keep the SDK logging pipeline
  consistent.
- `brain.py`: invalidate `_rule_cache` after `Brain.auto_heal()` applies
  patches, so later `apply_brain_rules()` calls see the patched prompt.

Rebased onto origin/main (includes #76 cloud split, #80 distribution,
#81 rule-to-hook auto-promotion). Rebase was conflict-free -- zero file
overlap between this branch and the three landed PRs.

Co-Authored-By: Gradata <noreply@gradata.ai>
Gradata added a commit that referenced this pull request Apr 15, 2026
…() (Phase 1) (#77)

* feat(self-healing): close the auto-heal loop

brain.auto_heal() reads recent RULE_FAILURE events, runs
review_rule_failures, gates each candidate through retroactive_test,
and applies the survivors via brain.patch_rule. Batches are
deduped by (category, original_description) and hard-capped at
max_patches (default 5) so a single session can't rewrite a rule
multiple times.

Before this commit, PR #21 emitted RULE_FAILURE but nothing
consumed it. The full flow required the caller to manually call
review_rule_failures + brain.patch_rule as the E2E test does.

Adds auto_heal_failures(brain, ...) orchestrator in self_healing.py
and Brain.auto_heal public method that delegates to it. 6 new
tests covering empty input, passing candidate, retro-test failure,
in-batch dedup, max_patches cap, and event-log read when no
events are passed.

* feat(self-healing): wire auto_heal into brain.correct() by default

When brain.correct() detects a RULE_FAILURE it now invokes
auto_heal_failures inline, capped at one patch per call so a
single correction can rewrite at most the rule it just failed.
Skipped in dry_run, approval_required, and renter modes; opt-out
via correct(auto_heal=False).

Adds auto_heal kwarg to brain.correct + brain_correct in _core.py
and surfaces the heal summary on event["auto_healed"] when a
patch lands. 3 new tests covering the default-on path, the
opt-out path, and the dry_run skip.

Closes the diagnose-then-do-nothing gap that PR #21 left open.

* fix(self-healing): default auto_heal=False per council; add PatchReceipt for visibility

Polyclaude council verdict (4/4 FALSE) on Phase 1: default auto_heal=True
is too hot. Ship False default plus a visible PatchReceipt so any auto-heal
that does fire is loud, not silent. Flip to True deferred until (a) a
pending_patches review queue and (b) ablation showing rule-quality lift on
a held-out broken-rule corpus.

- brain.correct() and _core.brain_correct() default auto_heal to False
- auto_heal_failures() returns PatchReceipt dicts: rule_id, old/new
  confidence, patch_diff, revert_command (legacy fields kept for BC)
- _core emits one stderr line per successful auto-heal patch so silent
  rule edits cannot sneak through
- tests: opt-in explicit auto_heal=True on existing integration tests,
  plus new test_default_off_no_patch and test_patch_receipt_shape

Co-Authored-By: Gradata <noreply@gradata.ai>

* fix(self-healing): address CodeRabbit review on #77 (docstring + type ann + test fixture)

- Document auto_heal parameter on Brain.correct (defaults to False post-council)
- Add forward-ref Brain type annotation on auto_heal_failures via TYPE_CHECKING
- Hoist brain_with_rule to module-scope fixture and remove 5 duplicated class-level copies
- Split weak test_auto_heal_triggers_on_rule_failure into two deterministic tests: one asserts rule_failure_detected only, the second drives auto_heal_failures with known-good delta words and asserts patched==1 plus auto_heal: reason prefix

Co-Authored-By: Gradata <noreply@gradata.ai>

* fix(self-healing): address CodeRabbit on inline auto-heal coverage; rebase onto main

Rewrite TestSelfHealingE2E::test_inline_auto_heal_emits_rule_patched and
TestCorrectAutoHealIntegration::test_auto_heal_emits_patch_when_retroactive_test_passes
to exercise ONLY the inline `brain.correct(auto_heal=True)` path. Remove
the manual `review_rule_failures()` + `brain.patch_rule()` fallback so a
regression in the inline orchestration fails the test instead of being
masked by the fallback emitting RULE_PATCHED on its own.

Also address three smaller CR items:
- `_core.py`: forward `auto_heal` through the cloud branch by falling
  back to the local pipeline when the flag is set (cloud client does
  not yet carry the flag), so `auto_heal=True` is no longer silently
  dropped in cloud-connected brains.
- `_core.py`: route the auto-heal notice through `_log.warning` instead
  of `print(..., file=sys.stderr)` to keep the SDK logging pipeline
  consistent.
- `brain.py`: invalidate `_rule_cache` after `Brain.auto_heal()` applies
  patches, so later `apply_brain_rules()` calls see the patched prompt.

Rebased onto origin/main (includes #76 cloud split, #80 distribution,
#81 rule-to-hook auto-promotion). Rebase was conflict-free -- zero file
overlap between this branch and the three landed PRs.

Co-Authored-By: Gradata <noreply@gradata.ai>

* fix(self-healing): use contextlib.suppress for cache invalidation (Ruff SIM105)

CodeRabbit's 3rd review on PR #77 + CI Ruff job both flagged the
try/except/pass block at brain.py:548-552 as SIM105 violation. Replaced
with contextlib.suppress(Exception) (contextlib already imported at
line 51). Behavior unchanged.

Co-Authored-By: Gradata <noreply@gradata.ai>

---------

Co-authored-by: Gradata <noreply@gradata.ai>
Gradata added a commit that referenced this pull request Apr 15, 2026
Both dirs were removed from the repo when cloud/ + marketing/ moved to
private Gradata/gradata-cloud (#76), but the files remain on local
checkouts. Gitignoring stops the churn in git status.

Co-Authored-By: Gradata <noreply@gradata.ai>
Gradata added a commit that referenced this pull request Apr 15, 2026
Both dirs were removed from the repo when cloud/ + marketing/ moved to
private Gradata/gradata-cloud (#76), but the files remain on local
checkouts. Gitignoring stops the churn in git status.

Co-authored-by: Gradata <noreply@gradata.ai>
Gradata added a commit that referenced this pull request Apr 15, 2026
(c) Wire dormant emitter
------------------------
SessionHistory in integrations/session_history.py subscribes to
`rules.injected` but nothing in the codebase ever emits it — grep of
the whole tree shows only the subscriber. That leaves its per-session
rule effectiveness tracking (compute_effectiveness / on_session_ended)
silently dead.

brain.apply_brain_rules() now fires the event on the in-memory bus
after format_rules_for_prompt(applied). Cache hits skip the emit
intentionally: SessionHistory dedups via a set, the cache is per
scope, and every fresh scope hits the compute path.

The other two events SessionHistory subscribes to (correction.created,
session.ended) already have emitters — checked at _core.py:138, 574,
854. So this is the one missing wire.

Regression test: test_apply_brain_rules_emits_rules_injected — seeds
a graduated TONE rule through a real correct() loop, subscribes a
SessionHistory to the brain's bus, calls apply_brain_rules, asserts
the injected set is populated.

(b) Gitignore on-disk orphans
-----------------------------
Three untracked leftovers from the S105 repo splits keep showing up
in `git status` and sometimes get accidentally re-added:

  - /cloud/           moved to private Gradata/gradata-cloud (#76)
  - /sdk/             superseded by the flattened layout (#65)
  - /railway.toml     now lives in gradata-cloud/cloud/railway.toml

Also added apollo-leads-*.csv since sales exports have leaked into
the repo root before and belong in brain/leads/, not the SDK tree.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Gradata added a commit that referenced this pull request Apr 15, 2026
(c) Wire dormant emitter
------------------------
SessionHistory in integrations/session_history.py subscribes to
`rules.injected` but nothing in the codebase ever emits it — grep of
the whole tree shows only the subscriber. That leaves its per-session
rule effectiveness tracking (compute_effectiveness / on_session_ended)
silently dead.

brain.apply_brain_rules() now fires the event on the in-memory bus
after format_rules_for_prompt(applied). Cache hits skip the emit
intentionally: SessionHistory dedups via a set, the cache is per
scope, and every fresh scope hits the compute path.

The other two events SessionHistory subscribes to (correction.created,
session.ended) already have emitters — checked at _core.py:138, 574,
854. So this is the one missing wire.

Regression test: test_apply_brain_rules_emits_rules_injected — seeds
a graduated TONE rule through a real correct() loop, subscribes a
SessionHistory to the brain's bus, calls apply_brain_rules, asserts
the injected set is populated.

(b) Gitignore on-disk orphans
-----------------------------
Three untracked leftovers from the S105 repo splits keep showing up
in `git status` and sometimes get accidentally re-added:

  - /cloud/           moved to private Gradata/gradata-cloud (#76)
  - /sdk/             superseded by the flattened layout (#65)
  - /railway.toml     now lives in gradata-cloud/cloud/railway.toml

Also added apollo-leads-*.csv since sales exports have leaked into
the repo root before and belong in brain/leads/, not the SDK tree.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant