Skip to content

fix(plugins): label search scores accurately - #178

Merged
Paul-Kyle merged 1 commit into
phasespace-labs:mainfrom
WilliamK112:fix/plugin-match-labels-175
Sep 2, 2026
Merged

fix(plugins): label search scores accurately#178
Paul-Kyle merged 1 commit into
phasespace-labs:mainfrom
WilliamK112:fix/plugin-match-labels-175

Conversation

@WilliamK112

Copy link
Copy Markdown
Contributor

Summary

  • render vector-hit similarity from raw_score in both TypeScript implementations
  • distinguish explicit-null BM25 hits from legacy responses where raw_score is absent
  • widen the shared wire type and add regression coverage for the shared core, Cline binding, and OpenClaw tool
  • document the user-visible correction under Unreleased

The OpenClaw renderer and the Pi/Cline shared core remain separate in-place implementations, as requested. Their wording now follows the existing Python three-case contract.

Validation

  • Python: 3,392 passed, 10 skipped, 5 expected failures
  • Ruff and Bandit
  • HTTPX monopoly and write choke-point checks
  • OpenClaw: 63 tests plus strict source type-check
  • Shared core: 25 tests and build
  • Cline: 17 tests and build
  • Pi: 8 tests and build

Fixes #175

AI-assisted implementation; I reviewed the complete diff and validated it with the checks above.

Render vector similarity from raw_score, distinguish explicit-null BM25 hits from legacy responses, and preserve fused values only as labelled ranks across the shared TypeScript core and OpenClaw plugin.

Add regression coverage for all three wire shapes and document the user-visible fix.
@Paul-Kyle

Copy link
Copy Markdown
Member

Merged — thank you. That is your eighteenth here, and it closes the fused-rank arc: five renderer surfaces across six files, all now saying what they actually know.

The part worth naming is that you cleared the trap the issue warned about rather than the one it looked like. Widening raw_score to number | null makes the runtime shape visible but does not force anything — r.raw_score ?? r.score still compiles clean against the wider type. You branched on === null explicitly, and the OpenClaw and shared-core tests each pin all three cases with a not.toContain for the number the old code printed. Reverting just plugins/core/src/index.ts fails the suite; that is the difference between coverage and a regression test.

The arc started with your own abstention measurement on #73 — 32 searches with the answer deliberately absent, every one reporting a top fused score of 1.0. It is a nice symmetry that you closed it.

@Paul-Kyle
Paul-Kyle merged commit 8c16c83 into phasespace-labs:main Sep 2, 2026
9 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.

fix(plugins): two TypeScript renderers still show a fused rank as a similarity

2 participants