Spaces:
Sleeping
Sleeping
v10: build the header row from the current dimensions (14 cells sat under 13 labels); add the 5 answerability subtasks to the picker; per-version subtask/category counts
Browse files36 unmodified lines37383940414243444531 unmodified lines77787980818236 unmodified lines// top-level await is not allowed here; init() is async so it settles on its own.// The trailing return hands back the internals the assertions below need.ctx = new Function(script + "\n;return {heads:typeof heads===\"function\"?heads:null,"+ "BASE_HEADS:typeof BASE_HEADS!==\"undefined\"?BASE_HEADS:null,"+ "OWNER_HEADS:typeof OWNER_HEADS!==\"undefined\"?OWNER_HEADS:null,"+ "state:typeof state!==\"undefined\"?state:null,"+ "renderQueue:typeof renderQueue===\"function\"?renderQueue:null};")();} catch (e) {threw = e;31 unmodified lines} else {check(false, "could not reach heads()/OWNER_HEADS from the board script");}// ---- the worker claims several models at once; only one is really running ----if (ctx && ctx.state && typeof ctx.renderQueue === "function") {const rows = [36 unmodified lines373839404142434445464731 unmodified lines79808182838485868788899091929394959697989910010136 unmodified lines// top-level await is not allowed here; init() is async so it settles on its own.// The trailing return hands back the internals the assertions below need.ctx = new Function(script + "\n;return {heads:typeof heads===\"function\"?heads:null,"+ "BASE_HEADS:typeof baseHeads===\"function\"?baseHeads():null,"+ "OWNER_HEADS:typeof OWNER_HEADS!==\"undefined\"?OWNER_HEADS:null,"+ "state:typeof state!==\"undefined\"?state:null,"+ "VERSIONS:typeof VERSIONS!==\"undefined\"?VERSIONS:null,"+ "setDims:(d)=>{DIMS=d;},"+ "renderQueue:typeof renderQueue===\"function\"?renderQueue:null};")();} catch (e) {threw = e;31 unmodified lines} else {check(false, "could not reach heads()/OWNER_HEADS from the board script");}// ---- the header row must follow the version's dimensions, in order ----// BASE_HEADS was a const captured from the default (v7) DIMS at load. Switching to// v10 (14 dims, Answerability inserted before Islam) rendered 14 cells under 13// headers, so every column from Islam onward carried the wrong label.if (ctx && ctx.heads && ctx.VERSIONS && ctx.setDims && ctx.state) {ctx.state.extra = {};for (const v of ctx.VERSIONS) {ctx.setDims(v.dims);const got = ctx.heads().slice(3).map(h => h[0]);const want = v.dims.map(d => d[0]);check(JSON.stringify(got) === JSON.stringify(want),`${v.id}: header keys follow its ${want.length} dimensions in order`);}ctx.setDims(ctx.VERSIONS[0].dims);} else {check(false, "could not reach VERSIONS/setDims from the board script");}// ---- the worker claims several models at once; only one is really running ----if (ctx && ctx.state && typeof ctx.renderQueue === "function") {const rows = [
smoke_board.mjs+20-1