Files
meshcore-analyzer/.github/workflows
Kpa-clawbot aa63a478a7 fix(#1392): test-live.js — load packet-helpers.js in makeLiveSandbox, wire into CI (#1393)
## Root cause

`makeLiveSandbox()` in `test-live.js` didn't load
`public/packet-helpers.js`, so `window.getParsedDecoded` /
`getParsedPath` were undefined. The `dbPacketToLive` and
`expandToBufferEntries` suites failed all 8 assertions with
`getParsedDecoded is not a function`. The `expandToBufferEntriesAsync`
suite was unaffected because it builds its sandbox manually and already
loads packet-helpers.js.

## Fix

- `test-live.js`: load `public/packet-helpers.js` in `makeLiveSandbox()`
before `live.js`. Mirrors the working pattern in
`expandToBufferEntriesAsync`.
- `.github/workflows/deploy.yml`: wire `node test-live.js` into the "Run
JS unit tests" step so this can't silently regress again.
- Adjusted one cross-realm `deepStrictEqual([], [])` → `.length === 0`
because the array literal lives inside the vm sandbox; host-side
`deepStrictEqual` rejects the proto mismatch even when the value is
semantically equal. Test-harness only.

No production code change.

## Mutation verification

With the new `loadInCtx(ctx, 'public/packet-helpers.js')` line removed,
all 8 original assertions return (`getParsedDecoded is not a function`).
With the fix in place, `node test-live.js` exits 0 — 95 passed, 0
failed.

## CI wire

`node test-live.js` now runs in deploy.yml under "Run JS unit tests
(packet-filter)" alongside the other root-level test files. YAML
validated with `yaml.safe_load`.

Fixes #1392

Co-authored-by: openclaw-bot <bot@openclaw.dev>
2026-05-26 06:36:03 +00:00
..