Skip to content

Relevance filter (decision model per file) + playground - #2

Merged
mikkel merged 6 commits into
mainfrom
cursor/relevance-filter-915b
Oct 12, 2026
Merged

mikkel merged 6 commits into
mainfrom
cursor/relevance-filter-915b

Conversation

@mikkel

@mikkel mikkel commented Oct 12, 2026

Copy link
Copy Markdown
Member

From Patchling: opt-in per-file yes/no relevance filter via NanoGPT (default xiaomi/mimo-v2.6-flash), fail-open, retries, lockfile skip; playground on site. 131 tests.

cursoragent and others added 4 commits October 12, 2026 19:20
filterRelevant asks a cheap model, per file, whether that file matters to the task. Only yes files are included when buildEnvironment is given those decisions. The patchling.app playground exposes the pass with a toggle, a decision-model picker, and bundled sample projects.

Co-authored-by: ntc-ai <ntc-ai@users.noreply.github.com>
Use gemini-2.0-flash, the same size and binary policies, and camelCase
decision fields. A truncated yes still forwards the original file, and a
path can persist the cache as versioned JSON in Node.

Co-authored-by: ntc-ai <ntc-ai@users.noreply.github.com>
Raise the filter completion cap, send reasoning_effort low, and treat an
empty answer as an error that is not cached. Retry timeouts and HTTP 5xx,
count files that failed open, and skip lockfiles and generated paths.
Default model is xiaomi/mimo-v2.6-flash.

Co-authored-by: ntc-ai <ntc-ai@users.noreply.github.com>
Node 18's test runner does not expose crypto, so SHA-256 via the bare
global threw and every filter test failed open. Use globalThis.crypto
when it is present, and node:crypto's webcrypto export otherwise.

Co-authored-by: ntc-ai <ntc-ai@users.noreply.github.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Deploying patchling with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2c121ba
Status: ✅  Deploy successful!
Preview URL: https://b9f86e5e.patchling.pages.dev
Branch Preview URL: https://cursor-relevance-filter-915b.patchling.pages.dev

View logs

cursoragent and others added 2 commits October 12, 2026 22:05
Prompt version 3. The cache key hashes the path, the body that was sent,
and the reasoning effort, and a malformed answer fails open without being
stored. Truncation stays on a code point, and a short UTF-8 tail is not
binary. Flask recall 1.0 and 0.8x token figures are unverified.

Co-authored-by: ntc-ai <ntc-ai@users.noreply.github.com>
Hash length-prefixed fields with a colon, including mode, note, and the
effort that was actually sent. Count Unicode code points, decode valid
UTF-8 bytes, and fail open on a bad response envelope. The playground
keeps going when no file is relevant, ignores a stale run, and shows
classifier tokens.

Co-authored-by: ntc-ai <ntc-ai@users.noreply.github.com>
@mikkel
mikkel marked this pull request as ready for review October 12, 2026 22:59
@mikkel
mikkel merged commit 693ee81 into main Oct 12, 2026
6 checks passed
@mikkel
mikkel deleted the cursor/relevance-filter-915b branch October 12, 2026 22:59
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