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:
morluto
2026-10-17 21:57:31 +08:00
parent 926e18b3fc
commit f4322b15ed
34 changed files with 892 additions and 293 deletions
@@ -1050,18 +1050,18 @@ it("projects and adopts more than the default per-file capacity when explicitly
const steps = projectJavaScriptSemanticFileSteps(
file,
analyzeJavaScriptSemantics(text),
20_002,
{ nodes: 20_002, unknowns: 20_002 },
);
let result = steps.next();
while (!result.done) result = steps.next();
expect(result.value.nodes).toHaveLength(20_002);
expect(result.value.truncated).toBe(false);
expect(result.value.nodesTruncated).toBe(false);
const projection = createJavaScriptSemanticGraphProjection({
totalNodes: 20_010,
fileNodes: 20_002,
});
projection.adoptFileProjection(result.value);
expect(projection.remainingFileNodeBudget()).toBe(8);
expect(projection.remainingFileCapacity().nodes).toBe(8);
const graph = projection.finish(SHA256, {
graph_id: `jag_${"b".repeat(64)}`,
nodes: [],