mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-03 06:51:00 +02:00
feat(ts): add real quality gates — Biome lint + effect-law ratchet + class inventory
- biome.json (2.4.16, linter-only) wired as "lint" in all six packages - scripts/check-effect-laws.ts: Effect-native law enforcement encoding the adapted beep-effect effect-first/schema-first laws (no native JSON/switch/ sort/fetch/timers, no process.env, no throw new, no Effect.run* outside boundaries, no Schema-suffixed constants, no node:fs/path, AST-based pure-data interface detection per law 38/39) - ratcheting baseline allowlist (95 entries / 290 findings) that must shrink to documented exemptions only; stale counts fail the gate - root lint chains turbo lint + law check + native-class inventory - fix all 163 initial Biome findings: import-type style, templates, two `any`s, ten non-null assertions (librarian getService gate, A.matchRight in atoms, ensureNode returning nodes, main.tsx mount guard) Gates: lint, check:tsgo, build, test (force, 11 tasks) all green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
cf12defcd8
commit
0746d7ffd5
109 changed files with 951 additions and 611 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { describe, it, expect, vi, beforeEach } from "vitest";
|
||||
import type { BaseApi } from "../socket/trustgraph-socket";
|
||||
import { FlowsApi, TrustGraphSocketError } from "../socket/trustgraph-socket";
|
||||
import { FlowResponse } from "../models/messages";
|
||||
import type { FlowResponse } from "../models/messages";
|
||||
|
||||
describe("FlowsApi", () => {
|
||||
let mockApi: {
|
||||
|
|
@ -12,8 +13,7 @@ describe("FlowsApi", () => {
|
|||
mockApi = {
|
||||
makeRequest: vi.fn(),
|
||||
};
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
flowsApi = FlowsApi(mockApi as any);
|
||||
flowsApi = FlowsApi(mockApi as unknown as BaseApi);
|
||||
});
|
||||
|
||||
describe("startFlow", () => {
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ describe("Message Types", () => {
|
|||
type: "library-error",
|
||||
});
|
||||
expect(response["document-metadatas"]).toHaveLength(1);
|
||||
expect(response["document-metadatas"]![0].id).toBe("doc-1");
|
||||
expect(response["document-metadatas"]?.[0].id).toBe("doc-1");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
import { Effect } from "effect";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { DispatchError, DispatchStreamChunk } from "../rpc/contract";
|
||||
import { type DispatchInput, type RpcConnectionState, withDispatchRequestPolicy } from "../socket/effect-rpc-client";
|
||||
import { type ConnectionState, makeBaseApiWithRpc } from "../socket/trustgraph-socket";
|
||||
import type { DispatchInput, RpcConnectionState, } from "../socket/effect-rpc-client";
|
||||
import { withDispatchRequestPolicy } from "../socket/effect-rpc-client";
|
||||
import type { ConnectionState, } from "../socket/trustgraph-socket";
|
||||
import { makeBaseApiWithRpc } from "../socket/trustgraph-socket";
|
||||
|
||||
const input: DispatchInput = {
|
||||
scope: "global",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import { describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
import type {
|
||||
BaseApi,
|
||||
} from "../socket/trustgraph-socket";
|
||||
import {
|
||||
ConfigApi,
|
||||
KnowledgeApi,
|
||||
LibrarianApi,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue