Skip to content

fix(bench): read a button label from the carrier the text fold left it on - #261

Merged
Huxpro merged 1 commit into
new-lynxfrom
fix/lynx-table-harness-folded-text
Aug 31, 2026
Merged

Huxpro merged 1 commit into
new-lynxfrom
fix/lynx-table-harness-folded-text

Conversation

@Huxpro

@Huxpro Huxpro commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

The deterministic lynx-table harness cannot mount on new-lynx head. node run.mjs fails with timed out waiting for mount, which is what bench.yml runs as its --quick entry, so the Bench workflow fails on this head.

buttonTapToken looked for a raw-text node whose text equalled the button label:

findAll(papi, (node) => node.type === 'raw-text' && node.text === label)

#250 folds a compile-time-known text child onto its <text> host, so for a static label no such node exists — the content is an attribute write on the host itself. Every driven interaction in this harness starts from a tap token found this way, so nothing after mount runs.

labelTextOf already read a row's label from either carrier (children first, host as fallback). That reader was correct across the fold; the button reader was not. Both now share one helper.

Found while building the §7 ablation for #246, which needs this harness as the semantic control for a create A/B.

Why

This is the harness that carries the per-operation command-count and serialized-commit-byte gates — the deterministic half of the lynx-table evidence, against which the Chromium harness's wall clock is explicitly ungated. It has been dead since #250 merged.

benchmarks/ is in no vitest.config.js project, so pnpm test does not reach it. bench.yml does, via node benchmarks/bench.mjs --quick --ratios → LYNX_TABLE_SCALES=1000 node run.mjs 1. That job has not produced a verdict during the CI outage reported on #257, which is why a merge could land on top of a broken gate.

Changes

  • benchmarks/lynx-table/workload.ts
    • textContentOf(node) — a <text> host's content from whichever carrier holds it: children joined, host text as fallback. Extracted from labelTextOf, which keeps its behaviour and now calls it.
    • buttonTapToken matches a <text> host by textContentOf, then walks up for the tap token. Holds whether or not a given label is foldable, so it does not encode which choice the compiler made.
    • until() takes an optional describer and appends it to the timeout message. The mount wait passes one naming the <text> contents actually painted.

The describer is the second half of the fix. A predicate over the painted tree fails identically whether the app rendered nothing or rendered something the predicate no longer recognizes, and those need opposite fixes. Before, that difference cost a two-minute run and produced one line with nothing in it. Now:

Error: timed out waiting for mount; no tappable ancestor of a <text> reading
"Create 1,000 rows"; painted: "Octane UI Benchmark on Lynx · ready",
"Create 1,000 rows", "Create 3,000 rows", …, +1 more

The label is right there in the list — which says outright that the app rendered and the predicate could not reach it.

Validation

  • pnpm format:check

  • pnpm typecheck

  • pnpm test

  • targeted: LYNX_TABLE_SCALES=1000 node run.mjs 1 — exit 0, and the gates report

    rows= 1000  create=1 (1000r, 0/4000 refs)  update10th=100 (100r)  select=2 (256B, 2r)
    swap=2 (395B, 0r)  updateStorm=50c/5000 (5000r)  selectStorm=30c/60 (60r)
    clear=1 (+7000 synth)  recreate=1 (1000r)
    
  • mutation test: restoring the old raw-text predicate reproduces the timeout, and produces the new diagnostic quoted above. Red without the fix, green with it.

  • pnpm format:files benchmarks/lynx-table/workload.ts — unchanged.

  • pnpm sync — clean.

Not run: pnpm typecheck does not reach this file. pnpm typecheck:files benchmarks/lynx-table/workload.ts answers No TypeScript project includes: — workload.ts is compiled by the Vite build inside run.mjs, which strips types without checking them. A standalone tsc --noEmit --strict over the file reports nothing on the changed lines (its other diagnostics are the .tsrx import and two pre-existing wire-shape widenings, all present before this change). Bringing the benchmark sources under a TS project is a larger call than this fix and is left alone.

Risk / follow-ups

  • Benchmark-only; no published package changes, so no changeset.
  • The wider gap this exposes: bench.yml is the only thing that runs run.mjs, and it takes ~2 minutes to fail. While the Actions outage on perf(lynx): look up a declared host by binary search over ordered runs #257 persists, a change to text lowering or the fake PAPI can break this gate again without anything saying so.
  • Branch naming: the harness assigned claude/octane-issue-66-phase-a-7wz97z, but create-a-pr requires a fix/-prefixed topic branch so the label workflow can read the type from the branch. Flagging rather than resolving unilaterally.

Provenance

  • An agent produced this diff (agent-authored)

Generated by Claude Code

…t on

`buttonTapToken` looked for a `raw-text` node whose text equalled the
label. Issue #250 folds a compile-time-known text child onto its `<text>`
host, so for a static label there is no such node: the content is an
attribute write on the host. Every driven interaction in the deterministic
lynx-table harness starts from a tap token found this way, so `run.mjs`
could not find the create button and died after 200 settle turns with
`timed out waiting for mount`. That is the harness carrying the
per-operation command-count and commit-byte gates, and `bench.yml` runs it
as `--quick`, so the Bench workflow fails on this head.

The predicate now reads a `<text>` host's content the way `labelTextOf`
already read a row's: children first, host as the fallback. That covers
both carriers without asking which one the compiler chose, so it holds
whether or not a given label is foldable. Both readers share the helper.

The wait also reports what it saw. A predicate over the painted tree fails
identically whether the app rendered nothing or rendered something the
predicate no longer recognizes, and those need opposite fixes; this one
took a two-minute run to produce one unhelpful line. On timeout it now
names the `<text>` contents actually painted, which states the difference
outright.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
@Huxpro
Huxpro marked this pull request as ready for review August 31, 2026 15:18
@Huxpro
Huxpro merged commit 33d9358 into new-lynx Aug 31, 2026
17 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant