Repository navigation
Conversation
…ness Add the filters, output policy, and version columns, the SeerWorkflowConfigProject table, and the agentic_triage_v2 strategy, with project and environment selection stored as JSON in the shape of SeerWorkflowFilters. Uniqueness on (organization, strategy) now covers only legacy strategies so an organization can hold many agentic_triage_v2 configs, and the new partial index is created before the old constraint is dropped. get_or_create_for_strategy accepts only legacy strategies. Refs AIML-3722
SeerAutomation wraps a SeerWorkflowConfig with the logic for interpreting it. ensure_defaults seeds a Sentry-managed agentic_triage_v2 automation for any organization that has no config with that strategy, never overwriting or re-seeding existing ones. get_project_ids returns the active projects a config covers. Refs AIML-3722
Refs AIML-3723
Contributor
|
This PR has a migration; here is the generated SQL for for --
-- Create model SeerWorkflowConfigProject
--
CREATE TABLE "seer_workflowconfigproject" ("id" bigint NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, "date_updated" timestamp with time zone NOT NULL, "date_added" timestamp with time zone NOT NULL, "config_id" bigint NOT NULL, "project_id" bigint NOT NULL);
--
-- Add field output_policy to seerworkflowconfig
--
ALTER TABLE "seer_workflowconfig" ADD COLUMN "output_policy" jsonb DEFAULT '{}'::jsonb NOT NULL;
--
-- Add field filters to seerworkflowconfig
--
ALTER TABLE "seer_workflowconfig" ADD COLUMN "filters" jsonb DEFAULT '{}'::jsonb NOT NULL;
--
-- Add field version to seerworkflowconfig
--
ALTER TABLE "seer_workflowconfig" ADD COLUMN "version" integer DEFAULT 1 NOT NULL CHECK ("version" >= 0);
--
-- Create constraint seer_workflowconfig_legacy_org_strategy_uniq on model seerworkflowconfig
--
CREATE UNIQUE INDEX CONCURRENTLY "seer_workflowconfig_legacy_org_strategy_uniq" ON "seer_workflowconfig" ("organization_id", "strategy") WHERE "strategy" IN ('agentic_triage', 'duplicate_monitors');
--
-- Remove constraint seer_workflowconfig_org_strategy_uniq from model seerworkflowconfig
--
ALTER TABLE "seer_workflowconfig" DROP CONSTRAINT "seer_workflowconfig_org_strategy_uniq";
--
-- Create constraint seer_workflowconfigproject_config_project_uniq on model seerworkflowconfigproject
--
CREATE UNIQUE INDEX CONCURRENTLY "seer_workflowconfigproject_config_project_uniq" ON "seer_workflowconfigproject" ("config_id", "project_id");
ALTER TABLE "seer_workflowconfigproject" ADD CONSTRAINT "seer_workflowconfigproject_config_project_uniq" UNIQUE USING INDEX "seer_workflowconfigproject_config_project_uniq";
ALTER TABLE "seer_workflowconfigproject" ADD CONSTRAINT "seer_workflowconfigp_config_id_70b352a2_fk_seer_work" FOREIGN KEY ("config_id") REFERENCES "seer_workflowconfig" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "seer_workflowconfigproject" VALIDATE CONSTRAINT "seer_workflowconfigp_config_id_70b352a2_fk_seer_work";
ALTER TABLE "seer_workflowconfigproject" ADD CONSTRAINT "seer_workflowconfigp_project_id_1e68f8e6_fk_sentry_pr" FOREIGN KEY ("project_id") REFERENCES "sentry_project" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "seer_workflowconfigproject" VALIDATE CONSTRAINT "seer_workflowconfigp_project_id_1e68f8e6_fk_sentry_pr";
CREATE INDEX CONCURRENTLY "seer_workflowconfigproject_config_id_70b352a2" ON "seer_workflowconfigproject" ("config_id");
CREATE INDEX CONCURRENTLY "seer_workflowconfigproject_project_id_1e68f8e6" ON "seer_workflowconfigproject" ("project_id");for --
-- Custom state/database change combination
--
-- (no-op)
--
-- Add field date_started to seerworkflowrun
--
ALTER TABLE "seer_nightshiftrun" ADD COLUMN "date_started" timestamp with time zone NULL;
--
-- Add field error to seerworkflowrun
--
ALTER TABLE "seer_nightshiftrun" ADD COLUMN "error" jsonb NULL;
--
-- Add field snapshot to seerworkflowrun
--
ALTER TABLE "seer_nightshiftrun" ADD COLUMN "snapshot" jsonb NULL;
--
-- Add field status to seerworkflowrun
--
ALTER TABLE "seer_nightshiftrun" ADD COLUMN "status" varchar(16) NULL;
--
-- Alter field workflow_config on seerworkflowrun
--
-- (no-op) |
Refs AIML-3723
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cc59de4. Configure here.
Reuse the schedule column and unique index as request_key. Cascade config deletion to runs and remove the extra history indexes. Refs AIML-3723
trevor-e
force-pushed
the
telkins/feat/seer-config-service
branch
from
October 20, 2026 17:37
dabc099 to
779db23
Compare
This branch has not been deployed
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.

Adds helpers that reuse a run for repeated requests, capture typed snapshots of its configuration and inputs, and record completion or failure. History queries are scoped to the organization, and deleting a config cascades to its runs and execution records.
Generalizes
schedule_idtorequest_key, preserving its database column, unique index and scheduled task arguments. One migration adds four nullable columns, with no new indexes or backfill. Stacked on #127892; connecting the helpers to the manual execution coordinator stays in AIML-3682.Refs AIML-3723.