diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-08-17 02:16:28 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-08-17 02:16:28 +0200 |
| commit | 42047dac4041e72e09499e3adf145f1c0f83b284 (patch) | |
| tree | b816f20fd8b3b190faa69473b7a2892f3bfc9706 /packaging | |
| parent | f5c4c058aa7e91fbdbbdd8cf34042535a05df433 (diff) | |
| download | meshbay-42047dac4041e72e09499e3adf145f1c0f83b284.tar.gz | |
test(hub): a hook that depends on one declared below it never runs
`const a = useCallback(fn, [b])` evaluates `[b]` where it is written, so a `b`
further down the component is still in its temporal dead zone. ReferenceError on
every render, before anything the component does can run — and the symptom is
the component simply not appearing. Clicking a video did nothing at all: no
picture, no error on screen, nothing in the node's log because nothing was ever
requested. It reached production.
Nothing caught it. `node --check` passes, the code is well-formed. Worse, the
MSE harness extracts the player functions into an order of its own and therefore
*reordered* them before running — quietly repairing the one class of defect it
was best placed to catch. It sorts by position in the file now, and
test_hook_ordering.py checks the property directly across the whole SPA. Both
the rule and the harness are checked against the layout that actually shipped.
test_video_seek.py covers the rest of seeking, and window_leak.mjs forces the
race that made the third seek hang: the whole in-flight window arriving while
`reinitAt` is still awaiting. Before, the player is left believing eight
segments are in flight and grants nothing; after, the window comes back. A run
that happens to work proves nothing about a race, which is the point of forcing
the worst case rather than trusting a longer session.
Diffstat (limited to 'packaging')
0 files changed, 0 insertions, 0 deletions