Skip to content

feat(search): match feature gates by SIMD number - #1251

Merged
Woody4618 merged 1 commit into
solana-foundation:masterfrom
hoodieshq:feat/feature-gate-simd-search
Aug 27, 2026
Merged

feat(search): match feature gates by SIMD number#1251
Woody4618 merged 1 commit into
solana-foundation:masterfrom
hoodieshq:feat/feature-gate-simd-search

Conversation

@askov

@askov askov commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Description

Feature gates registered before the SIMD process carry no SIMD number in their title — MoveStake and MoveLamports is SIMD 148 — so the search bar could not reach them at all. This matches the registry's simds field alongside the title.

Accepted spellings: 148, 0148, simd148, simd 148, SIMD-0148. Registry entries are zero-padded and carry stray upstream whitespace (['0178', ' 0189', ' 0377']), so both sides of the comparison parse to a decimal number.

A SIMD number matches exactly, not as a prefix, because it is frequently a valid epoch or block number too — 35 of the numbers now reachable are past Solana epochs. For the same reason the provider's priority drops below the block and epoch providers in the local tier, so typing 219 still lists Epoch #219 above the feature gate.

Query parsing lives in app/features/search/lib/parse-simd-number.ts, beside the existing parse-natural-number.ts, where it is covered without touching the registry. parseNaturalNumber itself cannot serve here: it rejects zero-padding, which the registry stores.

Type of change

  • New feature

Testing

Manual testing on the preview deployment — open the search bar and type the query:

Destination pages the rows above navigate to:

Related Issues

Closes HOO-1185

Checklist

  • My code follows the project's style guidelines
  • I have added tests that prove my fix/feature works
  • All checks pass locally (pnpm test, pnpm lint, pnpm typecheck)
  • I have run build:info script to update build information

Additional Notes

Two things worth a reviewer's eye:

  • The registry carries SIMD 0162 twice, on two keys, under the identical title Remove accounts executable flag checks. Querying 162 therefore returns two rows that only the address sublabel distinguishes. Both rows are legitimate accounts, so this PR leaves them as-is.
  • The provider tests derive their cases from the committed feature-gates.json rather than from fixtures, since scripts/feature-gates/ regenerates that file from upstream. Each derivation throws with a specific message if the registry stops carrying the shape it needs, so a regeneration that invalidates a case fails loudly instead of passing silently.

Feature gates registered before the SIMD process carry no SIMD number in
their title, so the search bar could not reach them. Match the registry's
`simds` field alongside the title, accepting `148`, `0148`, `simd148`,
`simd 148` and `SIMD-0148`.

A SIMD number matches exactly, not as a prefix. It is often a valid epoch
or block number too, so the provider now ranks below the block and epoch
providers in the local tier.

Parsing lives in `lib/parse-simd-number.ts` beside `parse-natural-number`,
covered there without the registry.
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

@askov is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR extends feature-gate search to match exact SIMD numbers while preserving title matching and ranking numeric block and epoch results first.

  • Adds dedicated parsing for bare, prefixed, zero-padded, and whitespace-padded SIMD numbers.
  • Matches parsed queries against each feature gate’s registry simds entries.
  • Adds parser, provider, registry-ordering, and generated-registry coverage.
  • Refreshes recorded build-size information.

Confidence Score: 5/5

The PR appears safe to merge with no concrete correctness, security, or build failures identified.

The parser accepts the documented spellings while rejecting malformed entries, matching remains exact against the current registry shape, and provider ordering does not hide or suppress feature-gate results.

Important Files Changed

Filename Overview
app/features/search/lib/parse-simd-number.ts Adds strict decimal SIMD parsing with intentional support for prefix variants, zero-padding, and registry whitespace.
app/features/search/model/feature-gate-search-provider.ts Extends feature-gate matching to exact normalized SIMD numbers and lowers provider priority without introducing an observable search regression.
app/features/search/lib/tests/parse-simd-number.test.ts Covers accepted SIMD query forms and rejects malformed numeric representations.
app/features/search/model/tests/feature-gate-search-provider.test.ts Verifies registry-derived SIMD matches, duplicate gate results, exact matching, and malformed or absent values.
app/features/search/model/tests/registry.test.ts Adds an ordering assertion that block and epoch providers precede feature-gate results.
bench/BUILD.md Refreshes two generated bundle-size measurements with no runtime impact.

Reviews (1): Last reviewed commit: "feat(search): match feature gates by SIM..." | Re-trigger Greptile

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer Ready Ready Preview Aug 27, 2026 10:49am

Request Review

@rogaldh rogaldh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Woody4618
Woody4618 merged commit 1c8cdd5 into solana-foundation:master Aug 27, 2026
14 checks passed
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.

3 participants