Skip to content

Commit 99b116e

Browse files
authored
Merge branch 'main' into fix/static-receiver-confidence-1398
2 parents 4d1cd53 + cf73bbc commit 99b116e

2 files changed

Lines changed: 36 additions & 43 deletions

File tree

tests/integration/this-dispatch-scope.test.ts

Lines changed: 29 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -72,47 +72,36 @@ describe.each(ENGINES)('this-dispatch scope (%s)', (engine) => {
7272
).toBeDefined();
7373
});
7474

75-
// Native binary v3.11.2 does not include the edge_builder.rs fix for issue #1324 yet.
76-
// These assertions are active for WASM and will be re-enabled for native once a new
77-
// binary is published that includes the Rust fix.
78-
if (engine === 'native') {
79-
it.todo('does NOT emit Shape.describe → Calculator.area (native binary gap #1324)');
80-
it.todo('does NOT emit Shape.describe → Formatter.area (native binary gap #1324)');
81-
it.todo(
82-
'does NOT emit Caller.run → Sibling.area (single-match false-positive, native binary gap #1324)',
75+
it('does NOT emit Shape.describe → Calculator.area (unrelated class, same method name)', () => {
76+
const edge = callEdges.find(
77+
(e) => e.caller_name === 'Shape.describe' && e.callee_name === 'Calculator.area',
8378
);
84-
} else {
85-
it('does NOT emit Shape.describe → Calculator.area (unrelated class, same method name)', () => {
86-
const edge = callEdges.find(
87-
(e) => e.caller_name === 'Shape.describe' && e.callee_name === 'Calculator.area',
88-
);
89-
expect(
90-
edge,
91-
`Expected NO Shape.describe → Calculator.area edge (false-positive from same-file scan).\nActual edges:\n${JSON.stringify(callEdges, null, 2)}`,
92-
).toBeUndefined();
93-
});
79+
expect(
80+
edge,
81+
`Expected NO Shape.describe → Calculator.area edge (false-positive from same-file scan).\nActual edges:\n${JSON.stringify(callEdges, null, 2)}`,
82+
).toBeUndefined();
83+
});
9484

95-
it('does NOT emit Shape.describe → Formatter.area (unrelated class, same method name)', () => {
96-
const edge = callEdges.find(
97-
(e) => e.caller_name === 'Shape.describe' && e.callee_name === 'Formatter.area',
98-
);
99-
expect(
100-
edge,
101-
`Expected NO Shape.describe → Formatter.area edge (false-positive from same-file scan).\nActual edges:\n${JSON.stringify(callEdges, null, 2)}`,
102-
).toBeUndefined();
103-
});
85+
it('does NOT emit Shape.describe → Formatter.area (unrelated class, same method name)', () => {
86+
const edge = callEdges.find(
87+
(e) => e.caller_name === 'Shape.describe' && e.callee_name === 'Formatter.area',
88+
);
89+
expect(
90+
edge,
91+
`Expected NO Shape.describe → Formatter.area edge (false-positive from same-file scan).\nActual edges:\n${JSON.stringify(callEdges, null, 2)}`,
92+
).toBeUndefined();
93+
});
10494

105-
// single-sibling.ts: only one class (Sibling) has area(); Caller does not.
106-
// The single-match arm must still check the caller's own class — Caller.run
107-
// must not gain a false edge to Sibling.area.
108-
it('does NOT emit Caller.run → Sibling.area (single-match false-positive, same-file scan)', () => {
109-
const edge = callEdges.find(
110-
(e) => e.caller_name === 'Caller.run' && e.callee_name === 'Sibling.area',
111-
);
112-
expect(
113-
edge,
114-
`Expected NO Caller.run → Sibling.area edge (false-positive from single-match suffix scan).\nActual edges:\n${JSON.stringify(callEdges, null, 2)}`,
115-
).toBeUndefined();
116-
});
117-
}
95+
// single-sibling.ts: only one class (Sibling) has area(); Caller does not.
96+
// The single-match arm must still check the caller's own class — Caller.run
97+
// must not gain a false edge to Sibling.area.
98+
it('does NOT emit Caller.run → Sibling.area (single-match false-positive, same-file scan)', () => {
99+
const edge = callEdges.find(
100+
(e) => e.caller_name === 'Caller.run' && e.callee_name === 'Sibling.area',
101+
);
102+
expect(
103+
edge,
104+
`Expected NO Caller.run → Sibling.area edge (false-positive from single-match suffix scan).\nActual edges:\n${JSON.stringify(callEdges, null, 2)}`,
105+
).toBeUndefined();
106+
});
118107
});

tests/search/embedding-regression.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,20 @@ describe.skipIf(!hasTransformers)('embedding regression (real model)', () => {
6868
dbPath = path.join(tmpDir, '.codegraph', 'graph.db');
6969

7070
// Build embeddings with the smallest/fastest model.
71-
// Skip gracefully when HuggingFace rate-limits the model download (HTTP 429)
72-
// or when the network is unavailable (ECONNRESET, ETIMEDOUT, ENOTFOUND,
73-
// ECONNREFUSED, ERR_HTTP2_STREAM_CANCEL, ERR_HTTP2_SESSION_ERROR).
71+
// Skip gracefully when HuggingFace rate-limits the model download (HTTP 429),
72+
// when the network is unavailable (ECONNRESET, ETIMEDOUT, ENOTFOUND,
73+
// ECONNREFUSED, ERR_HTTP2_STREAM_CANCEL, ERR_HTTP2_SESSION_ERROR), or when
74+
// HF's fetch layer times out. buildEmbeddings wraps HF failures as EngineError
75+
// (code: ENGINE_UNAVAILABLE), losing the original errno, so we also match the
76+
// "timeout" substring from HF's "Request timeout error occurred" message.
7477
try {
7578
await buildEmbeddings(tmpDir, 'minilm', dbPath);
7679
} catch (err: unknown) {
7780
const msg = err instanceof Error ? err.message : String(err);
7881
const code = (err as NodeJS.ErrnoException).code ?? '';
7982
const isNetworkError =
8083
msg.includes('429') ||
84+
msg.toLowerCase().includes('timeout') ||
8185
code === 'ECONNRESET' ||
8286
code === 'ETIMEDOUT' ||
8387
code === 'ENOTFOUND' ||

0 commit comments

Comments
 (0)