Repository navigation
filterRelevant: reject Python-style snake_case options - #7
Merged
Merged
Conversation
{ on_binary: 'include' } used to be ignored silently, so the default
exclude applied. Snake_case names from patchling-py now throw a
TypeError naming the camelCase option, before any model call.
Audited filter_relevant() in patchling-py (relevance.py @ bf9c8f0). Adds skip_patterns (use ignore), max_attempts (retries = max_attempts - 1), retry_backoff (retryBaseMs = seconds * 1000) and sleep (not supported in JS; use retryBaseMs: 0 in tests). The error names the JS option and the conversion, and is thrown before any model call. Tests run against both src/ and landing/lib/.
Deploying patchling with
|
| Latest commit: |
0a9c6fe
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4d7caea9.patchling.pages.dev |
| Branch Preview URL: | https://cursor-js-filter-snake-case.patchling.pages.dev |
mikkel
marked this pull request as ready for review
October 14, 2026 03:51
This was referenced Oct 15, 2026
mikkel
added a commit
that referenced
this pull request
Oct 20, 2026
) * feat: throw SmartApplyError when smartapply refuses a model rewrite Add SmartApplyError (extends Error, name 'SmartApplyError'), matching patchling-py. smartapply throws it, with the same message as before, when the model's rewrite changes lines the diff did not add or remove and the edit cannot be replayed from the +/- lines. Provider and network errors are not wrapped and still propagate as the original error object. Export it from src/index.js. Regenerate the .d.ts files with npm run types; this also brings src/filter.d.ts up to date for SNAKE_CASE_OPTIONS and the filterRelevant @throws note, which were not regenerated in #7. No landing/lib change: gptdiff.js and index.js are not vendored there. * docs(changelog): note SmartApplyError as a 0.3.1 behavior change The 0.3.1 summary said there was no change to smartapply. Refusals now throw SmartApplyError: err.name, the constructor/class and the printed form (String(err), stack first line) change. The message text and the passthrough of provider/LLM errors do not. --------- Co-authored-by: mikkel <7003+mikkel@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
filterRelevant now throws a clear error for on_binary, max_bytes, reasoning_effort before any model call (previously silently ignored). Mirrored in landing/lib; README note. npm test 189 pass / 0 fail.