diff --git a/gitnexus-shared/src/scope-resolution/language-classification.ts b/gitnexus-shared/src/scope-resolution/language-classification.ts index 11b737a22..20059c3e9 100644 --- a/gitnexus-shared/src/scope-resolution/language-classification.ts +++ b/gitnexus-shared/src/scope-resolution/language-classification.ts @@ -12,6 +12,9 @@ * - experimental: vue (embedded-language / SFC complexity), * cobol (regex-provider path) * - quarantined: (none) + * + * Added after Ring 1: zig enters as `experimental` (new language + * integration; promotion to `production` is a separate governance PR). */ import { SupportedLanguages } from '../languages.js'; diff --git a/gitnexus/src/core/ingestion/language-config.ts b/gitnexus/src/core/ingestion/language-config.ts index f4064a2fc..a50ce16e6 100644 --- a/gitnexus/src/core/ingestion/language-config.ts +++ b/gitnexus/src/core/ingestion/language-config.ts @@ -594,11 +594,14 @@ export async function loadZigBuildConfig(repoRoot: string): Promise { } }); - it('is inert for a grammar-key variant nobody registered', () => { + // `typescript:tsx` IS a registry key (`listGrammarSources()` yields it) — + // what makes it inert is that OPTIONAL_GRAMMAR_ENV has no entry for it, the + // grammar being mandatory. A key no registry ever yields is inert the same + // way; both stay ungated no matter what env vars are set. + it('is inert for a grammar key with no gate entry, registered or not', () => { process.env[envVar] = '1'; expect(isOptionalGrammarRequired('typescript:tsx')).toBe(false); + expect(isOptionalGrammarRequired('no-such:grammar')).toBe(false); }); // Languages with no entry must never be gated — an unregistered language diff --git a/gitnexus/test/unit/zig-import-resolver.test.ts b/gitnexus/test/unit/zig-import-resolver.test.ts index 3e3376ffb..2ddf4e799 100644 --- a/gitnexus/test/unit/zig-import-resolver.test.ts +++ b/gitnexus/test/unit/zig-import-resolver.test.ts @@ -136,13 +136,27 @@ describe('resolveZigImportInternal', () => { it('returns null for absolute `.path` deps, POSIX and Windows spellings alike', () => { // `normalizeZigDepPath` promises null for anything outside the repo; a - // `/`-only check let `C:\\local_dep` through as the relative `C:/local_dep`. + // `/`-only check let `C:\\local_dep` through as the relative `C:/local_dep`, + // and an absolute check that ran BEFORE backslash normalization let the + // UNC `\\\\server\\share\\local_dep` (and root-relative `\\local_dep`) + // through as relative paths. The `root.zig` entries below are the files + // those misreadings WOULD resolve — each spelling must reject, not merely + // miss. const files = new Set([ 'src/main.zig', 'C:/local_dep/src/dep.zig', 'local_dep/src/dep.zig', + 'local_dep/src/root.zig', + 'server/share/local_dep/src/root.zig', ]); - for (const abs of ['/local_dep', 'C:\\local_dep', 'c:/local_dep', 'D:\\x\\local_dep']) { + for (const abs of [ + '/local_dep', + 'C:\\local_dep', + 'c:/local_dep', + 'D:\\x\\local_dep', + '\\\\server\\share\\local_dep', + '\\local_dep', + ]) { const zon = { pathDeps: new Map([['dep', abs]]) }; expect(resolveZigImportInternal('src/main.zig', 'dep', files, zon)).toBeNull(); }