feat(gateway): run the full fast gate (incl. complexity) at the dev's desk

Add a per-project `quality_command` (model + ORM + API + panel + migration 029)
that the pre-submit gate prefers over the lint/typecheck pair. Pointed at the new
`make gate` target (ruff format --check + ruff check + mypy + xenon, no tests),
i_am_done now catches lint, type AND complexity failures in the developer's
workspace before QA — closing the gap where over-complex code only failed in CI.
Falls back to lint+typecheck when unset; a no-op when no commands are configured.
This commit is contained in:
Renn F
2026-06-14 05:24:09 +02:00
parent 481c5fe17b
commit a8b387b5bb
12 changed files with 123 additions and 4 deletions
@@ -82,6 +82,7 @@ export function CreateProjectDialog() {
format_command: formData.format_command || undefined,
typecheck_command: formData.typecheck_command || undefined,
build_command: formData.build_command || undefined,
quality_command: formData.quality_command || undefined,
});
toast.success("Project created successfully");
setOpen(false);
@@ -271,6 +272,22 @@ export function CreateProjectDialog() {
placeholder="pnpm build"
/>
</div>
<div className="grid gap-2">
<Label htmlFor="quality_command">Quality Gate Command</Label>
<Input
id="quality_command"
value={formData.quality_command || ""}
onChange={(e) =>
setFormData({ ...formData, quality_command: e.target.value })
}
placeholder="make gate"
/>
<p className="text-xs text-muted-foreground">
Fast pre-submit gate (lint + types + complexity, no tests) run
in the dev&apos;s workspace at hand-off to QA.
</p>
</div>
</>
)}
</div>
@@ -61,6 +61,7 @@ function EditProjectForm({
const [formatCommand, setFormatCommand] = useState(project.format_command || "");
const [typecheckCommand, setTypecheckCommand] = useState(project.typecheck_command || "");
const [buildCommand, setBuildCommand] = useState(project.build_command || "");
const [qualityCommand, setQualityCommand] = useState(project.quality_command || "");
// Token handling
const [newToken, setNewToken] = useState("");
@@ -88,6 +89,7 @@ function EditProjectForm({
format_command: formatCommand || undefined,
typecheck_command: typecheckCommand || undefined,
build_command: buildCommand || undefined,
quality_command: qualityCommand || undefined,
};
// Handle token update
@@ -296,6 +298,20 @@ function EditProjectForm({
placeholder="pnpm build"
/>
</div>
<div className="grid gap-2">
<Label htmlFor="quality_command">Quality Gate Command</Label>
<Input
id="quality_command"
value={qualityCommand}
onChange={(e) => setQualityCommand(e.target.value)}
placeholder="make gate"
/>
<p className="text-xs text-muted-foreground">
Fast pre-submit gate (lint + types + complexity, no tests) run in
the dev&apos;s workspace at hand-off to QA.
</p>
</div>
</>
)}
</div>
+1
View File
@@ -83,6 +83,7 @@ export const projectsApi = {
format_command: project.format_command ?? null,
typecheck_command: project.typecheck_command ?? null,
build_command: project.build_command ?? null,
quality_command: project.quality_command ?? null,
workspace_path: null,
last_synced_at: null,
head_commit: null,
+3
View File
@@ -1108,6 +1108,7 @@ export interface Project {
format_command: string | null;
typecheck_command: string | null;
build_command: string | null;
quality_command: string | null;
// Runtime state
workspace_path: string | null;
last_synced_at: string | null;
@@ -1132,6 +1133,7 @@ export interface ProjectCreate {
format_command?: string;
typecheck_command?: string;
build_command?: string;
quality_command?: string;
}
export interface ProjectUpdate {
@@ -1148,6 +1150,7 @@ export interface ProjectUpdate {
format_command?: string;
typecheck_command?: string;
build_command?: string;
quality_command?: string;
}
export interface ProjectSummary {