285666290f
## What - Runs `apps/webapp/scripts/runOpsLegacyGuard.ts --check` as its own PR job (`runops-guard`), so code that reaches a run-graph table through the control-plane Prisma client instead of the RunStore fails the build. - Adds a `trigger-runops` oxlint plugin with two fast, in-editor rules scoped to `apps/webapp/app`: one for direct `prisma.taskRun`-style access, one for a control-plane client wired into a read-through slot. These are the cheap fence; the guard is the type-aware gate. - Fixes `CancelTaskRunService.callV1`: historical V1 runs are legacy-resident, so its two finalize writes now go through `runOpsLegacyPrisma` instead of the control-plane client (they'd miss the row once legacy is a separate database). - Regenerates the guard baseline, which had drifted stale (it referenced files deleted in an earlier PR). ## Why The guard existed but ran nowhere, so its baseline rotted and a real residency gap (the V1 cancel writes) sat undetected. Wiring it into CI turns it into a ratchet against new control-plane run-graph access. ## Verification Local, against a clean regen: `oxfmt --check`, `oxlint .`, `guard --check`, and `typecheck --filter webapp` all pass. Remaining baseline entries are 4 batch-results router reads through type-opaque `as PrismaReplicaClient` casts (correct at runtime, accepted) + 2 sanctioned legacy annotations.
58 lines
1.7 KiB
JSON
58 lines
1.7 KiB
JSON
{
|
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
"plugins": ["typescript", "import", "react"],
|
|
"jsPlugins": [
|
|
"./oxlint-plugins/no-thrown-unawaited-redirect.mjs",
|
|
"./oxlint-plugins/runops-residency.mjs"
|
|
],
|
|
"ignorePatterns": [
|
|
"**/dist/**",
|
|
"**/build/**",
|
|
"**/*.d.ts",
|
|
"**/seed.js",
|
|
"**/seedCloud.ts",
|
|
"**/populate.js",
|
|
"internal-packages/tsql/src/grammar/"
|
|
],
|
|
"rules": {
|
|
"no-unused-vars": [
|
|
"error",
|
|
{
|
|
"args": "none",
|
|
"argsIgnorePattern": "^_",
|
|
"varsIgnorePattern": "^_",
|
|
"caughtErrors": "all",
|
|
"caughtErrorsIgnorePattern": "^_",
|
|
"destructuredArrayIgnorePattern": "^_",
|
|
"ignoreRestSiblings": true
|
|
}
|
|
],
|
|
"no-empty-pattern": "off",
|
|
"no-control-regex": "off",
|
|
"typescript/no-non-null-asserted-optional-chain": "off",
|
|
"no-unused-expressions": ["warn", { "allowShortCircuit": true, "allowTernary": true }],
|
|
"typescript/consistent-type-imports": "error",
|
|
"import/no-duplicates": "error",
|
|
"import/namespace": "off",
|
|
"react-hooks/exhaustive-deps": "off",
|
|
"react-hooks/rules-of-hooks": "off",
|
|
"trigger/no-thrown-unawaited-redirect": "error"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["apps/webapp/app/**/*.ts", "apps/webapp/app/**/*.tsx"],
|
|
"rules": {
|
|
"trigger-runops/no-control-plane-run-graph-access": "error",
|
|
"trigger-runops/no-control-plane-in-runops-slot": "error"
|
|
}
|
|
},
|
|
{
|
|
"files": ["apps/webapp/app/**/*.test.ts", "apps/webapp/app/**/*.test.tsx"],
|
|
"rules": {
|
|
"trigger-runops/no-control-plane-run-graph-access": "off",
|
|
"trigger-runops/no-control-plane-in-runops-slot": "off"
|
|
}
|
|
}
|
|
]
|
|
}
|