Collapse multi-line @then decorator onto a single line in
tdd_session_create_suppress_exception_steps.py to satisfy
ruff format --check (the CI lint job runs both ruff check
and ruff format --check).
Replace __import__("datetime") with proper top-level import
per project Python import rules. This resolves the CI lint failure
blocking PR #10898.
Closes#10433
Refs: #10414#10898
Replace the silent contextlib.suppress(Exception) block in the session
create command with a try/except that logs at WARNING level with exc_info.
Previously, any exception raised by _facade_dispatch() during session
creation was silently discarded with no logging, making it impossible to
diagnose failures in the facade layer (e.g. A2A bootstrap unavailable,
programming errors, infrastructure issues).
The fix keeps session creation non-fatal (the session is already persisted
before the facade call) while ensuring the exception is visible in logs:
try:
_facade_dispatch(session.create, {...})
except Exception as _exc:
_log.warning(
session_create_facade_dispatch_failed,
extra={"session_id": ..., "error": str(_exc)},
exc_info=True,
)
Also includes the TDD regression test from issue #10414 (PR #10749) with
@tdd_expected_fail removed, since the fix is now applied. The test verifies
that a WARNING log entry is emitted when _facade_dispatch() raises and that
session creation still exits 0.
ISSUES CLOSED: #10433