reqlanOverviewIdeasFilesCode filesClustersAttributesGraphPrint

Printable idea sheet

parse_budget_timeout

reqlan rq/language/parser_lexer.rq:18

Katz 0.197

Lexing, parsing, or a parse subprocess for a single `.rq` file must finish within `parseBudgetMs` from defaults.json.
If it cannot, do not hang the language server or block the rest of the workspace.
Surface both a warning ( budget exceeded; semantic features may be incomplete ) and an error ( file left unloaded ) on that document, then continue with other files.
Happy path stays in-process ( sync ) for typical file sizes so edits and workspace load stay fast.
Killable worker enforcement is used when the input is large, a file previously hit the budget ( sticky escalate ), or a caller forces the worker path; sync throws still become the same incomplete result shape.
The open buffer stores that result as an empty model plus diagnostics
( ast_lifecycle ).

implementation
defaults.json, reqlan-parse-budget.ts, reqlan-async-parser.ts, reqlan-parse-worker.ts, reqlan-document-factory.ts, reqlan-module.ts, reqlan-workspace-manager.ts
status
done
tests
parse-budget.test.ts:times out a hung parse worker with warning and error, parse-budget.test.ts:returns incomplete result when worker parse fails, parse-budget.test.ts:parses a normal file within budget, parse-budget.test.ts:parses small files on the calling thread without a worker, parse-budget.test.ts:escalates large files to the worker path, parse-budget.test.ts:forceWorker escalates a small file, ast-lifecycle.test.ts:incomplete parse stores an empty model, parser.rs:times_out_hang_sentinel

Interactive page: parse_budget_timeout