Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 55
fix(engine): drop tracebacks from warning logs on handled fail-open paths#367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -192,12 +192,14 @@ async def validate( | ||
| except asyncio.CancelledError: | ||
| # Interrupt / cancellation must propagate — never silently pass. | ||
| raise | ||
| except Exception: | ||
| except Exception as exc: | ||
| logger.warning( | ||
| "Validator call failed for agent '%s'; treating as pass", | ||
| "Validator call failed for agent '%s'; treating as pass (%s: %s)", | ||
| agent.name, | ||
| exc_info=True, | ||
| type(exc).__name__, | ||
| exc, | ||
| ) | ||
| logger.debug("Validator call traceback for agent '%s'", agent.name, exc_info=True) | ||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the closest sibling to the workflow.py re-run path that already has a caplog regression test — same message-formatting pattern, same risk of a copy/paste slip going untested. A quick caplog assertion here (WARNING has no exc_info, DEBUG does) would close the gap cheaply. ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 54d4a60 — added | ||
| return ValidationOutcome(passed=True, errored=True) | ||
| passed, issues, parse_ok = self._parse(output.content) | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This site (and
_delete_periodic_checkpointsbelow) already has a behavioral test for the failure path (test_never_raises_on_failure), but nothing pins the new logging contract the waytest_rerun_failure_keeps_original_no_double_count_and_emits_eventdoes for the validator re-run. Worth extending with the samecaplogpattern so a future refactor can't quietly putexc_info=Trueback on the warning.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 54d4a60 — added two caplog tests in
tests/test_engine/test_checkpoint.pymirroring the validator re-run pattern:test_save_checkpoint_failure_logs_concise_warning_and_debug_traceback(TestSaveCheckpoint) — pinssave_checkpoint's fail-open path: exactly one WARNING withexc_info is None, asserts the exception type (FileNotFoundError) appears in the message, and a DEBUG record withexc_infopresent.test_listing_failure_logs_run_context_and_debug_traceback(TestRotatePeriodicCheckpoints) — same contract for the rotation/cleanup listing failure, plus assertions thatrun_idand the workflow path appear in the WARNING text.