mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
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:
@@ -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'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's workspace at hand-off to QA.
|
||||
</p>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user