Skip to content

a raw placeholder is on the Ethereum tab, and validate let it through twice - #3277

Merged
Flotapponnier merged 1 commit into
devfrom
fix/eth-explainer-count
Oct 24, 2026
Merged

Flotapponnier merged 1 commit into
devfrom
fix/eth-explainer-count

Conversation

@Flotapponnier

@Flotapponnier Flotapponnier commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

My own defect, shipped minutes ago in #3275.

The Ethereum explainer said "across the 7 measured providers" while eleven published, so I replaced the hand-typed number with {{count:chain:ethereum}}. The renderer does not resolve that form — bench-template's CHAIN_TEMPLATE_RE takes best_name, best_p50, worst_name and worst_p50 only, and count exists for :tier: alone. An unmatched token is passed through unchanged, so the live page now reads:

across the {{count:chain:ethereum}} measured providers

A wrong number became a visible placeholder on an indexed URL, which is worse than what it replaced.

Why the clause is removed rather than fixed

Adding a per-chain count to the renderer is not cheap: the chain path has bestPerChain and worstPerChain — a single leader and trailer per chain, not the rows — so there is nothing to count.

And unscoped {{count}} is not a substitute. The Ethereum explainer renders on every tab of the bench (checked on ?chain=all, ?chain=ethereum and ?chain=bsc — present on all three), so on the BNB tab it would print 9 inside a paragraph about Ethereum. The sentence is complete without it.

The part that matters more than the sentence

validate-specs.ts already lints every placeholder, and it passed this one twice. Two holes, and the first hid the second.

1. per_chain_explainer was never in the linted field list, on any spec. The list covers subtitle, seo_*, abstract, disclaimer, findings, methodology and faq. So no token in any per-chain explainer has ever been checked — and that is the field written per chain, therefore the one most likely to carry a chain-scope mistake. Both h2 and body are linted now, and it comes back clean across all 253 specs, so this closes a hole without opening a backlog.

2. With that field linted the token still passed, because the chain branch checked only that the chain value is declared. The tier branch sitting right beside it has always also checked which keywords may carry a tier scope (cannot be tier-scoped); the chain branch had no equivalent. It does now, against a CHAIN_SCOPABLE set that names what CHAIN_TEMPLATE_RE actually resolves.

Tested by reinstating the token, not by reading the diff

The first version of this fix reported ✓ 253 specs valid with the bad token in place — which is exactly how the missing field list was found. After both changes:

✗ benchmarks/evm-quote-latency.yml: per_chain_explainer[0].body:
  {{count:chain:ethereum}} cannot be chain-scoped
1 error.

The spec file was restored byte-identical afterwards. Gates: pnpm validate 253 specs, tsc --noEmit clean, bun test src/ 719 pass.

…et it through

My own defect, shipped minutes ago in #3275. The Ethereum explainer said
"across the 7 measured providers" while eleven published, so I replaced the
hand-typed number with {{count:chain:ethereum}}. The renderer does not
resolve that form: bench-template's CHAIN_TEMPLATE_RE takes best_name,
best_p50, worst_name and worst_p50 only, and count exists for :tier: alone.
An unmatched token is passed through unchanged, so the page now reads
"across the {{count:chain:ethereum}} measured providers" on a live indexed
URL. A wrong number became a visible placeholder, which is worse.

The clause is removed rather than fixed. Adding a per-chain count to the
renderer is not cheap: the chain path has bestPerChain and worstPerChain, a
single leader and trailer per chain, not the rows, so there is nothing to
count. And {{count}} unscoped is not a substitute: the Ethereum explainer
renders on EVERY tab of the bench (checked on ?chain=all, ?chain=ethereum
and ?chain=bsc, present on all three), so on the BNB tab it would print 9
inside a paragraph about Ethereum. The sentence stands without it.

NOW THE PART THAT MATTERS MORE THAN THE SENTENCE. validate-specs.ts already
lints every placeholder, and it passed this one twice.

Two holes, and the first one hid the second.

per_chain_explainer was never in the linted field list, on any spec. The
list covers subtitle, seo_*, abstract, disclaimer, findings, methodology and
faq. So no token in any per-chain explainer has ever been checked, which is
the field written per chain and therefore the one most likely to carry a
chain-scope mistake. Both h2 and body are linted now. Clean across all 253
specs, so this closes a hole without a backlog.

And with that field linted the token still passed, because the chain branch
checked only that the chain value is declared. The tier branch beside it has
always also checked WHICH keywords may carry a tier scope ("cannot be
tier-scoped"); the chain branch had no equivalent. It does now, against a
CHAIN_SCOPABLE set that names what CHAIN_TEMPLATE_RE actually resolves.

Tested by reinstating the exact token, not by reading the diff: the first
version of this fix reported "253 specs valid" with the bad token in place,
which is how the missing field list was found. After both changes:

  ✗ benchmarks/evm-quote-latency.yml: per_chain_explainer[0].body:
    {{count:chain:ethereum}} cannot be chain-scoped
  1 error.

The spec file was restored byte-identical afterwards and validate is green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Flotapponnier
Flotapponnier merged commit fd69707 into dev Oct 24, 2026
2 checks passed
@Flotapponnier
Flotapponnier deleted the fix/eth-explainer-count branch November 3, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant