From ebc2a715ea90bf16fcda06da221771908b499c57 Mon Sep 17 00:00:00 2001 From: Test Date: Sat, 18 Apr 2026 13:14:09 +0200 Subject: [PATCH] fix: schema + test count fixes after rebase onto v1.6.2-rc.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add A11ySignal to registration-table LABEL_BEHAVIOR (inert) - Replace non-existent FileTypeEnvBindings with FileScopeBindings - Remove duplicate CLASS_CONTAINER_TYPES import in parse-worker - Merge both fileScopeBindings + typeEnvBindings + jsxElements fields - Bump NODE_TABLES count 31→32, SCHEMA_QUERIES 33→34, VALID_RELATION_TYPES 14→16 - Keep both wcag_audit and 5 group tools in tools.ts (17 total) Co-Authored-By: Claude Sonnet 4.6 --- .../src/core/ingestion/model/registration-table.ts | 1 + gitnexus/src/core/ingestion/parsing-processor.ts | 4 ++-- gitnexus/src/core/ingestion/workers/parse-worker.ts | 3 +-- gitnexus/test/unit/schema.test.ts | 10 +++++----- gitnexus/test/unit/security.test.ts | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gitnexus/src/core/ingestion/model/registration-table.ts b/gitnexus/src/core/ingestion/model/registration-table.ts index a5bb14f21..9ac78065a 100644 --- a/gitnexus/src/core/ingestion/model/registration-table.ts +++ b/gitnexus/src/core/ingestion/model/registration-table.ts @@ -182,6 +182,7 @@ const LABEL_BEHAVIOR = { Section: 'inert', Route: 'inert', Tool: 'inert', + A11ySignal: 'inert', } as const satisfies Record & // Cross-invariant 1 — every class-like label (participates in // qualifiedName fallback in `SymbolTable.add()`) MUST be classified as diff --git a/gitnexus/src/core/ingestion/parsing-processor.ts b/gitnexus/src/core/ingestion/parsing-processor.ts index d1138589e..5b0056ba6 100644 --- a/gitnexus/src/core/ingestion/parsing-processor.ts +++ b/gitnexus/src/core/ingestion/parsing-processor.ts @@ -64,7 +64,7 @@ export interface WorkerExtractedData { ormQueries: ExtractedORMQuery[]; constructorBindings: FileConstructorBindings[]; fileScopeBindings: FileScopeBindings[]; - typeEnvBindings: FileTypeEnvBindings[]; + typeEnvBindings: FileScopeBindings[]; jsxElements: import('./a11y-rules/types.js').ExtractedJSXElement[]; } @@ -126,7 +126,7 @@ const processParsingWithWorkers = async ( const allORMQueries: ExtractedORMQuery[] = []; const allConstructorBindings: FileConstructorBindings[] = []; const fileScopeBindingsByFile: FileScopeBindings[] = []; - const allTypeEnvBindings: FileTypeEnvBindings[] = []; + const allTypeEnvBindings: FileScopeBindings[] = []; const allJSXElements: import('./a11y-rules/types.js').ExtractedJSXElement[] = []; for (const result of chunkResults) { for (const node of result.nodes) { diff --git a/gitnexus/src/core/ingestion/workers/parse-worker.ts b/gitnexus/src/core/ingestion/workers/parse-worker.ts index 61c558939..a8001c195 100644 --- a/gitnexus/src/core/ingestion/workers/parse-worker.ts +++ b/gitnexus/src/core/ingestion/workers/parse-worker.ts @@ -79,7 +79,6 @@ import { import type { LanguageProvider } from '../language-provider.js'; import type { ExtractedJSXElement } from '../a11y-rules/types.js'; import { extractJSXElements } from '../a11y-rules/jsx-extractor.js'; -import { CLASS_CONTAINER_TYPES } from '../utils/ast-helpers.js'; // ============================================================================ // Types for serializable results @@ -273,7 +272,7 @@ export interface ParseWorkerResult { /** All-scope type bindings from TypeEnv for BindingAccumulator (includes function-local). */ fileScopeBindings: FileScopeBindings[]; /** File-scope type bindings from TypeEnv fixpoint for exported symbol collection. */ - typeEnvBindings: FileTypeEnvBindings[]; + typeEnvBindings: FileScopeBindings[]; /** Extracted JSX elements for a11y analysis */ jsxElements: ExtractedJSXElement[]; skippedLanguages: Record; diff --git a/gitnexus/test/unit/schema.test.ts b/gitnexus/test/unit/schema.test.ts index ac4f3ea7e..1fc2a5a4f 100644 --- a/gitnexus/test/unit/schema.test.ts +++ b/gitnexus/test/unit/schema.test.ts @@ -68,8 +68,8 @@ describe('LadybugDB Schema', () => { }); it('has expected total count', () => { - // 9 core + 18 multi-language + Route + Tool + A11ySignal = 31 - expect(NODE_TABLES).toHaveLength(31); + // 9 core + 19 multi-language + Route + Tool + A11ySignal = 32 + expect(NODE_TABLES).toHaveLength(32); }); }); @@ -202,7 +202,7 @@ describe('LadybugDB Schema', () => { describe('schema query ordering', () => { it('NODE_SCHEMA_QUERIES has correct count', () => { - expect(NODE_SCHEMA_QUERIES).toHaveLength(31); + expect(NODE_SCHEMA_QUERIES).toHaveLength(32); }); it('REL_SCHEMA_QUERIES has one relation table', () => { @@ -210,8 +210,8 @@ describe('LadybugDB Schema', () => { }); it('SCHEMA_QUERIES includes all node + rel + embedding schemas', () => { - // 31 node + 1 rel + 1 embedding = 33 - expect(SCHEMA_QUERIES).toHaveLength(33); + // 32 node + 1 rel + 1 embedding = 34 + expect(SCHEMA_QUERIES).toHaveLength(34); }); it('node schemas come before relation schemas in SCHEMA_QUERIES', () => { diff --git a/gitnexus/test/unit/security.test.ts b/gitnexus/test/unit/security.test.ts index 754055bd3..3b9315540 100644 --- a/gitnexus/test/unit/security.test.ts +++ b/gitnexus/test/unit/security.test.ts @@ -106,7 +106,7 @@ describe('isWriteQuery', () => { describe('VALID_RELATION_TYPES', () => { it('contains all expected relation types', () => { - expect(VALID_RELATION_TYPES.size).toBe(15); + expect(VALID_RELATION_TYPES.size).toBe(16); for (const t of [ 'CALLS', 'IMPORTS',