Linka on Discord (v0.1.3199, a Docker magpie added as a Remote magpie):
Usage › Context showed "undefined is not an object (evaluating 'r.cost')".
Cause: since v0.1.3120 (6b91c2ea5, fcc0daa23) /api/tune sends "few"
rows, a setting put in with too few calls to weigh, with no compact
and no ttl. A page from before then reads `(a.compact || a.ttl).cost`
and throws on such a row. No Go code relays /api/tune from a Remote
magpie, so the throw needs a page from v0.1.3119 or earlier against a
newer server, such as a window left open while the container updated
(the page reloads only when /api/update is asked). Today's page
survives few rows but still threw on a null agent or row ("null is
not an object (evaluating 'a.advice')") and on a row with no setting.
loadTune now keeps only the agents and rows that are objects, and the
rows with a compact or ttl replay or few: true, each with a setting
object. Every reader of advice (adviceRow, tuneCard's totals,
renderTune's filter, the few checks) reads that normalized tuneData.
Two long comments in context.js were cut to pay for it. The core
script budget is not raised.
Run (mote):
- context-tune-shapes.test.cjs (new), Chromium and WebKit, en and zh,
900 and 420px: 20 of 20 ok.
- context-tune, i18n-keys, TestCoreScriptBudget: ok, except i18n-keys'
"a plugin's words are its own", red on main as #5332, #5426, #5482.
- Every context*.test.cjs and routing-context-fold.test.cjs at this
head and at origin/main 82403f9f6: 484 ok / 2 red here, 464 ok / 2
red there. The red on both is routing-context-fold's WebKit
ResizeObserver loop error (#5586).
- The whole GUI suite under the suite lock is still running. Its reds
so far are on pages this change doesn't reach. Each one that is red
on main too gets its own issue.
Broken by hand: the new test run against v0.1.3119's assets
(MAGPIE_ASSETS) fails 20 of 20, with Linka's exact text in WebKit
("undefined is not an object (evaluating 'r.cost')") and "Cannot read
properties of undefined (reading 'cost')" in Chromium. Against the
assets of origin/main before this change, its unknown-shapes case
fails in both engines on the null agent.
Not tried: Linka's real Docker setup, or a real old page left open
across a server update. The Go suite was not run, since there is no
Go change.
Reported-by: Linka (Discord)