What task verify actually runs
It aggregates three gates (see Taskfile.yml):
task typecheck— depends ontask codegen(which depends ontask openapi), then runspnpm run typecheck(tsc --noEmit). This means any Go API change is regenerated and typechecked here, so TS errors fromschema.tsdrift are caught at this step.task test:go—go test ./....task lint— runs both:lint:go:golangci-lint run ./...(config:.golangci.yml— govet+nilness, staticcheck, errcheck, ineffassign, unused, gofmt).lint:ts:pnpm exec biome lint(config:biome.json,schema.tsalready excluded).
task build does not subsume verify; it only runs build:go + codegen + typecheck + icons. Tests and lint still must pass through verify.
Workflow
- Run
task verify. - If it fails, read the first failure (later ones often cascade from it). Group fixes by phase:
- typecheck failures → almost always TS code calling an operation/type that no longer matches
schema.ts. Either the renderer code is stale, or the Go side changed without updating callers. Fix the renderer to match the regenerated types; do NOT hand-editschema.ts. - go test failures → fix the code or the test. Don't disable tests to make verify pass.
- golangci-lint failures → fix the cause; do not add
//nolintunless the rule is genuinely wrong for that line (rare). - biome failures → run
pnpm exec biome check --write electron/srconly if the user already accepts auto-fixes; otherwise fix by hand to keep the diff surgical.
- typecheck failures → almost always TS code calling an operation/type that no longer matches
- Re-run
task verifyuntil it is green. - Report the result. If verify still fails after reasonable attempts, surface the exact failure rather than claim success.
Hard rules
- Do not "clean up" unrelated lint warnings to make the diff look tidy. Surgical changes only — every edit must trace to the user's request or to a failure verify just reported.
- Do not add new lint rules or relax existing ones to dodge a failure. New rules go into
.golangci.yml/biome.jsonfirst, then the code is written to satisfy them. - Do not mark a task complete while verify is red. State the failure explicitly.
Common pitfalls
- TS errors after a Go change: you forgot the codegen chain.
task typecheckalready depends ontask codegenwhich depends ontask openapi, so runningtask verifyshould regenerate. If something feels stale, runtask openapi && task codegenmanually and inspectopenapi.yamlandelectron/src/api/schema.ts. relay-backend not found: tests/typecheck don't need the binary, but if you triedtask buildfirst and it errored beforebuild:go, the bin is missing. Runtask build:go.- Biome flags
schema.ts: it shouldn't —biome.jsonalready excludes it. If you see this, check whether someone copied generated content into another file.