fix(native): promote this-dispatch scope tests from todo to active#1423
Conversation
…tive The class-scoped this-dispatch fix (edge_builder.rs #1343) is now present in the Rust source and compiled by CI for every PR. Remove the engine guard that was skipping three negative assertions for native and the comment that referenced the v3.11.2 binary gap. All four this-dispatch-scope assertions now run for both wasm and native: - emits Shape.describe → Shape.area (positive case) - does NOT emit Shape.describe → Calculator.area (false-positive guard) - does NOT emit Shape.describe → Formatter.area (false-positive guard) - does NOT emit Caller.run → Sibling.area (single-match false-positive guard) Closes #1413
|
Claude finished @carlos-alm's task —— View job PR Review — fix(native): promote this-dispatch scope tests from todo to active
Root Cause AnalysisProblem Being Solved: Three test assertions in Why This Approach: The code in Risk Assessment: Low. This is a pure test-promotion change. No production code is modified. No assertions are weakened — three previously skipped Phase 2: Configuration Change DetectionNo linting rules, TypeScript flags, test timeouts, or build configuration changed. ✓ Phase 3: Test IntegrityNo red flags. The changes are strictly test-strengthening:
The One minor note: the PR description references commit Phase 4: Code QualityThe resulting test file is strictly cleaner. The removed
Phase 5: Backlog Compliance
Final Assessment |
Greptile SummaryThis PR promotes three negative-assertion tests from
Confidence Score: 5/5Safe to merge — both changes are test-only and the underlying Rust fix that makes the native assertions correct is already compiled into the binary used by CI. The this-dispatch changes are a straight mechanical promotion of three previously-skipped assertions; no production logic is touched. The timeout substring addition in the embedding regression guard is narrow in scope and correctly handles the HF error-wrapping case described in the comment. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["describe.each(ENGINES)\n['wasm', 'native']"] --> B["beforeAll: buildGraph fixture"]
B --> C["it: emits Shape.describe → Shape.area\n✅ both engines"]
B --> D["it: does NOT emit Shape.describe → Calculator.area\n✅ both engines (was native .todo)"]
B --> E["it: does NOT emit Shape.describe → Formatter.area\n✅ both engines (was native .todo)"]
B --> F["it: does NOT emit Caller.run → Sibling.area\n✅ both engines (was native .todo)"]
G["buildEmbeddings\n(embedding-regression)"] --> H{Error thrown?}
H -- No --> I["run regression tests"]
H -- Yes --> J{isNetworkError?}
J -- "msg includes '429'" --> K["rateLimited = true\nskip all tests"]
J -- "msg includes 'timeout' (NEW)" --> K
J -- "code: ECONNRESET / ETIMEDOUT\n/ ENOTFOUND / etc." --> K
J -- "other error" --> L["re-throw → CI failure"]
Reviews (8): Last reviewed commit: "Merge branch 'main' into fix/native-this..." | Re-trigger Greptile |
|
Addressed Claude's review:
|
…CI (#1423) buildEmbeddings wraps all HuggingFace load failures as EngineError (code: ENGINE_UNAVAILABLE), which causes the original ETIMEDOUT errno to be lost. The Windows CI runner timed out downloading the ONNX model, but the existing network-error guard only matched on raw errno codes, so the error was re-thrown and failed the test suite. Add msg.toLowerCase().includes('timeout') to also catch HF's 'Request timeout error occurred' message propagated through the EngineError wrapper.
|
Fixed CI failure: the Windows CI was failing in Fix: added |
Summary
if (engine === 'native')guard that was skipping three negative assertions with.todointhis-dispatch-scope.test.tsedge_builder.rsin fix(edge_builder): restrict same-file this-dispatch fallback to caller's own class #1343 (commit16af0e0), and the prototype extraction was added to the Rust extractor before v3.11.2; CI compiles the native addon from source on every PR so the binary used in tests already includes both fixeswasmandnativeenginesCloses #1413