Idea detail
parse_budget_timeout
reqlan rq/language/parser_lexer.rq:18
Summary
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 ).
Navigation
Attributes
| Key | Value |
|---|---|
| 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 |
Ancestor context
No ancestor chain recorded.
Outbound references
Inbound references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | analytical_package | reqlan rq/core-architecture.rq | parse_budget_timeout |
| references | analytical_rust_port | reqlan rq/core_analysis/rust_port.rq | parse_budget_timeout |
| references | parser_rust | reqlan rq/core_analysis/rust_port.rq | parse_budget_timeout |
| references | ast_lifecycle | reqlan rq/extension/language/support/open-file-sequencing.rq | parse_budget_timeout |
| references | import_error_recovery | reqlan rq/language/imports.rq | parse_budget_timeout |
| references | recovery_vs_budget | reqlan rq/language/parser_lexer.rq | parse_budget_timeout |
| references | context_sensitive_lexer_scaling | reqlan rq/language/syntax-edge-cases.rq | parse_budget_timeout |
| references | no_name_idea_safe_warning | reqlan rq/language/syntax.rq | parse_budget_timeout |
Unresolved references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| None | |||
Local graph
Initialising graph…