fix: report JavaScript worker phases and parent budget recovery

This commit is contained in:
morluto committed 2026-10-24 02:35:59 +08:00
1 parent 93de7bc7e3
commit 3f9357b599
7 files changed
+100 -3

No files matched your search

@@ -257,6 +257,7 @@ export class JavaScriptAnalysisWorker {
file: JavaScriptArtifactFile,
capacity: JavaScriptSemanticProjectionCapacity,
signal?: AbortSignal,
onPhase?: (phase: string) => Promise<void>,
): Promise<
Result<JavaScriptAnalyzedSource, JavaScriptSourceAnalysisFailure>
> {
@@ -343,6 +344,7 @@ export class JavaScriptAnalysisWorker {
);
if (response.kind === "phase") {
this.#phase = response.phase;
await onPhase?.(response.phase);
continue;
}
if (response.kind === "static") {
@@ -362,6 +364,9 @@ export class JavaScriptAnalysisWorker {
parent_result_budget_bytes: this.#resultBudgetBytes,
parent_result_budget_exhausted: true,
},
{
remediationAction: JAVASCRIPT_PARENT_RESULT_BUDGET_REMEDIATION,
},
);
offeredResultBudget =
this.#applicationProjectionFailure !== undefined &&