HS: fix test-456 timeout + add sx_kernel_eval/hs_compile_inspect/hs_parse_inspect tools

- hs-run-filtered.js: add collectionExpressions to _NO_STEP_LIMIT_SUITES (fixes state
  corruption for downstream for-loop tests), add repeat-forever tests to _NO_STEP_LIMIT,
  extend slow deadline for collectionExpressions to 60s
- tests/hs-kernel-eval.js: new standalone Node.js eval script — full WASM kernel +
  mock DOM, accepts HS_EVAL_EXPR/MODE/SETUP/FILES env vars, supports eval/compile/parse modes
- tools/mcp_hs_test.py: add sx_kernel_eval, hs_compile_inspect, hs_parse_inspect tools
- hosts/ocaml/bin/mcp_tree.ml: add host_stubs param to sx_harness_eval (OCaml build pending)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-02 17:45:12 +00:00
parent d25a97d464
commit a3abe47286
4 changed files with 466 additions and 2 deletions

View File

@@ -791,10 +791,13 @@ for(let i=startTest;i<Math.min(endTest,testCount);i++){
"async hypertrace is reasonable",
"hypertrace from javascript is reasonable",
"hypertrace is reasonable",
"repeat forever works",
"repeat forever works w/o keyword",
]);
// Suites where JIT cascade legitimately exceeds the per-test step limit.
const _NO_STEP_LIMIT_SUITES = new Set([
"hs-upstream-core/runtimeErrors",
"hs-upstream-expressions/collectionExpressions",
]);
// Enable step limit for timeout protection — reset counter first so accumulation
// across tests doesn't cause signed-32-bit wraparound (~2B extra steps before limit fires).
@@ -808,6 +811,7 @@ for(let i=startTest;i<Math.min(endTest,testCount);i++){
};
const _SLOW_DEADLINE_SUITES = {
"hs-upstream-core/runtimeErrors": 30000,
"hs-upstream-expressions/collectionExpressions": 60000,
};
_testDeadline = Date.now() + (_SLOW_DEADLINE[name] || _SLOW_DEADLINE_SUITES[suite] || 10000);
globalThis.__hs_deadline = _testDeadline; // expose to WASM cek_step_loop