fix(javascript): bound semantic unknown retention at projection
Admit unknowns before canonical construction and provenance interning. Offer independent per-file and application capacities through CLI, Evidence and the owned analysis worker, and reject over-allocation during streamed decoding. Report examined omitted emission occurrences by family and reason without retaining discarded identities. Preserve omission-free graph identities and distinguish node truncation from overall partial coverage. Fixes #4797
This commit is contained in:
1 parent
926e18b3fc
commit
f4322b15ed
34 files changed
+892
-293
No files matched your search
@@ -8,10 +8,12 @@ export const JAVASCRIPT_ANALYSIS_RESOURCE_DEFAULTS = {
|
||||
timeoutMs: 300_000,
|
||||
semanticNodes: 100_000,
|
||||
semanticNodesPerFile: 20_000,
|
||||
semanticUnknowns: 100_000,
|
||||
semanticUnknownsPerFile: 20_000,
|
||||
} as const;
|
||||
|
||||
/** Maximum caller-selected node capacity; heap and transfer admission still apply. */
|
||||
export const JAVASCRIPT_SEMANTIC_NODE_MAXIMUM = 1_000_000;
|
||||
/** Maximum caller-selected retained record capacity; heap and transfer admission still apply. */
|
||||
export const JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM = 1_000_000;
|
||||
|
||||
/** Project observed execution limits without inventing unmeasured values. */
|
||||
export const javaScriptAnalysisCoverageLimits = (
|
||||
@@ -46,7 +48,7 @@ export const javaScriptAnalysisResourceControlsSchema = z.strictObject({
|
||||
.number()
|
||||
.int()
|
||||
.min(1)
|
||||
.max(JAVASCRIPT_SEMANTIC_NODE_MAXIMUM)
|
||||
.max(JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM)
|
||||
.optional()
|
||||
.describe(
|
||||
"Maximum retained semantic nodes across the application; defaults to 100000. Worker heap and parent result admission remain enforced.",
|
||||
@@ -55,11 +57,29 @@ export const javaScriptAnalysisResourceControlsSchema = z.strictObject({
|
||||
.number()
|
||||
.int()
|
||||
.min(1)
|
||||
.max(JAVASCRIPT_SEMANTIC_NODE_MAXIMUM)
|
||||
.max(JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM)
|
||||
.optional()
|
||||
.describe(
|
||||
"Maximum retained semantic nodes per source file; defaults to 20000, additionally bounded by max_semantic_nodes and memory/transfer limits.",
|
||||
),
|
||||
max_semantic_unknowns: z
|
||||
.number()
|
||||
.int()
|
||||
.min(1)
|
||||
.max(JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM)
|
||||
.optional()
|
||||
.describe(
|
||||
"Maximum retained semantic unknown records across the application; defaults to 100000. Omitted emission occurrences are counted by family and reason.",
|
||||
),
|
||||
max_semantic_unknowns_per_file: z
|
||||
.number()
|
||||
.int()
|
||||
.min(1)
|
||||
.max(JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM)
|
||||
.optional()
|
||||
.describe(
|
||||
"Maximum retained semantic unknown records per source file; defaults to 20000, additionally bounded by max_semantic_unknowns and memory/transfer limits.",
|
||||
),
|
||||
max_heap_mb: z
|
||||
.number()
|
||||
.int()
|
||||
|
||||
Reference in new issue
Block a user