Skip to content

Fix Lexer Error Formatting for Task Execution#2089

Closed
KCarretto wants to merge 1 commit intomainfrom
fix-eldritch-lexer-error-formatting-1008156907656023745
Closed

Fix Lexer Error Formatting for Task Execution#2089
KCarretto wants to merge 1 commit intomainfrom
fix-eldritch-lexer-error-formatting-1008156907656023745

Conversation

@KCarretto
Copy link
Collaborator

  • Updated eldritch-core interpreter to wrap Lexer errors in an EldritchError and route them through format_error. This gives them the same context snippets as parser errors.
  • Added test_task_syntax_error (lexer unclosed string) and test_task_syntax_error_parse (parser syntax error) to verify that syntax-violating Tasks don't crash the agent, but properly report TaskError payloads back to the C2 server over MockAgent's report mechanisms.

PR created automatically by Jules for task 1008156907656023745 started by @KCarretto

Previously, Lexer errors were returned as raw strings without the
surrounding context snippet, whereas parser syntax errors correctly used
`format_error`. This ensures all syntax errors bubble up with line
information and visual context via `TaskError`.

Added two tests in imix/src/tests/ to verify that unclosed string literals
and malformed function definitions are safely caught and reported as
errors back to the C2 backend.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions
Copy link
Contributor

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
660    ±0 660    ±0 0    ±0 0    ±0 0    ±0 0    ±0 1ms    ±0

Previous Results

Build 🏗️ Result 🧪 Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
#1725 660 660 0 0 0 0 36.9s

Insights

Average Tests per Run Total Flaky Tests Total Failed Slowest Test (p95)
660 0 0 6.1s

Slowest Tests

Test 📝 Results 📊 Duration (avg) ⏱️ Duration (p95) ⏱️
TestDockerExecutor_Build_ContextCancellation 1 6.1s 6.1s
TestInteractiveShell 1 5.0s 5.0s
TestOtherStreamOutput 1 5.0s 5.0s
TestDockerExecutor_Build_SimpleEcho 1 4.0s 4.0s
TestDockerExecutor_Build_StreamsOutputInRealTime 1 2.2s 2.2s
TestDockerExecutor_Build_NonZeroExit 1 1.6s 1.6s
TestDockerExecutor_Build_MultiLineOutput 1 1.5s 1.5s
TestDockerExecutor_Build_StderrOutput 1 1.5s 1.5s
TestGetRandomName/NoDuplicates 1 1.4s 1.4s
TestGetRandomName 1 1.4s 1.4s

🎉 No failed tests in this run. | 🍂 No flaky tests in this run.

Github Test Reporter by CTRF 💚

@KCarretto KCarretto closed this Mar 16, 2026
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.

1 participant