pierre-review 0.1.51 → 0.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ -- CI status transition history (additive). Append-only log of a PR head's CI-state
2
+ -- transitions, recorded during sync when the CI rollup / failing-check set / head SHA
3
+ -- changes. Powers real CI failure-resolution time + failure-reason-by-stage metrics
4
+ -- (the current pull_requests.ci_status is only a snapshot; check_runs is lean-gated).
5
+ -- The Postgres baseline is regenerated separately via `pnpm db:generate:pg`.
6
+ CREATE TABLE `ci_status_events` (
7
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
8
+ `account_id` integer NOT NULL,
9
+ `repo_id` integer NOT NULL,
10
+ `pr_id` integer NOT NULL,
11
+ `head_sha` text NOT NULL,
12
+ `status` text NOT NULL,
13
+ `failing_checks` text,
14
+ `observed_at` integer NOT NULL,
15
+ FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON UPDATE no action ON DELETE no action,
16
+ FOREIGN KEY (`repo_id`) REFERENCES `repos`(`id`) ON UPDATE no action ON DELETE no action,
17
+ FOREIGN KEY (`pr_id`) REFERENCES `pull_requests`(`id`) ON UPDATE no action ON DELETE no action
18
+ );
19
+ --> statement-breakpoint
20
+ CREATE INDEX `cse_account_pr_observed` ON `ci_status_events` (`account_id`,`pr_id`,`observed_at`);--> statement-breakpoint
21
+ CREATE INDEX `cse_account_repo_observed` ON `ci_status_events` (`account_id`,`repo_id`,`observed_at`);
@@ -155,6 +155,13 @@
155
155
  "when": 1780800000012,
156
156
  "tag": "0021_account_feed_last_seen",
157
157
  "breakpoints": true
158
+ },
159
+ {
160
+ "idx": 22,
161
+ "version": "6",
162
+ "when": 1780800000013,
163
+ "tag": "0022_ci_status_events",
164
+ "breakpoints": true
158
165
  }
159
166
  ]
160
- }
167
+ }
@@ -0,0 +1,16 @@
1
+ CREATE TABLE "ci_status_events" (
2
+ "id" serial PRIMARY KEY NOT NULL,
3
+ "account_id" integer NOT NULL,
4
+ "repo_id" integer NOT NULL,
5
+ "pr_id" integer NOT NULL,
6
+ "head_sha" text NOT NULL,
7
+ "status" text NOT NULL,
8
+ "failing_checks" jsonb,
9
+ "observed_at" timestamp with time zone NOT NULL
10
+ );
11
+ --> statement-breakpoint
12
+ ALTER TABLE "ci_status_events" ADD CONSTRAINT "ci_status_events_account_id_accounts_id_fk" FOREIGN KEY ("account_id") REFERENCES "public"."accounts"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
13
+ ALTER TABLE "ci_status_events" ADD CONSTRAINT "ci_status_events_repo_id_repos_id_fk" FOREIGN KEY ("repo_id") REFERENCES "public"."repos"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
14
+ ALTER TABLE "ci_status_events" ADD CONSTRAINT "ci_status_events_pr_id_pull_requests_id_fk" FOREIGN KEY ("pr_id") REFERENCES "public"."pull_requests"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
15
+ CREATE INDEX "cse_account_pr_observed" ON "ci_status_events" USING btree ("account_id","pr_id","observed_at");--> statement-breakpoint
16
+ CREATE INDEX "cse_account_repo_observed" ON "ci_status_events" USING btree ("account_id","repo_id","observed_at");