Repository navigation
ci(lint): enable type-aware linting with no-floating-promises and no-misused-promises (#836) - #863
Merged
Merged
Conversation
…misused-promises tsc does not report a promise nobody awaits or an async callback handed to an API that ignores its result. In a CLI that is an error nobody sees. oxlint's --type-aware mode checks both through oxlint-tsgolint. - package.json: add oxlint-tsgolint 7.0.2003 (oxlint 1.85.0 needs >=7.0.2001) and pass --type-aware to `npm run lint`. The package ships prebuilt binaries as optional dependencies with no install script, so CI's `npm ci --ignore-scripts` needs no change. - .oxlintrc.json: turn on typescript/no-floating-promises and typescript/no-misused-promises. Under src/__tests__/**, no-misused-promises skips checksVoidReturn.arguments: vi.spyOn(fse, ...) types the spy from fs-extra's last overload, the callback one that returns void, so every correct async mockImplementation is flagged. - --type-aware also turns on oxlint's default type-aware rules. The ones with hits on main stay off, since each is its own evaluation under Tencent#836. The rest of the defaults have no hits and stay on. Fixes, all behavior-neutral: - dashboard.ts: the SSE debounce and the PID check become named async functions called with `void`; both already catch everything they throw. The HTTP handler becomes handleRequest, and createServer catches its rejection, logs it and answers 500. - import-repo-list.ts: track in-flight imports in a Set, so the unused array splice returned is gone. - scripts/mock-teamai-server.mjs: same handler wrapper as the dashboard, so a malformed JSON body answers 500 instead of an unhandled rejection. - ai-client.test.ts: schedule the mock process events with queueMicrotask. Refs Tencent#836.
1 prod hit, type-only: syncTeamUpdatesToLocal's last parameter was `placedRules: Record<string, string> | undefined = undefined`; it is now `placedRules?: Record<string, string>`. Refs Tencent#836.
10 of 11 tasks
consistent-return, no-unnecessary-boolean-literal-compare, no-unnecessary-type-arguments, no-unnecessary-type-assertion, no-unnecessary-type-conversion, no-unnecessary-type-parameters and no-unsafe-type-assertion are not default rules, so listing them as off changed nothing. The config keeps off only the nine default type-aware rules that --type-aware would turn on. `oxlint --type-aware --print-config` gives the same set of active rules before and after. Refs Tencent#836.
SaulMoro
force-pushed
the
ci/oxlint-type-aware
branch
from
September 27, 2026 23:07
0427a68 to
af29427
Compare
|
[P2 non-blocking] Narrow the test exemption — The PR description includes sufficient real-CLI verification for its runtime changes. |
jeff-r2026
approved these changes
Sep 29, 2026
STiFLeR7
added a commit
to STiFLeR7/teamai-cli
that referenced
this pull request
Oct 26, 2026
Enabling the suspicious/perf categories reaches the type-aware typescript/* rules in those categories too, not just the plain eslint/unicorn/oxc ones measured for Tencent#836. The real CI command (oxlint --type-aware --deny-warnings) surfaced ~3287 warnings from typescript/no-unsafe-type-assertion, no-unnecessary-type-assertion, no-unnecessary-type-conversion, consistent-return, no-unnecessary-boolean-literal-compare, no-unnecessary-template-expression, no-unnecessary-type-arguments, and no-unnecessary-type-parameters that my local verification missed because it ran oxlint without --type-aware. Type-aware linting beyond no-floating-promises/no-misused-promises is Tencent#863's separate, not-yet-merged scope. Turn those 8 rules off here, matching the existing pattern already used for the other out-of-scope typescript/* rules in this file. Verified with the actual CI command this time: `npm run lint` (oxlint --type-aware --deny-warnings --report-unused-disable-directives) is clean, and so is `npx tsc --noEmit` and `npm run build`.
STiFLeR7
added a commit
to STiFLeR7/teamai-cli
that referenced
this pull request
Oct 26, 2026
Enabling the suspicious/perf categories reaches the type-aware typescript/* rules in those categories too, not just the plain eslint/unicorn/oxc ones measured for Tencent#836. The real CI command (oxlint --type-aware --deny-warnings) surfaced ~3287 warnings from typescript/no-unsafe-type-assertion, no-unnecessary-type-assertion, no-unnecessary-type-conversion, consistent-return, no-unnecessary-boolean-literal-compare, no-unnecessary-template-expression, no-unnecessary-type-arguments, and no-unnecessary-type-parameters that my local verification missed because it ran oxlint without --type-aware. Type-aware linting beyond no-floating-promises/no-misused-promises is Tencent#863's separate, not-yet-merged scope. Turn those 8 rules off here, matching the existing pattern already used for the other out-of-scope typescript/* rules in this file. Verified with the actual CI command this time: `npm run lint` (oxlint --type-aware --deny-warnings --report-unused-disable-directives) is clean, and so is `npx tsc --noEmit` and `npm run build`.
STiFLeR7
added a commit
to STiFLeR7/teamai-cli
that referenced
this pull request
Oct 26, 2026
Enabling the suspicious/perf categories reaches the type-aware typescript/* rules in those categories too, not just the plain eslint/unicorn/oxc ones measured for Tencent#836. The real CI command (oxlint --type-aware --deny-warnings) surfaced ~3287 warnings from typescript/no-unsafe-type-assertion, no-unnecessary-type-assertion, no-unnecessary-type-conversion, consistent-return, no-unnecessary-boolean-literal-compare, no-unnecessary-template-expression, no-unnecessary-type-arguments, and no-unnecessary-type-parameters that my local verification missed because it ran oxlint without --type-aware. Type-aware linting beyond no-floating-promises/no-misused-promises is Tencent#863's separate, not-yet-merged scope. Turn those 8 rules off here, matching the existing pattern already used for the other out-of-scope typescript/* rules in this file. Verified with the actual CI command this time: `npm run lint` (oxlint --type-aware --deny-warnings --report-unused-disable-directives) is clean, and so is `npx tsc --noEmit` and `npm run build`.
jeff-r2026
pushed a commit
that referenced
this pull request
Oct 28, 2026
* ci(lint): enable oxlint suspicious and perf categories Turn on the suspicious and perf rule categories per the plan in #836, with an off list for the rules that don't find real bugs here: - no-await-in-loop: sequential awaits are deliberate in a CLI (git, prompts, ordered writes); the rule can't tell an intentional ordering dependency from a parallelizable loop. - unicorn/no-array-sort: every prod sort site sorts a local array built in the same function, so the in-place mutation warning doesn't apply. - unicorn/consistent-function-scoping: moves closures to outer scope; style, not a bug class. - no-underscore-dangle: conflicts with this repo's own `_` convention (`_setLogFilePath`, `_resetState`). - oxc/no-map-spread: micro-optimization, not worth the churn. no-shadow stays on: real shadowing bugs were found during triage (see next commit). Also bump the TS target to ES2023 so `Array#toReversed()` and `Array#findLast()` (used by the fixes in the next commit) type-check; Node 20+ already supports them at runtime, and ES2023 adds no new syntax, so this only changes what the compiler's lib typings expose. * fix(lint): clear the suspicious+perf warnings under the new gate Fixes every warning oxlint's suspicious and perf categories report with the off list from the previous commit applied, following each rule's own meaning rather than a blanket find-replace: - no-shadow: renamed the shadowing binding (never the outer one) at every site. Removed 8 redundant `await import('./utils/logger.js')` calls in index.ts; it already imports `log` at the top. Investigated the two shadows the issue specifically called out as real bugs (team-push.ts's destructured `dataHomeKey` hiding the imported function, dashboard-collector.ts's inner `events`/`stopAt` hiding the outer bindings): both are confined to their own block scope with no cross-use today, so the rename is the complete fix, not a logic change. - no-unmodified-loop-condition: checked all 4 current hits (the issue named 1; the codebase grew since it was filed). None is a real bug. Each loop's exit condition is flipped by something the rule can't see from inside the loop body: a setTimeout closure registered before the loop (process-stop.ts, recall-attribution.test.ts), a compound condition where the other operand changes (resources/env.ts), or a property mutation on an object the rule only tracks by reassignment (workflow-skill-transitions.test.ts). Suppressed each with a narrow inline comment explaining why. - preserve-caught-error: attached `{ cause }` to every rethrow, using the error actually caught by the nearest enclosing catch (two sites in local-agent.ts and one in resources/env.ts already attached the wrong, outer error to a throw inside a nested catch). - unicorn/no-array-reverse: switched to `Array#toReversed()` (dropping any defensive `[...arr]` copy it made redundant); none of these sites relied on the in-place mutation. - unicorn/prefer-array-find: `.filter(p)[0]` / `.filter(p).pop()` patterns became `.find(p)`; `.filter(p).at(-1)` / `.filter(p).pop()` where the last match (not the first) was wanted became `.findLast(p)` — using `.find()` there would have silently returned the wrong element. - unicorn/prefer-set-has: converted to `Set` + `.has()`, except workflow/workspace.ts's `rest.includes(...)`, which is a string substring check the rule mistook for array membership (false positive, suppressed inline). - no-useless-concat: merged adjacent string literals, except redact.test.ts's DSN fixtures, left alone (see inline comment) to not reassemble the exact secret-shaped literal its test author deliberately split to dodge a secret scanner. - no-useless-constructor, unicorn/require-module-specifiers, oxc/no-accumulating-spread: removed the dead constructors, the empty `export {}` placeholder (the file itself was then empty, so deleted it), and the accumulator spread in workflow/drivers/skill/ tick.ts. Verified: `npx tsc --noEmit`, `npx oxlint --type-aware --deny-warnings --report-unused-disable-directives` (the project's `npm run lint`), and `npx vitest run` (15137 passed / 899 failed / 191 skipped) all clean relative to main — the failures are pre-existing Windows environment flakiness (EPERM on temp-dir cleanup, 15s test timeouts under load), confirmed by running the same files against an unmodified main checkout and getting the same failures. `npm run build` succeeds and the built CLI runs end to end (`doctor`, `env --help`, `models --help`, `push --dry-run`) against a scratch HOME. * fix(lint): keep type-aware rules out of the suspicious/perf gate Enabling the suspicious/perf categories reaches the type-aware typescript/* rules in those categories too, not just the plain eslint/unicorn/oxc ones measured for #836. The real CI command (oxlint --type-aware --deny-warnings) surfaced ~3287 warnings from typescript/no-unsafe-type-assertion, no-unnecessary-type-assertion, no-unnecessary-type-conversion, consistent-return, no-unnecessary-boolean-literal-compare, no-unnecessary-template-expression, no-unnecessary-type-arguments, and no-unnecessary-type-parameters that my local verification missed because it ran oxlint without --type-aware. Type-aware linting beyond no-floating-promises/no-misused-promises is #863's separate, not-yet-merged scope. Turn those 8 rules off here, matching the existing pattern already used for the other out-of-scope typescript/* rules in this file. Verified with the actual CI command this time: `npm run lint` (oxlint --type-aware --deny-warnings --report-unused-disable-directives) is clean, and so is `npx tsc --noEmit` and `npm run build`. * fix(lint): clear no-array-reverse warnings from a rebase onto main Rebased onto upstream main (6 commits landed since this branch was cut, including #1346 which added these .reverse() calls). Same fix as the rest of this PR: switched to Array#toReversed(), since none of these sites reuse the original array reference after reversing it. * chore: retrigger CI (flaky run-lock timing test on Node 20/ubuntu) * fix(update): rename shadowing entry var missed from previous merge commit
Walternater
pushed a commit
to Walternater/teamai-cli
that referenced
this pull request
Nov 2, 2026
* ci(lint): enable oxlint suspicious and perf categories Turn on the suspicious and perf rule categories per the plan in Tencent#836, with an off list for the rules that don't find real bugs here: - no-await-in-loop: sequential awaits are deliberate in a CLI (git, prompts, ordered writes); the rule can't tell an intentional ordering dependency from a parallelizable loop. - unicorn/no-array-sort: every prod sort site sorts a local array built in the same function, so the in-place mutation warning doesn't apply. - unicorn/consistent-function-scoping: moves closures to outer scope; style, not a bug class. - no-underscore-dangle: conflicts with this repo's own `_` convention (`_setLogFilePath`, `_resetState`). - oxc/no-map-spread: micro-optimization, not worth the churn. no-shadow stays on: real shadowing bugs were found during triage (see next commit). Also bump the TS target to ES2023 so `Array#toReversed()` and `Array#findLast()` (used by the fixes in the next commit) type-check; Node 20+ already supports them at runtime, and ES2023 adds no new syntax, so this only changes what the compiler's lib typings expose. * fix(lint): clear the suspicious+perf warnings under the new gate Fixes every warning oxlint's suspicious and perf categories report with the off list from the previous commit applied, following each rule's own meaning rather than a blanket find-replace: - no-shadow: renamed the shadowing binding (never the outer one) at every site. Removed 8 redundant `await import('./utils/logger.js')` calls in index.ts; it already imports `log` at the top. Investigated the two shadows the issue specifically called out as real bugs (team-push.ts's destructured `dataHomeKey` hiding the imported function, dashboard-collector.ts's inner `events`/`stopAt` hiding the outer bindings): both are confined to their own block scope with no cross-use today, so the rename is the complete fix, not a logic change. - no-unmodified-loop-condition: checked all 4 current hits (the issue named 1; the codebase grew since it was filed). None is a real bug. Each loop's exit condition is flipped by something the rule can't see from inside the loop body: a setTimeout closure registered before the loop (process-stop.ts, recall-attribution.test.ts), a compound condition where the other operand changes (resources/env.ts), or a property mutation on an object the rule only tracks by reassignment (workflow-skill-transitions.test.ts). Suppressed each with a narrow inline comment explaining why. - preserve-caught-error: attached `{ cause }` to every rethrow, using the error actually caught by the nearest enclosing catch (two sites in local-agent.ts and one in resources/env.ts already attached the wrong, outer error to a throw inside a nested catch). - unicorn/no-array-reverse: switched to `Array#toReversed()` (dropping any defensive `[...arr]` copy it made redundant); none of these sites relied on the in-place mutation. - unicorn/prefer-array-find: `.filter(p)[0]` / `.filter(p).pop()` patterns became `.find(p)`; `.filter(p).at(-1)` / `.filter(p).pop()` where the last match (not the first) was wanted became `.findLast(p)` — using `.find()` there would have silently returned the wrong element. - unicorn/prefer-set-has: converted to `Set` + `.has()`, except workflow/workspace.ts's `rest.includes(...)`, which is a string substring check the rule mistook for array membership (false positive, suppressed inline). - no-useless-concat: merged adjacent string literals, except redact.test.ts's DSN fixtures, left alone (see inline comment) to not reassemble the exact secret-shaped literal its test author deliberately split to dodge a secret scanner. - no-useless-constructor, unicorn/require-module-specifiers, oxc/no-accumulating-spread: removed the dead constructors, the empty `export {}` placeholder (the file itself was then empty, so deleted it), and the accumulator spread in workflow/drivers/skill/ tick.ts. Verified: `npx tsc --noEmit`, `npx oxlint --type-aware --deny-warnings --report-unused-disable-directives` (the project's `npm run lint`), and `npx vitest run` (15137 passed / 899 failed / 191 skipped) all clean relative to main — the failures are pre-existing Windows environment flakiness (EPERM on temp-dir cleanup, 15s test timeouts under load), confirmed by running the same files against an unmodified main checkout and getting the same failures. `npm run build` succeeds and the built CLI runs end to end (`doctor`, `env --help`, `models --help`, `push --dry-run`) against a scratch HOME. * fix(lint): keep type-aware rules out of the suspicious/perf gate Enabling the suspicious/perf categories reaches the type-aware typescript/* rules in those categories too, not just the plain eslint/unicorn/oxc ones measured for Tencent#836. The real CI command (oxlint --type-aware --deny-warnings) surfaced ~3287 warnings from typescript/no-unsafe-type-assertion, no-unnecessary-type-assertion, no-unnecessary-type-conversion, consistent-return, no-unnecessary-boolean-literal-compare, no-unnecessary-template-expression, no-unnecessary-type-arguments, and no-unnecessary-type-parameters that my local verification missed because it ran oxlint without --type-aware. Type-aware linting beyond no-floating-promises/no-misused-promises is Tencent#863's separate, not-yet-merged scope. Turn those 8 rules off here, matching the existing pattern already used for the other out-of-scope typescript/* rules in this file. Verified with the actual CI command this time: `npm run lint` (oxlint --type-aware --deny-warnings --report-unused-disable-directives) is clean, and so is `npx tsc --noEmit` and `npm run build`. * fix(lint): clear no-array-reverse warnings from a rebase onto main Rebased onto upstream main (6 commits landed since this branch was cut, including Tencent#1346 which added these .reverse() calls). Same fix as the rest of this PR: switched to Array#toReversed(), since none of these sites reuse the original array reference after reversing it. * chore: retrigger CI (flaky run-lock timing test on Node 20/ubuntu) * fix(update): rename shadowing entry var missed from previous merge commit
Walternater
pushed a commit
to Walternater/teamai-cli
that referenced
this pull request
Nov 2, 2026
…misused-promises (Tencent#836) (Tencent#863) * ci(lint): enable type-aware linting with no-floating-promises and no-misused-promises tsc does not report a promise nobody awaits or an async callback handed to an API that ignores its result. In a CLI that is an error nobody sees. oxlint's --type-aware mode checks both through oxlint-tsgolint. - package.json: add oxlint-tsgolint 7.0.2003 (oxlint 1.85.0 needs >=7.0.2001) and pass --type-aware to `npm run lint`. The package ships prebuilt binaries as optional dependencies with no install script, so CI's `npm ci --ignore-scripts` needs no change. - .oxlintrc.json: turn on typescript/no-floating-promises and typescript/no-misused-promises. Under src/__tests__/**, no-misused-promises skips checksVoidReturn.arguments: vi.spyOn(fse, ...) types the spy from fs-extra's last overload, the callback one that returns void, so every correct async mockImplementation is flagged. - --type-aware also turns on oxlint's default type-aware rules. The ones with hits on main stay off, since each is its own evaluation under Tencent#836. The rest of the defaults have no hits and stay on. Fixes, all behavior-neutral: - dashboard.ts: the SSE debounce and the PID check become named async functions called with `void`; both already catch everything they throw. The HTTP handler becomes handleRequest, and createServer catches its rejection, logs it and answers 500. - import-repo-list.ts: track in-flight imports in a Set, so the unused array splice returned is gone. - scripts/mock-teamai-server.mjs: same handler wrapper as the dashboard, so a malformed JSON body answers 500 instead of an unhandled rejection. - ai-client.test.ts: schedule the mock process events with queueMicrotask. Refs Tencent#836. * ci(lint): turn on typescript/no-useless-default-assignment 1 prod hit, type-only: syncTeamUpdatesToLocal's last parameter was `placedRules: Record<string, string> | undefined = undefined`; it is now `placedRules?: Record<string, string>`. Refs Tencent#836. * ci(lint): list only the type-aware rules that would otherwise run as off consistent-return, no-unnecessary-boolean-literal-compare, no-unnecessary-type-arguments, no-unnecessary-type-assertion, no-unnecessary-type-conversion, no-unnecessary-type-parameters and no-unsafe-type-assertion are not default rules, so listing them as off changed nothing. The config keeps off only the nine default type-aware rules that --type-aware would turn on. `oxlint --type-aware --print-config` gives the same set of active rules before and after. Refs Tencent#836.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Turns on oxlint's type-aware mode with
typescript/no-floating-promisesandtypescript/no-misused-promises, the next rule set in #836.tscreports neither a promise that nobody awaits nor an async callback passed to an API that ignores its result. In a CLI that is an error nobody sees.mainhas 28 hits, 5 in prod (includingscripts/) and 23 in tests. This PR fixes all of them without suppression comments.oxlint-tsgolint7.0.2003 is the latest release. oxlint 1.85.0 declares it as an optional peer dependency,>=7.0.2001. It has noenginesfield and no install script, and the platform binary comes from an optional dependency. Sonpm ci --ignore-scriptsinstalls it in bothci.yml(Node 20 and 22, Ubuntu and macOS) and.coding-ci.yaml, and neither file changes. Both already runnpm run lint.--type-awarealso turns on oxlint's default type-aware rules. Nine of them stay off: the seven with hits on this branch (unbound-method,no-base-to-string,await-thenable,restrict-template-expressions,require-array-sort-compare,no-redundant-type-constituents,no-implied-eval), plusno-duplicate-type-constituentsandno-meaningless-void-operator, which have none. Each needs its own evaluation (counts below), so each is a follow-up under oxlint rollout: bugs found in the baseline, and next rules to evaluate #836..oxlintrc.jsonlists only rules that would otherwise run. The remaining defaults stay on:no-array-delete,no-for-in-array,no-misused-spread,no-unsafe-unary-minusandno-useless-default-assignment. Only the last one had a hit.src/__tests__/**,no-misused-promisesskipschecksVoidReturn.arguments.vi.spyOn(fse, …)types the spy from fs-extra's last overload, the callback one that returnsvoid, so every correct asyncmockImplementationis flagged (17 sites). The only per-site fix is a type assertion. The override also covers the asynccreateServerhandler inhelpers/mock-server.ts, where an unhandled rejection already fails the vitest run.no-floating-promisesstays fully on in tests.dashboard.ts:83, SSE debouncesetTimeout(async () => …)pushSessions, called assetTimeout(() => void pushSessions(), 200). Its body already catches everything.dashboard.ts:109, PID checksetInterval(async () => …)checkPidsdashboard.ts:144, HTTP handlerhttp.createServer(async …)handleRequest.createServercatches its rejection, logs it at debug and answers 500.import-repo-list.ts:149splicewas droppedSetscripts/mock-teamai-server.mjs:54http.createServer(async …)ai-client.test.ts×2Promise.resolve().then(…)to schedule mock eventsqueueMicrotask(…)utils/pre-push-sync.ts:59placedRules: … | undefined = undefinedplacedRules?:(type-only)None of the prod hits was a lost error in practice. The dashboard's timers already catch everything inside, and
processEntryinimport-repo-list.tscatches every import failure. Runtime behavior changes on one path only, and I found nothing that reaches it. An unexpected rejection in the dashboard's request handler used to reach the dashboard'suncaughtExceptionhandler and shut it down. It is now logged at debug and answered with a 500. The calls that run before the first route'stry(readEvents,dashboardWorkspaces) already catch their own errors.Refs #836.
Next candidates for #836
Hits on this branch for each type-aware rule that does not run here, counted with each rule turned on alone. The non-default ones (
consistent-return,no-unnecessary-*,no-unsafe-type-assertion) are off because oxlint leaves them off, not because the config lists them.unbound-methodlog.warn/vi.mocked(log.warn). Declaringlog's functions as arrow functions (none readsthis) clears them at the source.no-base-to-stringString(x)on parsed YAML/JSON (review-cmd.ts,iwiki-client.ts,local-agent.ts,projects.ts,roles.ts,marketplace.ts,source.ts) prints[object Object]for an object value. AscalarText(value): string | undefinedhelper, with each site keeping its current fallback, would fix it.await-thenablePromise.allover a mix of values and promises indashboard-scope.ts, andawaiton sync values in testsrestrict-template-expressions${err instanceof Error ? err.message : err}incatchblocksrequire-array-sort-compareno-redundant-type-constituentsno-implied-evalnew Function(js)as a syntax check indashboard-ui.test.tsconsistent-returnno-unnecessary-type-assertionno-unnecessary-type-conversionno-unnecessary-boolean-literal-compareno-unnecessary-type-arguments,no-unnecessary-type-parametersno-unsafe-type-assertionno-duplicate-type-constituents,no-meaningless-void-operatorEvidence
mainata8ab8e00,npx oxlint --type-aware -A all -W typescript/no-floating-promises -W typescript/no-misused-promisesgives 28 warnings.npm run lintdoesn't run them.npm run lintgives 0 warnings and exits 0. With throwaway probe files it exits 1:npm run linttakes about 0.55 s warm and 1.4 s cold. Without--type-awareit takes 0.2 s.npx tsc --noEmitis clean andnpm run buildsucceeds.npx vitest run --maxWorkers=2on Node 22 gives 5166 passed, 1 skipped and 14 failed, allTest timed out in 15000msingit-kind-reports.test.tsandgit-kind-learnings.test.ts, on a loaded machine. Neither file touches code this PR changes. Re-run alone, both pass (31 tests).teamai dashboard, run under an isolatedHOME, serves every route through the new wrapper:scripts/mock-teamai-server.mjsanswers a malformed body and keeps serving:npm run lint, and the Node requirement inCONTRIBUTING.md,AGENTS.mdandCLAUDE.mdstill holds, sinceoxlint-tsgolintdeclares no engines.Merge Danger
Door: two-way
Blast Radius: contributors
Every PR opened after this one must pass the two type-aware rules. The warning text says what to change: await it, return it, or mark a deliberate fire-and-forget with
voidafter handling its errors. Both packages are pinned exactly, so new type-aware defaults arrive only through a deliberate version bump. Reverting is a single revert.