The empty-session_id guard at the top of _cleanup_session_devcontainers
became unreachable when _handle_session_close was hardened to raise
ValueError on missing/empty session_id before any cleanup runs. The
two dead lines were the only path through this method that the prior
"empty session_id and no service returns ok" coverage scenario
exercised; once that scenario was rewritten to assert the new
"error" verdict, the guard stopped being hit and the coverage gate
regressed below threshold.
Removing the dead branch restores coverage. The remaining body of
_cleanup_session_devcontainers is always called with a non-empty
session_id (both call sites in _handle_session_close run after the
entry-level ValueError guard), and the docstring now records that
invariant for future readers.
ISSUES CLOSED: #9250
The session_id validation guard added to _handle_session_close in
A2aLocalFacade raises ValueError when session_id is empty. The prior
commit aligned the Behave .feature scenarios but missed the Robot
helper at robot/helper_m6_autonomy_acceptance.py, which still
dispatched session.close with empty params and tripped the new
guard — causing the M6 A2A Facade Session Lifecycle integration
test to fail.
Pass the session_id returned by the preceding session.create call
so the close round-trip succeeds end-to-end.
ISSUES CLOSED: #9250
The session_id validation guard added to _handle_session_close in
A2aLocalFacade now raises ValueError when session_id is empty or
missing. Update three pre-existing smoke scenarios that previously
dispatched session.close with empty params to pass an explicit
session_id, aligning the smoke contract with the security fix.
The negative-path scenarios (@tdd_issue_9250) in
a2a_facade_coverage.feature continue to verify the ValueError path
with empty/missing session_id.
ISSUES CLOSED: #9250
- Fix 2-space -> 4-space indentation on _handle_session_close in
facade.py; this single error caused every CI gate to fail
(lint, typecheck, unit_tests, integration_tests, e2e_tests, security)
- Add @tdd_issue @tdd_issue_9250 tags to the three session_id
validation scenarios in a2a_facade_coverage.feature per the mandatory
bug-fix TDD workflow requirement
- Fix CONTRIBUTORS.md entry: was PR #11053 / issue #9094, corrected to
PR #11098 / issue #9250
ISSUES CLOSED: #9250
Removed unreachable duplicate code left over after moving session_id validation
to the top of _handle_session_close(). Updated BDD test scenario in
a2a_facade_wiring.feature to cover the no-service + empty session_id path.
PR-CLOSED: #9250
The _handle_session_close handler in the A2A local facade previously validated
session_id only after checking whether a session service was wired. When no
session service was available, _cleanup_session_devcontainers() was invoked
with an empty or missing session_id, risking incorrect container lifecycle
operations on unknown sessions. This fix moves validation to the top of
_handle_session_close so it applies uniformly across both code paths.
Updated BDD tests in features/a2a_facade_wiring.feature and
features/a2a_facade_coverage.feature to reflect the new validation behavior.
PR-CLOSED: #9250