pedroreyesalvarado commented on PR #8637:
URL: https://github.com/apache/texera/pull/8637#issuecomment-6432171030

   @kunwp1 — all three, in `10d377589` and `0935e669e`, on top of a merge with 
main.
   
   **The mid-line match was a real one and I had reasoned my way past it.** 
When I made the prompt require whole lines I argued that checking the start was 
enough, because that is what makes the indentation unambiguous. It is not 
enough for the replacement: `        n = 1` matches `        n = 10` once, so 
the count is 1 and the occurrence badge stays hidden, and Apply leaves the 
trailing `0` behind. The diff offers `n = 1` → `n = 2` and the operator is left 
saying `n = 20`. Both ends are checked now and the function is called 
`matchesWholeLines`.
   
   **The errorType check was unreachable, and you are right that it is not like 
the field checks.** I had kept it as a second barrier by analogy with those, 
but a field can disappear between the analysis and the write, while errorType 
is fixed when the state is published and the analysis already refuses a 
property fix for anything else. It is gone.
   
   **On what can actually be fixed end to end, I checked the repo and it is 
worse than your two cases.** `model_not_found` has no reachable producer at 
all: a 404 from the HuggingFace inference API is retried as a chat completion, 
and when every provider fails the text goes into the result rows through 
`_format_error` rather than being raised — no exception, no ERROR console 
message, no tab. The malformed-id path does raise, but as `ValueError: Invalid 
Hugging Face model ID ...`, which the pattern never matched. The sklearn 
operators have a model field and no remote lookup to 404 on.
   
   So I took the narrowing. Three shapes, Python UDFs only, one kind of fix. 
`NullPointerException` goes with it for the reason you gave: a JVM operator has 
no `code` for Apply to patch.
   
   That left the configuration path with no way in, and dead code is what your 
previous comment was about, so it went too: the property branch of 
`patchedProperties`, `coerceToFieldType`, `type` and `fieldName` on 
`SuggestedFix`, `errorType` on `FixState` (that branch was its only reader), 
the field row in the diff, and the model rule in the prompt. Fourteen test 
blocks went with it — 132 lines added, 346 removed.
   
   One thing I want to flag rather than let it pass. Removing `model_not_found` 
turned my credential test into a test of nothing: it analysed a model error, 
which is now unsupported, so the model was never called and the assertion had 
no prompt to inspect. It would have stayed green. It asks for a supported error 
now, so it still proves what it claims — that the service redacts before 
building the prompt. That is the seventh test of mine in this PR that passed 
either way.
   
   The PR body is updated, including three claims that had gone stale earlier 
and that I should have caught: it still described the final-exception-line 
heuristic, the tabs keyed by name, and the indentation inference, all of which 
are gone.
   
   Suite: 6959 passing. `yarn format:ci`, `yarn build:ci`, `yarn test:ci` and 
`ng run gui:test-browser` all clean locally — still worth a CI run when you get 
a chance to approve one, since none of these commits has been through it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to