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>