Skip to content

fix(news): match complete ticker tokens in Symbol filters - #1743

Draft
luokerenx4 wants to merge 1 commit into
devfrom
codex/news-symbol-boundaries
Draft

luokerenx4 wants to merge 1 commit into
devfrom
codex/news-symbol-boundaries

Conversation

@luokerenx4

@luokerenx4 luokerenx4 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

News → Symbol currently returns ordinary words for short tickers: F matches “Fed cuts rates”. This Draft fixes only the production and demo list filters for #1387; Keyword search remains a substring search.

Review order: 1 of 2. This PR remains based on dev at head 232c6f0a661881a7cf4bd8a61441b72191da2a36. Dependent Draft #1755 now targets codex/news-symbol-boundaries and includes this exact commit. Review this ticker-boundary fix first, then #1755's provenance delta; its combined head is d93911d1fd4d7e4c85711dddd4ce7de4c439ef22. Both original intents remain separately reviewable and the overlapping predicates are already reconciled.

flowchart TD
  A[Symbol F] --> B[Existing news list filter]
  B --> C[Before: substring match - defective]
  C --> D[Fed cuts rates included]
  B --> E[Review 1 - PR 1743: compare complete ticker tokens]
  E --> F[F announces earnings included; Fed excluded]
  G[Review 2 - dependent PR 1755] --> H[Exclude source and unknown category evidence]
  H --> E
  E --> I[Apply result limit after matching]
Loading

The existing routes keep ownership of filtering before the result limit. Replace their Symbol substring check with a small Unicode-aware token comparison; retain dots, hyphens, slashes, colons, carets and equals inside ticker tokens. No registry, company inference, provider request, or persisted state is added. The demo mirrors the same rule.

Tradeoff: this is lexical matching, not evidence of a company association. A standalone ordinary word equal to a ticker can still match. Case-insensitive behavior remains intentional. Feed/tag provenance is separately assigned to #1380/#1381.

Validation:

  • Production HTTP and MSW demo regression suites: 28 tests passed, including F/A/T, BRK.B, BTC-USD, ^GSPC, 2330.TW and EURUSD=X, keyword behavior and filtering before limiting.
  • Root and UI TypeScript checks passed after building the existing shared protocol packages.
  • Real Chromium demo route: Symbol F shows no unrelated stories; NVDA shows its expected story.
  • git diff --check passed.
  • Full hermetic suite completed: 890 files passed, 9 failed, 1 skipped; 7,608 tests passed, 49 failed, 6 skipped. Failures report missing node-pty and Electron binaries, missing bundled Git (Workspace absorb/upgrade suites), and npm cache ENOENT under the non-writable default home. News and UI tests passed; the full suite is not green.
  • Standard frozen install could not download bundled Git (ECONNREFUSED). Frozen install with lifecycle scripts disabled completed; native/Git-dependent full-suite checks therefore have an environment gap. No dependency or lockfile changes.

Four files, 44 insertions / 2 deletions. Based on current dev 4813c1b89d8c151a7853f717e31629f3ec1f3b4c. No merge, release, deployment or issue closure requested.

Pushed head 232c6f0a661881a7cf4bd8a61441b72191da2a36 verified against the remote branch. GitHub clean-build passed on that SHA.

Stack acceptance: #1755's four combined regression cases run against both production and demo. Deliberately restoring substring matching makes all four fail; restoring source/unknown category evidence also makes all four fail. The intended integrated tree passes 137 focused tests plus root, UI and registered-suite typechecks. The child head d93911d1fd4d7e4c85711dddd4ce7de4c439ef22 passed clean-build and the integrated Chromium Symbol/Keyword check. CI and verification details are recorded on #1755.

When accepted, integrate #1743 first while preserving its commit ancestry, then retarget #1755 to dev. Do not take either old predicate wholesale or cherry-pick a conflicting standalone patch: the child branch already contains the resolved composition. Neither PR has been merged.

@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
openalice-demo Ready Ready Preview Oct 2, 2026 10:21am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 232c6f0a Deployed Oct 2, 2026 by vercel[bot]
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.

2 participants