Commitb271465unknown_key
fix: resolve all TypeScript compilation errors across feature branch
fix: resolve all TypeScript compilation errors across feature branch - autopilot.ts: close missing catch block and properly separate dep-update-sweep and smart-digest task objects (stray conflict marker removal artifact) - pulls.tsx: add missing )} closing the requestedReviewerRows conditional - schema.ts: restore userId column on incidentHookConfigs (lost during merge) - ai-commit-message, ai-completion, ai-completion, claude-semantic-search, dev-env, pr-risk, pr-sandbox: add MODEL_SONNET to imports where used without being imported (all AI calls must use claude-sonnet-4-6 per policy) - actions-importer.tsx: lowercase form method attribute (POST→post) - ai-editor.ts: fix checkQuota Map type from number to string (UUID user IDs) https://claude.ai/code/session_01DzJMTFASjMHt2f5ze4cNLR
11 files changed+29−22b271465c45137ec066df0c50b534b685bb8b8694
11 changed files+29−22
Modifiedsrc/db/schema.ts+12−16View fileUnifiedSplit
@@ -4359,18 +4359,6 @@ export const scimTokens = pgTable("scim_tokens", {
43594359 */
43604360export const orgSsoSessions = pgTable(
43614361 "org_sso_sessions",
4362
4363// Migration 0077 — Incident hook configs
4364// Maps a monitoring provider (PagerDuty / Datadog / Opsgenie / generic) to a
4365// specific repo. Inbound webhooks are validated against secret_hash (SHA-256
4366// of the user-chosen webhook secret passed in the ?secret= query param).
4367// ---------------------------------------------------------------------------
4368export const incidentHookConfigs = pgTable(
4369 "incident_hook_configs",
4370>>>>>>> 9953332 (feat: production incident auto-fix — PagerDuty/Datadog webhook → AI-generated fix PR)
4371
4372
4373>>>>>>> 3a845e4 (feat: enterprise SSO (SAML 2.0 + OIDC) and SCIM user provisioning)
43744362 {
43754363 id: uuid("id").primaryKey().defaultRandom(),
43764364 userId: uuid("user_id")
@@ -4394,6 +4382,18 @@ export type NewOrgSsoConfig = typeof orgSsoConfigs.$inferInsert;
43944382export type ScimToken = typeof scimTokens.$inferSelect;
43954383export type OrgSsoSession = typeof orgSsoSessions.$inferSelect;
43964384
4385// Migration 0077 — Incident hook configs
4386// Maps a monitoring provider (PagerDuty / Datadog / Opsgenie / generic) to a
4387// specific repo. Inbound webhooks are validated against secret_hash (SHA-256
4388// of the user-chosen webhook secret passed in the ?secret= query param).
4389// ---------------------------------------------------------------------------
4390export const incidentHookConfigs = pgTable(
4391 "incident_hook_configs",
4392 {
4393 id: uuid("id").primaryKey().defaultRandom(),
4394 userId: uuid("user_id")
4395 .notNull()
4396 .references(() => users.id, { onDelete: "cascade" }),
43974397 repoId: uuid("repo_id")
43984398 .notNull()
43994399 .references(() => repositories.id, { onDelete: "cascade" }),
@@ -4408,16 +4408,13 @@ export type OrgSsoSession = typeof orgSsoSessions.$inferSelect;
44084408 table.repoId,
44094409 table.provider
44104410 ),
4411 index("incident_hook_configs_user").on(table.userId),
44124411 ]
44134412);
44144413
44154414export type IncidentHookConfig = typeof incidentHookConfigs.$inferSelect;
44164415export type NewIncidentHookConfig = typeof incidentHookConfigs.$inferInsert;
4417>>>>>>> 9953332 (feat: production incident auto-fix — PagerDuty/Datadog webhook → AI-generated fix PR)
44184416
44194417
4420>>>>>>> 3a845e4 (feat: enterprise SSO (SAML 2.0 + OIDC) and SCIM user provisioning)
44214418
44224419/**
44234420 * Cloud deploy configurations — per-repo settings for push-triggered deploys
@@ -4480,7 +4477,6 @@ export type CloudDeployConfig = typeof cloudDeployConfigs.$inferSelect;
44804477export type NewCloudDeployConfig = typeof cloudDeployConfigs.$inferInsert;
44814478export type CloudDeployment = typeof cloudDeployments.$inferSelect;
44824479export type NewCloudDeployment = typeof cloudDeployments.$inferInsert;
4483>>>>>>> b11ffa9 (feat: multi-cloud deploy integration — push to main deploys to Fly/Railway/Render/Vercel)
44844480// ---------------------------------------------------------------------------
44854481// Recurring pattern detection (migration 0088)
44864482// ---------------------------------------------------------------------------
Modifiedsrc/lib/ai-commit-message.ts+1−0View fileUnifiedSplit
@@ -21,6 +21,7 @@
2121import {
2222 getAnthropic,
2323 MODEL_HAIKU,
24 MODEL_SONNET,
2425 extractText,
2526 parseJsonResponse,
2627 isAiAvailable,
Modifiedsrc/lib/ai-completion.ts+1−0View fileUnifiedSplit
@@ -22,6 +22,7 @@
2222import {
2323 getAnthropic,
2424 MODEL_HAIKU,
25 MODEL_SONNET,
2526 extractText,
2627 isAiAvailable,
2728} from "./ai-client";
Modifiedsrc/lib/autopilot.ts+4−0View fileUnifiedSplit
@@ -702,6 +702,10 @@ export function defaultTasks(): AutopilotTask[] {
702702 );
703703 } catch (err) {
704704 console.error("[autopilot] dep-update-sweep: threw:", err);
705 }
706 },
707 },
708 {
705709 // Smart morning digest — AI-curated daily developer queue.
706710 // Fires once per day at 07:00 UTC (or whenever the 22h outer gate
707711 // next opens after 07:00). Per-user 20h cooldown in sendSmartDigest
Modifiedsrc/lib/claude-semantic-search.ts+1−1View fileUnifiedSplit
@@ -23,7 +23,7 @@
2323 * Fallback: if ANTHROPIC_API_KEY is not set, falls back to `git grep`.
2424 */
2525
26import { getAnthropic, MODEL_HAIKU, parseJsonResponse } from "./ai-client";
26import { getAnthropic, MODEL_HAIKU, MODEL_SONNET, parseJsonResponse } from "./ai-client";
2727import { config } from "./config";
2828import { getRepoPath } from "../git/repository";
2929
Modifiedsrc/lib/dev-env.ts+1−0View fileUnifiedSplit
@@ -44,6 +44,7 @@ import {
4444 getAnthropic,
4545 isAiAvailable,
4646 MODEL_HAIKU,
47 MODEL_SONNET,
4748 extractText,
4849} from "./ai-client";
4950
Modifiedsrc/lib/pr-risk.ts+1−0View fileUnifiedSplit
@@ -41,6 +41,7 @@ import {
4141 getAnthropic,
4242 isAiAvailable,
4343 MODEL_HAIKU,
44 MODEL_SONNET,
4445 extractText,
4546} from "./ai-client";
4647import { ownersForPath, parseCodeowners, type OwnerRule } from "./codeowners";
Modifiedsrc/lib/pr-sandbox.ts+1−1View fileUnifiedSplit
@@ -36,7 +36,7 @@ import { prSandboxes, pullRequests, repositories, users } from "../db/schema";
3636import type { PrSandbox } from "../db/schema";
3737import { slugifyForUrl } from "./branch-previews";
3838import { getBlob } from "../git/repository";
39import { getAnthropic, isAiAvailable, MODEL_HAIKU, extractText } from "./ai-client";
39import { getAnthropic, isAiAvailable, MODEL_HAIKU, MODEL_SONNET, extractText } from "./ai-client";
4040
4141// ---------------------------------------------------------------------------
4242// Tunables
Modifiedsrc/routes/actions-importer.tsx+1−1View fileUnifiedSplit
@@ -1067,7 +1067,7 @@ function AutoImportNote() {
10671067function ImporterForm() {
10681068 return (
10691069 <div class="ai-form-card" id="converter-form">
1070 <form method="POST" action="/import/actions" enctype="multipart/form-data">
1070 <form method="post" action="/import/actions" enctype="multipart/form-data">
10711071 <label class="ai-form-label" for="yaml-input">
10721072 Paste your GitHub Actions workflow YAML
10731073 </label>
Modifiedsrc/routes/ai-editor.ts+2−2View fileUnifiedSplit
@@ -23,9 +23,9 @@ const aiEditor = new Hono<AuthEnv>();
2323const QUOTA_WINDOW_MS = 60 * 60 * 1_000; // 1 hour
2424const QUOTA_MAX = 30;
2525
26const suggestQuota = new Map<number, number[]>();
26const suggestQuota = new Map<string, number[]>();
2727
28function checkQuota(userId: number): { allowed: boolean; resetInMinutes: number } {
28function checkQuota(userId: string): { allowed: boolean; resetInMinutes: number } {
2929 const now = Date.now();
3030 const cutoff = now - QUOTA_WINDOW_MS;
3131 let timestamps = suggestQuota.get(userId) ?? [];
Modifiedsrc/routes/pulls.tsx+4−1View fileUnifiedSplit
@@ -1706,6 +1706,8 @@ const PRESENCE_STYLES = `
17061706 }
17071707 .presence-toast.fading { opacity: 0; }
17081708`;
1709
1710const IMPACT_STYLES = `
17091711 /* ─── Merge Impact Analysis panel (.impact-*) ─── */
17101712 .impact-panel {
17111713 margin-top: 20px;
@@ -4615,7 +4617,7 @@ pulls.get("/:owner/:repo/pulls/:number", softAuth, requireRepoAccess("read"), as
46154617 <script dangerouslySetInnerHTML={{ __html: ctrlEnterSubmitScript() + codeBlockCopyScript() }} />
46164618
46174619 {/* Presence styles + bar (shown only on the files tab so cursor pills work) */}
4618 <style dangerouslySetInnerHTML={{ __html: PRESENCE_STYLES }} />
4620 <style dangerouslySetInnerHTML={{ __html: PRESENCE_STYLES + IMPACT_STYLES }} />
46194621 {/* Toast container — always present for join/leave toasts */}
46204622 <div id="presence-toasts" class="presence-toast-wrap" aria-live="polite" />
46214623 {user && (
@@ -4960,6 +4962,7 @@ pulls.get("/:owner/:repo/pulls/:number", softAuth, requireRepoAccess("read"), as
49604962 );
49614963 })}
49624964 </div>
4965 )}
49634966 {/* ─── Merge Impact Analysis panel ─────────────────────── */}
49644967 {impactAnalysis && pr.state === "open" && (
49654968
49664969