Skip to content

Fix generic 500 error on auth failure#2122

Draft
hulto wants to merge 1 commit intomainfrom
fix-auth-failure-error-12151100931827609295
Draft

Fix generic 500 error on auth failure#2122
hulto wants to merge 1 commit intomainfrom
fix-auth-failure-error-12151100931827609295

Conversation

@hulto
Copy link
Collaborator

@hulto hulto commented Mar 21, 2026

Propagated specific grpc Unauthenticated error with "auth failure" on decryption error.


PR created automatically by Jules for task 12151100931827609295 started by @hulto

When chacha20poly1305 decryption fails (e.g., due to an authentication failure),
the cryptocodec service will now properly propagate a grpc Unauthenticated error
with the "auth failure" message instead of causing a generic internal server
error. This ensures the agent accurately logs and handles the authentication
failure rather than a 500 error.

Updated `CryptoSvc.Decrypt` to return an error, and `StreamDecryptCodec.Unmarshal`
to map that error to `status.Error(codes.Unauthenticated, "auth failure")`.
Also updated corresponding test cases to handle the new return signature.

Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 21, 2026

Summary

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

Previous Results

Build 🏗️ Result 🧪 Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
#1825 2833 2833 0 0 0 0 39.1s

Insights

Average Tests per Run Total Flaky Tests Total Failed Slowest Test (p95)
2833 0 0 5.6s

Test Changes

0 test added, 0 removed

Slowest Tests

Test 📝 Results 📊 Duration (avg) ⏱️ Duration (p95) ⏱️
TestDockerExecutor_Build_ContextCancellation 1 5.6s 5.6s
eldritch-libsys: std::dll_inject_impl::tests::test_dll_inject_simple 1 5.1s 5.1s
TestInteractiveShell 1 5.1s 5.1s
TestOtherStreamOutput 1 5.0s 5.0s
imix::bin/imix: install::tests::test_install_execution 3 1.8s 4.9s
imix::bin/imix: install::tests::test_install_execution 3 1.8s 4.9s
imix::bin/imix: install::tests::test_install_execution 3 1.8s 4.9s
TestDockerExecutor_Build_SimpleEcho 1 3.3s 3.3s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.0s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.0s

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

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

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