@nirnex/cli 4.2.0 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/index.d.ts +2 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +51 -13
- package/dist/commands/index.js.map +1 -1
- package/dist/utils/debug-log.d.ts +51 -0
- package/dist/utils/debug-log.d.ts.map +1 -0
- package/dist/utils/debug-log.js +207 -0
- package/dist/utils/debug-log.js.map +1 -0
- package/package.json +1 -1
package/dist/commands/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export interface IndexResult {
|
|
|
3
3
|
failed: number;
|
|
4
4
|
failedFiles: string[];
|
|
5
5
|
durationMs: number;
|
|
6
|
+
debugLogPath?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function indexCommand(args: string[]): IndexResult;
|
|
8
|
+
export declare function indexCommand(args: string[], commandLabel?: string): IndexResult;
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AA2CA,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,WAAW,CA4I/E"}
|
package/dist/commands/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { openDb, insertParsedModule, setMetaCommitHash, computeGraphEdges } from '@nirnex/core/dist/db.js';
|
|
2
|
-
import {
|
|
2
|
+
import { parseFileWithDiagnostics } from '@nirnex/parser/dist/index.js';
|
|
3
|
+
import { checkParserCompatibility } from '@nirnex/parser/dist/compatibility.js';
|
|
4
|
+
import { appendDebugLog } from '../utils/debug-log.js';
|
|
3
5
|
import fs from 'node:fs';
|
|
4
6
|
import path from 'node:path';
|
|
5
7
|
import { execSync } from 'node:child_process';
|
|
@@ -39,9 +41,30 @@ function detectModule(fullPath, rootDir) {
|
|
|
39
41
|
return parts[0] + '/' + parts[1];
|
|
40
42
|
return parts[0];
|
|
41
43
|
}
|
|
42
|
-
export function indexCommand(args) {
|
|
44
|
+
export function indexCommand(args, commandLabel) {
|
|
43
45
|
const isRebuild = args.includes('--rebuild');
|
|
44
46
|
const targetDir = process.cwd();
|
|
47
|
+
const label = commandLabel ?? (isRebuild ? 'index --rebuild' : 'index');
|
|
48
|
+
// ── Pre-flight: parser compatibility check ─────────────────────────────────
|
|
49
|
+
const compat = checkParserCompatibility();
|
|
50
|
+
if (!compat.healthy) {
|
|
51
|
+
const failedTests = compat.smokeTests.filter(t => t.status === 'fail');
|
|
52
|
+
process.stderr.write('\n\x1b[31m[nirnex index] Parser health check FAILED — aborting index\x1b[0m\n');
|
|
53
|
+
process.stderr.write(` tree-sitter: ${compat.treeSitterVersion ?? 'unknown'}\n`);
|
|
54
|
+
process.stderr.write(` tree-sitter-typescript: ${compat.treeSitterTypescriptVersion ?? 'unknown'}\n`);
|
|
55
|
+
for (const t of failedTests) {
|
|
56
|
+
process.stderr.write(` ✖ smoke test "${t.name}" (${t.lang}): ${t.errorMessage}\n`);
|
|
57
|
+
}
|
|
58
|
+
process.stderr.write('\n Fix: npm install -g @nirnex/cli\n\n');
|
|
59
|
+
return { succeeded: 0, failed: 0, failedFiles: [], durationMs: 0 };
|
|
60
|
+
}
|
|
61
|
+
if (!compat.inSupportedMatrix) {
|
|
62
|
+
process.stderr.write(`\x1b[33m[nirnex index] Warning:\x1b[0m Parser dependency versions are outside the tested compatibility matrix.\n` +
|
|
63
|
+
` tree-sitter: ${compat.treeSitterVersion ?? 'unknown'} (supported: 0.21.x)\n` +
|
|
64
|
+
` tree-sitter-typescript: ${compat.treeSitterTypescriptVersion ?? 'unknown'} (supported: 0.23.x)\n` +
|
|
65
|
+
` Smoke tests passed, but parse failures may still occur on complex files.\n` +
|
|
66
|
+
` Run: npm install -g @nirnex/cli to restore tested versions.\n`);
|
|
67
|
+
}
|
|
45
68
|
const dbPath = path.join(targetDir, '.aidos.db');
|
|
46
69
|
console.log('[nirnex index] Starting ' + (isRebuild ? 'full rebuild' : 'incremental update') + ' on ' + targetDir);
|
|
47
70
|
const t0 = performance.now();
|
|
@@ -63,16 +86,31 @@ export function indexCommand(args) {
|
|
|
63
86
|
}
|
|
64
87
|
}
|
|
65
88
|
db.exec('BEGIN TRANSACTION');
|
|
89
|
+
const compatCtx = {
|
|
90
|
+
treeSitterVersion: compat.treeSitterVersion,
|
|
91
|
+
treeSitterTypescriptVersion: compat.treeSitterTypescriptVersion,
|
|
92
|
+
inSupportedMatrix: compat.inSupportedMatrix,
|
|
93
|
+
};
|
|
66
94
|
let succeeded = 0;
|
|
67
95
|
let failed = 0;
|
|
68
96
|
const failedFiles = [];
|
|
97
|
+
let debugLogPath;
|
|
69
98
|
for (const file of filesToProcess) {
|
|
70
|
-
const
|
|
71
|
-
if (!
|
|
99
|
+
const result = parseFileWithDiagnostics(file);
|
|
100
|
+
if (!result.ok) {
|
|
72
101
|
failed++;
|
|
73
102
|
failedFiles.push(file);
|
|
103
|
+
// Write structured debug record — first failure prints the log path
|
|
104
|
+
const logPath = appendDebugLog(targetDir, result.diagnostics, label, compatCtx);
|
|
105
|
+
if (failed === 1) {
|
|
106
|
+
debugLogPath = logPath;
|
|
107
|
+
process.stderr.write(`[nirnex index] suspected cause: ${result.diagnostics.stage} stage failure` +
|
|
108
|
+
` (${result.diagnostics.extension} / ${result.diagnostics.selected_language ?? 'unknown grammar'})\n` +
|
|
109
|
+
`[nirnex index] debug details → ${path.relative(targetDir, logPath)}\n`);
|
|
110
|
+
}
|
|
74
111
|
continue;
|
|
75
112
|
}
|
|
113
|
+
const parsed = result.module;
|
|
76
114
|
const myModule = detectModule(file, targetDir);
|
|
77
115
|
const enrichedImports = parsed.imports.map((imp) => {
|
|
78
116
|
const resolved = resolveImport(imp.source, file);
|
|
@@ -85,13 +123,10 @@ export function indexCommand(args) {
|
|
|
85
123
|
...imp,
|
|
86
124
|
resolved: resolved.resolved,
|
|
87
125
|
is_local: resolved.is_local,
|
|
88
|
-
is_cross_module
|
|
126
|
+
is_cross_module,
|
|
89
127
|
};
|
|
90
128
|
});
|
|
91
|
-
insertParsedModule(db, {
|
|
92
|
-
...parsed,
|
|
93
|
-
imports: enrichedImports
|
|
94
|
-
});
|
|
129
|
+
insertParsedModule(db, { ...parsed, imports: enrichedImports });
|
|
95
130
|
succeeded++;
|
|
96
131
|
}
|
|
97
132
|
computeGraphEdges(db);
|
|
@@ -109,12 +144,15 @@ export function indexCommand(args) {
|
|
|
109
144
|
console.log(`[nirnex index] Finished: ${succeeded}/${filesToProcess.length} file(s) indexed in ${durationMs.toFixed(2)}ms`);
|
|
110
145
|
}
|
|
111
146
|
else {
|
|
112
|
-
|
|
113
|
-
`${failed} failed in ${durationMs.toFixed(2)}ms`);
|
|
147
|
+
process.stderr.write(`[nirnex index] Finished with degraded coverage: ${succeeded}/${filesToProcess.length} indexed, ` +
|
|
148
|
+
`${failed} failed in ${durationMs.toFixed(2)}ms\n`);
|
|
114
149
|
for (const f of failedFiles) {
|
|
115
|
-
|
|
150
|
+
process.stderr.write(`[nirnex index] ✖ ${path.relative(targetDir, f)}\n`);
|
|
151
|
+
}
|
|
152
|
+
if (failed > 1 && debugLogPath) {
|
|
153
|
+
process.stderr.write(`[nirnex index] ${failed} parser failures recorded → ${path.relative(targetDir, debugLogPath)}\n`);
|
|
116
154
|
}
|
|
117
155
|
}
|
|
118
|
-
return { succeeded, failed, failedFiles, durationMs };
|
|
156
|
+
return { succeeded, failed, failedFiles, durationMs, debugLogPath };
|
|
119
157
|
}
|
|
120
158
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC3G,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC3G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,cAAc,EAA6B,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,SAAS,OAAO,CAAC,GAAW,EAAE,QAAgC;IAC5D,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAClC,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACtB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QAC/B,IAAI,CAAC,KAAK,cAAc,IAAI,CAAC,KAAK,MAAM,IAAI,CAAC,KAAK,MAAM;YAAE,SAAS;QACnE,IAAI,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC1B,CAAC;aAAM,IAAI,IAAI,CAAC,QAAQ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ser failures.
|
|
3
|
+
*
|
|
4
|
+
* Writes to .ai-index/nirnex-debug.log (append-only, rotated at 10 MB).
|
|
5
|
+
* Never throws — debug logging must never interrupt indexing.
|
|
6
|
+
*/
|
|
7
|
+
import type { ParseFileDiagnostics } from '@nirnex/parser/dist/index.js';
|
|
8
|
+
export interface CompatibilityContext {
|
|
9
|
+
treeSitterVersion?: string;
|
|
10
|
+
treeSitterTypescriptVersion?: string;
|
|
11
|
+
inSupportedMatrix: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface DebugLogEntry {
|
|
14
|
+
timestamp: string;
|
|
15
|
+
level: 'error' | 'warn' | 'info';
|
|
16
|
+
event: 'parser_failure';
|
|
17
|
+
command: string;
|
|
18
|
+
node_version: string;
|
|
19
|
+
platform: string;
|
|
20
|
+
nirnex_cli_version?: string;
|
|
21
|
+
nirnex_parser_version?: string;
|
|
22
|
+
tree_sitter_version?: string;
|
|
23
|
+
tree_sitter_typescript_version?: string;
|
|
24
|
+
grammar_package: string;
|
|
25
|
+
grammar_variant?: string;
|
|
26
|
+
in_supported_matrix?: boolean;
|
|
27
|
+
file: string;
|
|
28
|
+
extension: string;
|
|
29
|
+
size_bytes: number;
|
|
30
|
+
content_sha256?: string;
|
|
31
|
+
char_length?: number;
|
|
32
|
+
has_bom?: boolean;
|
|
33
|
+
has_null_bytes?: boolean;
|
|
34
|
+
newline_style?: string;
|
|
35
|
+
selected_language?: string;
|
|
36
|
+
language_set?: boolean;
|
|
37
|
+
input_type?: string;
|
|
38
|
+
stage: string;
|
|
39
|
+
error_name: string;
|
|
40
|
+
error_message: string;
|
|
41
|
+
stack?: string;
|
|
42
|
+
suspected_cause: string;
|
|
43
|
+
recommended_actions: string[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Appends a structured JSONL record to `.ai-index/nirnex-debug.log`.
|
|
47
|
+
* Returns the absolute path to the log file.
|
|
48
|
+
* Never throws.
|
|
49
|
+
*/
|
|
50
|
+
export declare function appendDebugLog(cwd: string, diag: ParseFileDiagnostics, command: string, compat?: CompatibilityContext): string;
|
|
51
|
+
//# sourceMappingURL=debug-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-log.d.ts","sourceRoot":"","sources":["../../src/utils/debug-log.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAsBzE,MAAM,WAAW,oBAAoB;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAmJD,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAEhB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAID;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,oBAAoB,EAC1B,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,oBAAoB,GAC5B,MAAM,CA4DR"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured JSONL debug logger for nirnex parser failures.
|
|
3
|
+
*
|
|
4
|
+
* Writes to .ai-index/nirnex-debug.log (append-only, rotated at 10 MB).
|
|
5
|
+
* Never throws — debug logging must never interrupt indexing.
|
|
6
|
+
*/
|
|
7
|
+
import fs from 'node:fs';
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
import { createRequire } from 'node:module';
|
|
10
|
+
const _require = createRequire(import.meta.url);
|
|
11
|
+
const MAX_LOG_BYTES = 10 * 1024 * 1024; // 10 MB
|
|
12
|
+
// ─── Version helpers ─────────────────────────────────────────────────────────
|
|
13
|
+
function pkgVersion(name) {
|
|
14
|
+
try {
|
|
15
|
+
return _require(`${name}/package.json`).version;
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function classify(diag, compat) {
|
|
22
|
+
// ── Version mismatch — most likely cause when outside the tested matrix ──────
|
|
23
|
+
// Only applies to parse-stage failures; set_language failures have their own cause.
|
|
24
|
+
if (compat &&
|
|
25
|
+
!compat.inSupportedMatrix &&
|
|
26
|
+
(diag.stage === 'parse' || diag.stage === 'set_language')) {
|
|
27
|
+
return {
|
|
28
|
+
suspected_cause: 'parser_dependency_version_mismatch',
|
|
29
|
+
recommended_actions: [
|
|
30
|
+
`Installed: tree-sitter@${compat.treeSitterVersion ?? 'unknown'} + ` +
|
|
31
|
+
`tree-sitter-typescript@${compat.treeSitterTypescriptVersion ?? 'unknown'}`,
|
|
32
|
+
'These versions are outside the tested compatibility matrix for Nirnex',
|
|
33
|
+
'Supported: tree-sitter@0.21.x + tree-sitter-typescript@0.23.x',
|
|
34
|
+
'Fix: npm install -g @nirnex/cli to restore exact pinned versions',
|
|
35
|
+
'Then retry: nirnex index --rebuild',
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
// ── Grammar set failed — ABI / binding problem ────────────────────────────
|
|
40
|
+
if (diag.stage === 'set_language') {
|
|
41
|
+
return {
|
|
42
|
+
suspected_cause: 'grammar_binding_problem',
|
|
43
|
+
recommended_actions: [
|
|
44
|
+
'The tree-sitter language could not be set — likely a native ABI or version mismatch',
|
|
45
|
+
`Run: npm ls tree-sitter tree-sitter-typescript`,
|
|
46
|
+
'Reinstall: npm install -g @nirnex/cli',
|
|
47
|
+
'Check Node.js version compatibility with the tree-sitter native module',
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
// ── TSX file got TypeScript grammar — Nirnex bug ──────────────────────────
|
|
52
|
+
if (diag.extension === '.tsx' && diag.selected_language === 'typescript') {
|
|
53
|
+
return {
|
|
54
|
+
suspected_cause: 'wrong_grammar_selected',
|
|
55
|
+
recommended_actions: [
|
|
56
|
+
'A .tsx file was routed to the TypeScript grammar instead of the TSX grammar',
|
|
57
|
+
'This is a Nirnex parser bug — please file a report',
|
|
58
|
+
'Workaround: rename the file to .ts temporarily if it contains no JSX',
|
|
59
|
+
],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
// ── Null bytes — binary or incorrectly encoded file ───────────────────────
|
|
63
|
+
if (diag.has_null_bytes) {
|
|
64
|
+
return {
|
|
65
|
+
suspected_cause: 'invalid_file_encoding',
|
|
66
|
+
recommended_actions: [
|
|
67
|
+
'File contains null (0x00) bytes — it may be binary output, compiled JS, or mis-encoded',
|
|
68
|
+
'Re-save the file as UTF-8 without BOM using your editor',
|
|
69
|
+
'Check whether this file should be excluded via .gitignore or nirnex config',
|
|
70
|
+
],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
// ── Non-string passed to parse() — Nirnex bug ─────────────────────────────
|
|
74
|
+
if (diag.input_type !== undefined && diag.input_type !== 'string') {
|
|
75
|
+
return {
|
|
76
|
+
suspected_cause: 'invalid_parse_input_type',
|
|
77
|
+
recommended_actions: [
|
|
78
|
+
`Parser received type "${diag.input_type}" instead of a string — this is a Nirnex bug`,
|
|
79
|
+
'Please file a bug report with this log entry attached',
|
|
80
|
+
],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
// ── File could not be read or decoded ─────────────────────────────────────
|
|
84
|
+
if (diag.stage === 'read_file' || diag.stage === 'decode_file') {
|
|
85
|
+
return {
|
|
86
|
+
suspected_cause: 'file_access_or_encoding_error',
|
|
87
|
+
recommended_actions: [
|
|
88
|
+
`Check file permissions: ls -la "${diag.file}"`,
|
|
89
|
+
'Ensure the file is valid UTF-8 (not UTF-16, Latin-1, or binary)',
|
|
90
|
+
'Check whether the file is a dangling symlink',
|
|
91
|
+
],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
// ── Parse stage failure, versions confirmed compatible ────────────────────
|
|
95
|
+
// The environment is healthy (smoke tests passed, versions in matrix),
|
|
96
|
+
// so the failure is specific to this file's content.
|
|
97
|
+
if (diag.stage === 'parse' && diag.extension === '.tsx') {
|
|
98
|
+
const inMatrix = compat?.inSupportedMatrix ?? true; // assume ok if no context
|
|
99
|
+
return {
|
|
100
|
+
suspected_cause: inMatrix
|
|
101
|
+
? 'file_specific_syntax_not_supported_by_grammar'
|
|
102
|
+
: 'unsupported_syntax_or_parser_binding_issue',
|
|
103
|
+
recommended_actions: [
|
|
104
|
+
'The TSX grammar parsed other .tsx files successfully — the issue is specific to this file',
|
|
105
|
+
'Possible causes: very new JSX/TS syntax, unusually deep AST nesting, or unicode edge cases',
|
|
106
|
+
'Try isolating the syntax: comment out sections until the file parses',
|
|
107
|
+
'Check the content_sha256 to identify the exact file version that failed',
|
|
108
|
+
'File a bug report with this log entry so the grammar can be improved',
|
|
109
|
+
],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
if (diag.stage === 'parse' && diag.extension === '.ts') {
|
|
113
|
+
const inMatrix = compat?.inSupportedMatrix ?? true;
|
|
114
|
+
return {
|
|
115
|
+
suspected_cause: inMatrix
|
|
116
|
+
? 'file_specific_syntax_not_supported_by_grammar'
|
|
117
|
+
: 'unsupported_syntax_or_parser_binding_issue',
|
|
118
|
+
recommended_actions: [
|
|
119
|
+
'The TypeScript grammar parsed other .ts files successfully — the issue is specific to this file',
|
|
120
|
+
'Try isolating the syntax: comment out sections until the file parses',
|
|
121
|
+
'File a bug report with this log entry if the problem persists',
|
|
122
|
+
],
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
// ── AST traversal bug — Nirnex bug, not user file ─────────────────────────
|
|
126
|
+
if (diag.stage === 'postprocess_ast') {
|
|
127
|
+
return {
|
|
128
|
+
suspected_cause: 'nirnex_ast_traversal_bug',
|
|
129
|
+
recommended_actions: [
|
|
130
|
+
'Parsing succeeded but Nirnex failed while reading the syntax tree — this is a Nirnex bug',
|
|
131
|
+
'Please file a bug report with this log entry',
|
|
132
|
+
'Workaround: the file will be skipped from the index until the bug is fixed',
|
|
133
|
+
],
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
suspected_cause: 'unknown',
|
|
138
|
+
recommended_actions: [
|
|
139
|
+
'Review the stack trace in this log entry for clues',
|
|
140
|
+
'Run: nirnex index --rebuild to retry',
|
|
141
|
+
'File a bug report with this log entry attached',
|
|
142
|
+
],
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
// ─── Main export ──────────────────────────────────────────────────────────────
|
|
146
|
+
/**
|
|
147
|
+
* Appends a structured JSONL record to `.ai-index/nirnex-debug.log`.
|
|
148
|
+
* Returns the absolute path to the log file.
|
|
149
|
+
* Never throws.
|
|
150
|
+
*/
|
|
151
|
+
export function appendDebugLog(cwd, diag, command, compat) {
|
|
152
|
+
const logDir = path.join(cwd, '.ai-index');
|
|
153
|
+
const logPath = path.join(logDir, 'nirnex-debug.log');
|
|
154
|
+
try {
|
|
155
|
+
fs.mkdirSync(logDir, { recursive: true });
|
|
156
|
+
// Rotate if log exceeds size limit
|
|
157
|
+
try {
|
|
158
|
+
const stat = fs.statSync(logPath);
|
|
159
|
+
if (stat.size > MAX_LOG_BYTES) {
|
|
160
|
+
const rotated = `${logPath}.${Date.now()}.old`;
|
|
161
|
+
fs.renameSync(logPath, rotated);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
// Log may not exist yet — that's fine
|
|
166
|
+
}
|
|
167
|
+
const { suspected_cause, recommended_actions } = classify(diag, compat);
|
|
168
|
+
const entry = {
|
|
169
|
+
timestamp: new Date().toISOString(),
|
|
170
|
+
level: 'error',
|
|
171
|
+
event: 'parser_failure',
|
|
172
|
+
command,
|
|
173
|
+
node_version: process.version,
|
|
174
|
+
platform: `${process.platform}-${process.arch}`,
|
|
175
|
+
nirnex_cli_version: pkgVersion('@nirnex/cli'),
|
|
176
|
+
nirnex_parser_version: pkgVersion('@nirnex/parser'),
|
|
177
|
+
tree_sitter_version: compat?.treeSitterVersion ?? pkgVersion('tree-sitter'),
|
|
178
|
+
tree_sitter_typescript_version: compat?.treeSitterTypescriptVersion ?? pkgVersion('tree-sitter-typescript'),
|
|
179
|
+
grammar_package: 'tree-sitter-typescript',
|
|
180
|
+
grammar_variant: diag.grammar_variant,
|
|
181
|
+
in_supported_matrix: compat?.inSupportedMatrix,
|
|
182
|
+
file: diag.file,
|
|
183
|
+
extension: diag.extension,
|
|
184
|
+
size_bytes: diag.size_bytes,
|
|
185
|
+
content_sha256: diag.content_sha256,
|
|
186
|
+
char_length: diag.char_length,
|
|
187
|
+
has_bom: diag.has_bom,
|
|
188
|
+
has_null_bytes: diag.has_null_bytes,
|
|
189
|
+
newline_style: diag.newline_style,
|
|
190
|
+
selected_language: diag.selected_language,
|
|
191
|
+
language_set: diag.language_set,
|
|
192
|
+
input_type: diag.input_type,
|
|
193
|
+
stage: diag.stage,
|
|
194
|
+
error_name: diag.error_name,
|
|
195
|
+
error_message: diag.error_message,
|
|
196
|
+
stack: diag.stack,
|
|
197
|
+
suspected_cause,
|
|
198
|
+
recommended_actions,
|
|
199
|
+
};
|
|
200
|
+
fs.appendFileSync(logPath, JSON.stringify(entry) + '\n', 'utf8');
|
|
201
|
+
}
|
|
202
|
+
catch {
|
|
203
|
+
// Never propagate — debug logging must not break indexing
|
|
204
|
+
}
|
|
205
|
+
return logPath;
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=debug-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-log.js","sourceRoot":"","sources":["../../src/utils/debug-log.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEhD,MAAM,aAAa,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,QAAQ;AAEhD,gFAAgF;AAEhF,SAAS,UAAU,CAAC,IAAY;IAC9B,IAAI,CAAC;QACH,OAAQ,QAAQ,CAAC,GAAG,IAAI,eAAe,CAAyB,CAAC,OAAO,CAAC;IAC3E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AA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