refactor(javascript): own coverage facts and reuse block prefixes
Separate syntax, semantic uncertainty, examination limits and observed Electron applicability at the static producer, then preserve them through worker, graph and retained/inline summary views. Derive the established parse_status from the same facts and leave historical measurements unknown. Give semantic resource-limit classifications one schema owner. Replace repeated block-prefix searches and copies with collector-scoped syntax indexes. Keep invocation environments separate, charge indexing/replay to the existing work budget and yield during prefix work. Remove the superseded synchronous collector entrypoint. Validated producer, worker, CLI/MCP, historical and partial-coverage regressions, plus actual cancellation during indexing. Bounded authored 128/256-call controls preserved all prior facts while replacing repeated search/copy work with one index pass; this is not a throughput or agent-token benchmark.
This commit is contained in:
1 parent
c8269ca497
commit
f62a2baad8
21 files changed
+898
-125
No files matched your search
@@ -10,6 +10,28 @@ import { analyzeJavaScriptSemantics } from "../../domain/javascript/javascriptSe
|
||||
import { getterExpansionSource } from "../../../tests/fixtures/javascriptGetterExpansion.js";
|
||||
import { aliasSelectionBudgetSource } from "../../../tests/fixtures/javascriptAliasSelectionBudget.js";
|
||||
|
||||
it("preserves independent static coverage and historical unmeasured facts", () => {
|
||||
const facts = analyzeJavaScriptStaticSource("require(moduleName);");
|
||||
expect(
|
||||
javaScriptWorkerStaticAnalysisSchema.parse(
|
||||
JSON.parse(JSON.stringify(facts)),
|
||||
),
|
||||
).toEqual(facts);
|
||||
const { analysis_coverage: _coverage, ...historical } = facts;
|
||||
expect(javaScriptWorkerStaticAnalysisSchema.parse(historical)).toEqual(
|
||||
historical,
|
||||
);
|
||||
expect(
|
||||
javaScriptWorkerStaticAnalysisSchema.safeParse({
|
||||
...facts,
|
||||
analysis_coverage: {
|
||||
...facts.analysis_coverage,
|
||||
syntax: { status: "complete", error_count: -1 },
|
||||
},
|
||||
}).success,
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("transfers bounded alias selection coverage across the worker boundary", () => {
|
||||
const source = aliasSelectionBudgetSource();
|
||||
const facts = analyzeJavaScriptStaticSource(source);
|
||||
|
||||
Reference in new issue
Block a user