src/pipeline/pipeline_internal.h:26
/* Maximum byte budget for tree-sitter extraction per file */
#define CBM_EXTRACT_BUDGET 5000000
It is not a byte budget. It is passed as the timeout_micros argument at eight
call sites (pass_calls.c:779, pass_definitions.c:675 and :834,
pass_k8s.c:655 and :673, pass_parallel.c:1167, pass_semantic.c:667,
pass_usages.c:356), and internal/cbm/cbm.h:734 documents that parameter as:
// timeout_micros: per-file parse timeout in microseconds (0 = no timeout).
So the value is 5 seconds of CPU time. internal/cbm/cbm.c:2167 confirms it:
budget.cpu_deadline_ns = cbm_thread_cpu_time_ns() + budget_ns;
budget.wall_ceiling_ns = t0 + budget_ns * CBM_PARSE_WALL_CEILING_FACTOR;
and internal/cbm/cbm.c:299 already names it correctly:
#define CBM_PARSE_WALL_CEILING_FACTOR 12ULL /* ~60 s ceiling for the 5 s CPU budget */
So the header comment is just wrong. Renaming the constant is a wider change, but the comment can be corrected on its own.
Line numbers are against 5958f546.
src/pipeline/pipeline_internal.h:26It is not a byte budget. It is passed as the
timeout_microsargument at eightcall sites (
pass_calls.c:779,pass_definitions.c:675and:834,pass_k8s.c:655and:673,pass_parallel.c:1167,pass_semantic.c:667,pass_usages.c:356), andinternal/cbm/cbm.h:734documents that parameter as:// timeout_micros: per-file parse timeout in microseconds (0 = no timeout).So the value is 5 seconds of CPU time.
internal/cbm/cbm.c:2167confirms it:and
internal/cbm/cbm.c:299already names it correctly:So the header comment is just wrong. Renaming the constant is a wider change, but the comment can be corrected on its own.
Line numbers are against
5958f546.