CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | CREATE TABLE IF NOT EXISTS "flywheel_telemetry" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"gate_run_id" uuid REFERENCES "gate_runs"("id") ON DELETE SET NULL,
"repository_id" uuid REFERENCES "repositories"("id") ON DELETE CASCADE,
"error_signature_hash" text NOT NULL,
"error_raw_text" text,
"model_route" text NOT NULL,
"attempts_count" integer NOT NULL DEFAULT 1,
"token_cost_cents" integer NOT NULL DEFAULT 0,
"execution_time_ms" integer NOT NULL DEFAULT 0,
"outcome" text NOT NULL,
"rework_rate_status" text NOT NULL DEFAULT 'untouched',
"created_at" timestamp DEFAULT now()
);
CREATE INDEX IF NOT EXISTS "idx_flywheel_telemetry_repo" ON "flywheel_telemetry" ("repository_id");
CREATE INDEX IF NOT EXISTS "idx_flywheel_telemetry_gate_run" ON "flywheel_telemetry" ("gate_run_id");
CREATE INDEX IF NOT EXISTS "idx_flywheel_telemetry_hash" ON "flywheel_telemetry" ("error_signature_hash");
|