fix(a2a): validate session_id at entry of _handle_session_close before devcontainer cleanup #11098

Merged
HAL9000 merged 7 commits from feature/9250-fix-a2a-session-close into master 2026-06-17 16:38:46 +00:00
Owner

Summary

  • Move session_id validation to top of _handle_session_close() in A2aLocalFacade
  • Add BDD test for no-service + empty session_id path (wiring and coverage features)
  • Update CHANGELOG.md under Fixed section with fix description
  • Update CONTRIBUTORS.md with HAL 9000 contribution entry

Changes Made

  • src/cleveragents/a2a/facade.py — moved session_id validation before devcontainer cleanup in _handle_session_close()
  • features/a2a_facade_wiring.feature — added scenario for no-service + empty session_id
    CHANGELOG.md — Added Fixed entry
    CONTRIBUTORS.md — Updated with new contribution entry

Closes #9250

## Summary - Move session_id validation to top of _handle_session_close() in A2aLocalFacade - Add BDD test for no-service + empty session_id path (wiring and coverage features) - Update CHANGELOG.md under Fixed section with fix description - Update CONTRIBUTORS.md with HAL 9000 contribution entry ## Changes Made - src/cleveragents/a2a/facade.py — moved session_id validation before devcontainer cleanup in _handle_session_close() - features/a2a_facade_wiring.feature — added scenario for no-service + empty session_id CHANGELOG.md — Added Fixed entry CONTRIBUTORS.md — Updated with new contribution entry Closes #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
fix(a2a): close session_id validation bypass in _handle_session_close
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / helm (pull_request) Successful in 51s
CI / lint (pull_request) Failing after 1m9s
CI / benchmark-regression (pull_request) Failing after 1m16s
CI / build (pull_request) Successful in 1m4s
CI / integration_tests (pull_request) Failing after 1m23s
CI / e2e_tests (pull_request) Failing after 1m24s
CI / quality (pull_request) Successful in 1m28s
CI / unit_tests (pull_request) Failing after 1m37s
CI / typecheck (pull_request) Failing after 1m39s
CI / security (pull_request) Failing after 2m4s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 22s
CI / status-check (pull_request) Failing after 3s
e1a75e472d
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
HAL9000 added this to the v3.5.0 milestone 2026-05-09 14:28:10 +00:00
HAL9001 left a comment

Code Review — PR #11098

The intent of this fix is correct: moving session_id validation to the top of _handle_session_close() is the right approach. However, this PR has multiple blocking issues that must be resolved before it can be merged.

BLOCKING Issues

1. Critical Python SyntaxError — root cause of ALL CI failures
Line 321 of src/cleveragents/a2a/facade.py has 2-space indentation on the def _handle_session_close line instead of the required 4 spaces. Python raises IndentationError when importing this module. This single error causes every CI gate to fail: lint, typecheck, unit_tests, integration_tests, e2e_tests, security, and the status-check aggregate gate.

Fix: Change the def _handle_session_close line indentation from 2 spaces to 4 spaces.

2. Missing TDD Regression Test
This PR closes issue #9250, labeled Type/Bug. Per the mandatory Bug Fix Workflow in CONTRIBUTING.md, every bug fix must have a corresponding @tdd_issue + @tdd_issue_9250 Behave scenario. No such tag exists anywhere in features/. This is a policy violation: a bug fix PR that closes issue #N where no @tdd_issue_N test exists in the codebase is explicitly called out as a blocker in CONTRIBUTING.md.

Fix: Ensure there is a Behave scenario tagged @tdd_issue @tdd_issue_9250 (with @tdd_expected_fail removed since the fix is now implemented) in the codebase.

3. Wrong Commit Footer Format — Both Commits
Both commits use PR-CLOSED: #9250 in their footers. The required format is: ISSUES CLOSED: #9250. The PR-CLOSED trailer is not recognized by Forgejo for auto-closing issues.

Fix: Amend both commits to use ISSUES CLOSED: #9250.

4. Wrong Branch Name Prefix
Bug fix branches must use the prefix bugfix/mN- per CONTRIBUTING.md Bug Fix Workflow. This PR uses feature/9250-fix-a2a-session-close. For milestone v3.5.0 (M6), the correct prefix would be bugfix/m6-.

5. CONTRIBUTORS.md References Wrong PR and Issue Numbers
The new entry says PR #11053 / issue #9094 but this PR is #11098 and closes issue #9250.

Non-Blocking Observations

A. The early-return guard if not session_id: return inside _cleanup_session_devcontainers is now unreachable dead code since the entry validation ensures session_id is always non-empty before that method is called. Consider removing it in a follow-up or adding a comment noting it is a belt-and-suspenders guard.

B. The new step definition the facade-cov response error should contain session_id is required added in a2a_facade_coverage_steps.py is not referenced by any of the new scenarios. Either use it for a stronger assertion or remove it.

C. The comment in a2a_facade_wiring.feature says PR #9250 but #9250 is the issue number; this PR is #11098.

CI Status

All CI failures trace back to the indentation SyntaxError in facade.py (Blocker #1). Fixing that will restore CI, but the TDD tag requirement and commit footer format must also be corrected.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

## Code Review — PR #11098 The intent of this fix is correct: moving session_id validation to the top of _handle_session_close() is the right approach. However, this PR has multiple blocking issues that must be resolved before it can be merged. ### BLOCKING Issues **1. Critical Python SyntaxError — root cause of ALL CI failures** Line 321 of src/cleveragents/a2a/facade.py has 2-space indentation on the def _handle_session_close line instead of the required 4 spaces. Python raises IndentationError when importing this module. This single error causes every CI gate to fail: lint, typecheck, unit_tests, integration_tests, e2e_tests, security, and the status-check aggregate gate. Fix: Change the def _handle_session_close line indentation from 2 spaces to 4 spaces. **2. Missing TDD Regression Test** This PR closes issue #9250, labeled Type/Bug. Per the mandatory Bug Fix Workflow in CONTRIBUTING.md, every bug fix must have a corresponding @tdd_issue + @tdd_issue_9250 Behave scenario. No such tag exists anywhere in features/. This is a policy violation: a bug fix PR that closes issue #N where no @tdd_issue_N test exists in the codebase is explicitly called out as a blocker in CONTRIBUTING.md. Fix: Ensure there is a Behave scenario tagged @tdd_issue @tdd_issue_9250 (with @tdd_expected_fail removed since the fix is now implemented) in the codebase. **3. Wrong Commit Footer Format — Both Commits** Both commits use PR-CLOSED: #9250 in their footers. The required format is: ISSUES CLOSED: #9250. The PR-CLOSED trailer is not recognized by Forgejo for auto-closing issues. Fix: Amend both commits to use ISSUES CLOSED: #9250. **4. Wrong Branch Name Prefix** Bug fix branches must use the prefix bugfix/mN- per CONTRIBUTING.md Bug Fix Workflow. This PR uses feature/9250-fix-a2a-session-close. For milestone v3.5.0 (M6), the correct prefix would be bugfix/m6-. **5. CONTRIBUTORS.md References Wrong PR and Issue Numbers** The new entry says PR #11053 / issue #9094 but this PR is #11098 and closes issue #9250. ### Non-Blocking Observations **A.** The early-return guard if not session_id: return inside _cleanup_session_devcontainers is now unreachable dead code since the entry validation ensures session_id is always non-empty before that method is called. Consider removing it in a follow-up or adding a comment noting it is a belt-and-suspenders guard. **B.** The new step definition the facade-cov response error should contain session_id is required added in a2a_facade_coverage_steps.py is not referenced by any of the new scenarios. Either use it for a stronger assertion or remove it. **C.** The comment in a2a_facade_wiring.feature says PR #9250 but #9250 is the issue number; this PR is #11098. ### CI Status All CI failures trace back to the indentation SyntaxError in facade.py (Blocker #1). Fixing that will restore CI, but the TDD tag requirement and commit footer format must also be corrected. --- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
Owner

Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

--- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
HAL9001 left a comment

Code Review — PR #11098

The intent of this fix is correct: moving session_id validation to the top of _handle_session_close() is the right approach and the logic change itself is sound. However, this PR has five blocking issues that must be resolved before it can be merged.


BLOCKING Issues

1. Critical Python IndentationError — root cause of ALL CI failures

Line 321 of src/cleveragents/a2a/facade.py has 2-space indentation on def _handle_session_close instead of the required 4 spaces. Python raises IndentationError when importing this module. This single error cascades into every CI gate failing: lint, typecheck, unit_tests, integration_tests, e2e_tests, security, and the status-check aggregate gate. See inline comment on facade.py.

2. Missing mandatory TDD regression test (@tdd_issue_9250)

Issue #9250 is labelled Type/Bug. Per the mandatory Bug Fix Workflow in CONTRIBUTING.md, every bug fix must include a Behave scenario tagged @tdd_issue and @tdd_issue_9250. No such tag exists anywhere in the features/ directory. The new scenarios added in a2a_facade_coverage.feature and a2a_facade_wiring.feature are not tagged. This is a hard policy requirement — the PR cannot be merged without it.

Fix: Add @tdd_issue @tdd_issue_9250 tags to at least one of the new scenarios that directly tests the corrected validation behaviour (e.g. the empty session_idValueError path). Remove @tdd_expected_fail since the fix is already implemented.

3. Wrong commit footer format — both commits

Both commits use PR-CLOSED: #9250 in their trailers. The required format per CONTRIBUTING.md is:

ISSUES CLOSED: #9250

The PR-CLOSED trailer is not a recognised Conventional Changelog footer and will not trigger auto-close of the linked issue.

Fix: Amend both commits to use ISSUES CLOSED: #9250.

4. Wrong branch name prefix

Bug fix branches must use the bugfix/mN- prefix per CONTRIBUTING.md Bug Fix Workflow. This branch is named feature/9250-fix-a2a-session-close. For milestone v3.5.0 (M6), the correct prefix would be bugfix/m6-9250-fix-a2a-session-close.

5. CONTRIBUTORS.md entry references wrong PR and issue numbers

The new entry at the bottom of CONTRIBUTORS.md says PR #11053 / issue #9094. This PR is #11098 and it closes issue #9250. The entry must be corrected.


Non-Blocking Observations

A. Dead code in _cleanup_session_devcontainers

The guard if not session_id: return at the top of _cleanup_session_devcontainers() is now unreachable — entry validation in _handle_session_close guarantees session_id is non-empty before that method is ever called. Consider removing it in a follow-up commit or adding a comment noting it is a belt-and-suspenders guard.

B. Unused step definition

The new step the facade-cov response error should contain session_id is required added in a2a_facade_coverage_steps.py is not referenced by any scenario. Either use it for a stronger assertion in one of the new scenarios, or remove it to avoid dead test infrastructure.

C. Feature file comment references wrong PR number

The comment in a2a_facade_wiring.feature line 37 reads PR #9250 — that is the issue number. The PR number is #11098.


CI Status

Failing gates: lint, typecheck, unit_tests, integration_tests, e2e_tests, security, benchmark-regression, status-check. All failures are caused by the IndentationError in facade.py (Blocker #1). Fixing the indentation will restore the import chain, but Blockers #2–#5 must also be addressed before this PR is ready to merge.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

## Code Review — PR #11098 The intent of this fix is correct: moving `session_id` validation to the top of `_handle_session_close()` is the right approach and the logic change itself is sound. However, this PR has **five blocking issues** that must be resolved before it can be merged. --- ### BLOCKING Issues **1. Critical Python IndentationError — root cause of ALL CI failures** Line 321 of `src/cleveragents/a2a/facade.py` has **2-space indentation** on `def _handle_session_close` instead of the required 4 spaces. Python raises `IndentationError` when importing this module. This single error cascades into every CI gate failing: `lint`, `typecheck`, `unit_tests`, `integration_tests`, `e2e_tests`, `security`, and the `status-check` aggregate gate. See inline comment on `facade.py`. **2. Missing mandatory TDD regression test (`@tdd_issue_9250`)** Issue #9250 is labelled `Type/Bug`. Per the mandatory Bug Fix Workflow in CONTRIBUTING.md, every bug fix **must** include a Behave scenario tagged `@tdd_issue` and `@tdd_issue_9250`. No such tag exists anywhere in the `features/` directory. The new scenarios added in `a2a_facade_coverage.feature` and `a2a_facade_wiring.feature` are not tagged. This is a hard policy requirement — the PR cannot be merged without it. *Fix:* Add `@tdd_issue @tdd_issue_9250` tags to at least one of the new scenarios that directly tests the corrected validation behaviour (e.g. the empty `session_id` → `ValueError` path). Remove `@tdd_expected_fail` since the fix is already implemented. **3. Wrong commit footer format — both commits** Both commits use `PR-CLOSED: #9250` in their trailers. The required format per CONTRIBUTING.md is: ``` ISSUES CLOSED: #9250 ``` The `PR-CLOSED` trailer is not a recognised Conventional Changelog footer and will not trigger auto-close of the linked issue. *Fix:* Amend both commits to use `ISSUES CLOSED: #9250`. **4. Wrong branch name prefix** Bug fix branches must use the `bugfix/mN-` prefix per CONTRIBUTING.md Bug Fix Workflow. This branch is named `feature/9250-fix-a2a-session-close`. For milestone v3.5.0 (M6), the correct prefix would be `bugfix/m6-9250-fix-a2a-session-close`. **5. CONTRIBUTORS.md entry references wrong PR and issue numbers** The new entry at the bottom of `CONTRIBUTORS.md` says `PR #11053 / issue #9094`. This PR is `#11098` and it closes issue `#9250`. The entry must be corrected. --- ### Non-Blocking Observations **A. Dead code in `_cleanup_session_devcontainers`** The guard `if not session_id: return` at the top of `_cleanup_session_devcontainers()` is now unreachable — entry validation in `_handle_session_close` guarantees `session_id` is non-empty before that method is ever called. Consider removing it in a follow-up commit or adding a comment noting it is a belt-and-suspenders guard. **B. Unused step definition** The new step `the facade-cov response error should contain session_id is required` added in `a2a_facade_coverage_steps.py` is not referenced by any scenario. Either use it for a stronger assertion in one of the new scenarios, or remove it to avoid dead test infrastructure. **C. Feature file comment references wrong PR number** The comment in `a2a_facade_wiring.feature` line 37 reads `PR #9250` — that is the issue number. The PR number is `#11098`. --- ### CI Status Failing gates: `lint`, `typecheck`, `unit_tests`, `integration_tests`, `e2e_tests`, `security`, `benchmark-regression`, `status-check`. All failures are caused by the `IndentationError` in `facade.py` (Blocker #1). Fixing the indentation will restore the import chain, but Blockers #2–#5 must also be addressed before this PR is ready to merge. --- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
CONTRIBUTORS.md Outdated
@ -39,3 +39,4 @@ Below are some of the specific details of various contributions.
* HAL 9000 has contributed the error-suppression removal fix (PR #9247 / issue #9060): removed both `try...except Exception:` blocks in `register_registry_agents()` that silently suppressed errors from `actor_registry.list_actors()` and the route bridge refresh, enabling exceptions to propagate per CONTRIBUTING.md fail-fast policy. Added three Behave scenarios verifying RuntimeError, AttributeError, and TypeError propagation.
* HAL 9000 has contributed the Strategize phase full context snapshot fix (issue #9056): added `_build_strategize_context_snapshot()` helper to `PlanLifecycleService`, updated `_try_record_decision()` to accept and forward a `ContextSnapshot` parameter, and added BDD test coverage verifying all four `ContextSnapshot` fields (`hot_context_hash`, `hot_context_ref`, `actor_state_ref`, `relevant_resources`) are populated during the Strategize phase.
* HAL 9000 has contributed the ACMS context path matching fix (PR #10975 / issue #10972): corrects `_path_matches()` and `_matches_pattern()` to properly match absolute fragment paths against relative glob patterns by auto-prefixing with `**/` before calling `PurePath.full_match()`, preventing silent inefficacy of include/exclude filters for absolute paths in fragment metadata.
* HAL 9000 has contributed the a2a session_id validation fix (PR #11053 / issue #9094): moved the session_id validation guard to the top of `_handle_session_close()` in `A2aLocalFacade`, closing the validation bypass path where empty or null session IDs could slip through to devcontainer cleanup when `SessionService` was not wired.
Owner

BLOCKER — Wrong PR and Issue Numbers

This entry references PR #11053 / issue #9094, but this PR is #11098 and it closes issue #9250. Please correct the entry to reference the correct numbers.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

**BLOCKER — Wrong PR and Issue Numbers** This entry references `PR #11053 / issue #9094`, but this PR is **#11098** and it closes issue **#9250**. Please correct the entry to reference the correct numbers. --- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
Owner

BLOCKER — Missing @tdd_issue @tdd_issue_9250 tags

Issue #9250 is labelled Type/Bug. CONTRIBUTING.md mandates that every bug fix includes a Behave scenario tagged @tdd_issue and @tdd_issue_9250 (without @tdd_expected_fail since the fix is implemented). None of the new scenarios in this file carry these tags.

Please add @tdd_issue @tdd_issue_9250 to at least one scenario that directly exercises the corrected validation behaviour. Example:

  @tdd_issue @tdd_issue_9250
  Scenario: Session close with empty session_id and no service raises ValueError error

Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

**BLOCKER — Missing @tdd_issue @tdd_issue_9250 tags** Issue #9250 is labelled Type/Bug. CONTRIBUTING.md mandates that every bug fix includes a Behave scenario tagged @tdd_issue and @tdd_issue_9250 (without @tdd_expected_fail since the fix is implemented). None of the new scenarios in this file carry these tags. Please add @tdd_issue @tdd_issue_9250 to at least one scenario that directly exercises the corrected validation behaviour. Example: ```gherkin @tdd_issue @tdd_issue_9250 Scenario: Session close with empty session_id and no service raises ValueError error ``` --- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
Owner

Suggestion — Unused step definition

This new step the facade-cov response error should contain session_id is required is not referenced by any scenario in the feature files. Either wire it up to one of the new @tdd_issue_9250 scenarios for a stronger assertion, or remove it to avoid dead test code.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

**Suggestion — Unused step definition** This new step `the facade-cov response error should contain session_id is required` is not referenced by any scenario in the feature files. Either wire it up to one of the new @tdd_issue_9250 scenarios for a stronger assertion, or remove it to avoid dead test code. --- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
Owner

BLOCKER — Python IndentationError

This def statement has 2-space indentation instead of the required 4 spaces for a class method. Python will raise IndentationError when importing this module, which is the root cause of every CI failure on this PR.

CURRENT (wrong — 2 spaces):

  def _handle_session_close(self, params: dict[str, Any]) -> dict[str, Any]:

CORRECT (4 spaces):

    def _handle_session_close(self, params: dict[str, Any]) -> dict[str, Any]:

This is a copy-paste or editor artefact. Fixing this single character will restore all CI gates.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

**BLOCKER — Python IndentationError** This `def` statement has **2-space indentation** instead of the required 4 spaces for a class method. Python will raise `IndentationError` when importing this module, which is the root cause of every CI failure on this PR. CURRENT (wrong — 2 spaces): ```python def _handle_session_close(self, params: dict[str, Any]) -> dict[str, Any]: ``` CORRECT (4 spaces): ```python def _handle_session_close(self, params: dict[str, Any]) -> dict[str, Any]: ``` This is a copy-paste or editor artefact. Fixing this single character will restore all CI gates. --- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
Owner

Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

--- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
Author
Owner

🌱 Grooming: proceed — PR cleared for processing.

(check no_duplicates, category no_duplicates)

Anchor #11098 has identical title to PRs #11057 (30/6/5) and #11162 (13/5/2), all fixing A2A session_id validation. However, the anchor has the largest diff (45/6/6 changes) and most files modified, indicating it is the most complete implementation by quality-signal metrics. The anchor is not a duplicate of these alternatives; rather, it is the canonical version with broader scope. Deterministic checks found no closed-issue or merged-PR supersession triggers.

**🌱 Grooming: proceed** — PR cleared for processing. (check `no_duplicates`, category `no_duplicates`) Anchor #11098 has identical title to PRs #11057 (30/6/5) and #11162 (13/5/2), all fixing A2A session_id validation. However, the anchor has the largest diff (45/6/6 changes) and most files modified, indicating it is the most complete implementation by quality-signal metrics. The anchor is not a duplicate of these alternatives; rather, it is the canonical version with broader scope. Deterministic checks found no closed-issue or merged-PR supersession triggers. <!-- controller:fingerprint:4b191b7e5a34ff1b -->
Author
Owner

📋 Estimate: tier 1.

All 8 CI failures cascade from a single IndentationError in src/cleveragents/a2a/facade.py at line 321. The inserted _handle_session_close method broke the class indentation structure from line 321 through end-of-file (~line 632), affecting ~15 methods. The implementer must: (1) restore correct indentation across the affected class block, (2) verify the session_id validation reorder logic is correct, and (3) validate the new BDD scenario for no-service + empty session_id. Test-additive work with a logic reorder in a large class file = tier 1 per calibration data.

**📋 Estimate: tier 1.** All 8 CI failures cascade from a single IndentationError in src/cleveragents/a2a/facade.py at line 321. The inserted _handle_session_close method broke the class indentation structure from line 321 through end-of-file (~line 632), affecting ~15 methods. The implementer must: (1) restore correct indentation across the affected class block, (2) verify the session_id validation reorder logic is correct, and (3) validate the new BDD scenario for no-service + empty session_id. Test-additive work with a logic reorder in a large class file = tier 1 per calibration data. <!-- controller:fingerprint:ce6e3eea41a2b9ef -->
fix(a2a): correct IndentationError, add tdd_issue_9250 tags, fix CONTRIBUTORS
Some checks failed
CI / push-validation (pull_request) Successful in 30s
CI / helm (pull_request) Successful in 44s
CI / build (pull_request) Successful in 52s
CI / lint (pull_request) Successful in 1m9s
CI / typecheck (pull_request) Successful in 1m11s
CI / security (pull_request) Successful in 1m19s
CI / quality (pull_request) Successful in 1m18s
CI / integration_tests (pull_request) Failing after 4m9s
CI / e2e_tests (pull_request) Successful in 4m55s
CI / unit_tests (pull_request) Failing after 6m28s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
CI / benchmark-publish (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
088302caae
- 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
Author
Owner

(attempt #5, tier 1)

🔧 Implementer attempt — resolved.

Pushed 1 commit: 088302c.

Files touched: CONTRIBUTORS.md, features/a2a_facade_coverage.feature, src/cleveragents/a2a/facade.py.

_(attempt #5, tier 1)_ **🔧 Implementer attempt — `resolved`.** Pushed 1 commit: `088302c`. Files touched: `CONTRIBUTORS.md`, `features/a2a_facade_coverage.feature`, `src/cleveragents/a2a/facade.py`. <!-- controller:fingerprint:42a2bf4762cfe0d8 -->
drew referenced this pull request from a commit 2026-06-11 00:18:22 +00:00
ci: stop master workflow on PR updates
Some checks failed
CI / lint (pull_request) Successful in 46s
CI / typecheck (pull_request) Successful in 1m10s
CI / push-validation (pull_request) Successful in 20s
CI / quality (pull_request) Successful in 1m14s
CI / helm (pull_request) Successful in 26s
CI / build (pull_request) Successful in 31s
CI / security (pull_request) Successful in 1m22s
CI / integration_tests (pull_request) Failing after 3m24s
CI / unit_tests (pull_request) Failing after 4m17s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 4m13s
CI / status-check (pull_request) Failing after 3s
2d87865809
Remove the stale pull_request trigger from master.yml so PR branch commits do not launch the master workflow.

Maintenance patch for PR #11098.
Author
Owner

🌱 Grooming: proceed — PR cleared for processing.

(check no_duplicates, category no_duplicates)

Anchor PR #11098 addresses the same issue (#9250) as #11057 and #11162, but is the most-complete implementation with 47 additions across 7 files including code fix, BDD test, CHANGELOG, and CONTRIBUTORS updates. Other PRs solving the same problem have smaller diffs (30/6 and 13/2) with less scope. By diff size, file count, test coverage, and documentation, the anchor would be canonical, not duplicate.

**🌱 Grooming: proceed** — PR cleared for processing. (check `no_duplicates`, category `no_duplicates`) Anchor PR #11098 addresses the same issue (#9250) as #11057 and #11162, but is the most-complete implementation with 47 additions across 7 files including code fix, BDD test, CHANGELOG, and CONTRIBUTORS updates. Other PRs solving the same problem have smaller diffs (30/6 and 13/2) with less scope. By diff size, file count, test coverage, and documentation, the anchor would be canonical, not duplicate. <!-- controller:fingerprint:d7fc5363b3eb4fd8 -->
Author
Owner

📋 Estimate: tier 1.

Core change is a focused guard-clause move within a single method (_handle_session_close), but the PR spans 7 files including BDD feature additions and step wiring. CI is failing across multiple suites: session.close tests are directly related regressions from the change, while actor_run_signature and memory-service failures require triage to determine if pre-existing or newly introduced. Test burden is non-trivial — new Behave scenario requires understanding the wiring/coverage feature infrastructure. Multi-file scope and CI diagnosis/fix work puts this firmly at tier 1; no architectural complexity warrants tier 2.

**📋 Estimate: tier 1.** Core change is a focused guard-clause move within a single method (_handle_session_close), but the PR spans 7 files including BDD feature additions and step wiring. CI is failing across multiple suites: session.close tests are directly related regressions from the change, while actor_run_signature and memory-service failures require triage to determine if pre-existing or newly introduced. Test burden is non-trivial — new Behave scenario requires understanding the wiring/coverage feature infrastructure. Multi-file scope and CI diagnosis/fix work puts this firmly at tier 1; no architectural complexity warrants tier 2. <!-- controller:fingerprint:b3adad708ce24237 -->
HAL9000 force-pushed feature/9250-fix-a2a-session-close from 2d87865809
Some checks failed
CI / lint (pull_request) Successful in 46s
CI / typecheck (pull_request) Successful in 1m10s
CI / push-validation (pull_request) Successful in 20s
CI / quality (pull_request) Successful in 1m14s
CI / helm (pull_request) Successful in 26s
CI / build (pull_request) Successful in 31s
CI / security (pull_request) Successful in 1m22s
CI / integration_tests (pull_request) Failing after 3m24s
CI / unit_tests (pull_request) Failing after 4m17s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 4m13s
CI / status-check (pull_request) Failing after 3s
to 1f0af20b9c
Some checks failed
CI / push-validation (pull_request) Successful in 25s
CI / load-versions (pull_request) Failing after 13m46s
CI / lint (pull_request) Has been cancelled
CI / typecheck (pull_request) Has been cancelled
CI / security (pull_request) Has been cancelled
CI / quality (pull_request) Has been cancelled
CI / unit_tests (pull_request) Has been cancelled
CI / integration_tests (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / helm (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
2026-06-17 09:24:44 +00:00
Compare
Author
Owner

(attempt #11, tier 1)

🔧 Implementer attempt — ci-not-ready.

_(attempt #11, tier 1)_ **🔧 Implementer attempt — `ci-not-ready`.** <!-- controller:fingerprint:8b795f61424f261a -->
chore: re-trigger CI [controller]
Some checks failed
CI / load-versions (pull_request) Successful in 16s
CI / push-validation (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 55s
CI / typecheck (pull_request) Successful in 56s
CI / security (pull_request) Successful in 59s
CI / quality (pull_request) Successful in 57s
CI / build (pull_request) Successful in 29s
CI / helm (pull_request) Successful in 42s
CI / unit_tests (pull_request) Failing after 4m52s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 8m54s
CI / status-check (pull_request) Failing after 2s
5b35a7ed06
Author
Owner

(attempt #12, tier 1)

🔧 Implementer attempt — blocked.

Blockers:

  • agent-side push detected: remote feature/9250-fix-a2a-session-close is at 5b35a7ed06 but dispatch base was 1f0af20b9c. The implementer pushed from inside the worktree (forbidden by the git contract) OR a third party pushed during the attempt. Re-dispatch will re-prefetch and pick up the new head.
_(attempt #12, tier 1)_ **🔧 Implementer attempt — `blocked`.** Blockers: - agent-side push detected: remote feature/9250-fix-a2a-session-close is at 5b35a7ed0697 but dispatch base was 1f0af20b9c49. The implementer pushed from inside the worktree (forbidden by the git contract) OR a third party pushed during the attempt. Re-dispatch will re-prefetch and pick up the new head. <!-- controller:fingerprint:5a771a97039e1a18 -->
Author
Owner

(attempt #13, tier 2)

🔧 Implementer attempt — rebase-failed.

Blockers:

  • CONTRIBUTORS.md
_(attempt #13, tier 2)_ **🔧 Implementer attempt — `rebase-failed`.** Blockers: - CONTRIBUTORS.md <!-- controller:fingerprint:6980fece6524ffc1 -->
HAL9000 force-pushed feature/9250-fix-a2a-session-close from 5b35a7ed06
Some checks failed
CI / load-versions (pull_request) Successful in 16s
CI / push-validation (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 55s
CI / typecheck (pull_request) Successful in 56s
CI / security (pull_request) Successful in 59s
CI / quality (pull_request) Successful in 57s
CI / build (pull_request) Successful in 29s
CI / helm (pull_request) Successful in 42s
CI / unit_tests (pull_request) Failing after 4m52s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 8m54s
CI / status-check (pull_request) Failing after 2s
to 5063b07d7d
Some checks failed
CI / load-versions (pull_request) Successful in 15s
CI / push-validation (pull_request) Successful in 23s
CI / build (pull_request) Successful in 41s
CI / lint (pull_request) Successful in 50s
CI / typecheck (pull_request) Successful in 57s
CI / quality (pull_request) Successful in 1m0s
CI / security (pull_request) Successful in 1m7s
CI / helm (pull_request) Successful in 35s
CI / unit_tests (pull_request) Failing after 4m57s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 8m29s
CI / status-check (pull_request) Failing after 3s
2026-06-17 10:45:58 +00:00
Compare
Author
Owner

(attempt #15, tier 2)

🔧 Implementer attempt — verified-clean.

_(attempt #15, tier 2)_ **🔧 Implementer attempt — `verified-clean`.** <!-- controller:fingerprint:195b38678259f801 -->
test(a2a): align session.close smoke scenarios with session_id guard
Some checks failed
CI / load-versions (pull_request) Successful in 14s
CI / push-validation (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 56s
CI / typecheck (pull_request) Successful in 54s
CI / security (pull_request) Successful in 1m1s
CI / build (pull_request) Successful in 38s
CI / quality (pull_request) Successful in 1m5s
CI / helm (pull_request) Successful in 37s
CI / unit_tests (pull_request) Successful in 5m27s
CI / docker (pull_request) Successful in 1m34s
CI / integration_tests (pull_request) Failing after 8m56s
CI / coverage (pull_request) Failing after 19m46s
CI / status-check (pull_request) Has been cancelled
89a0448e5c
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
HAL9000 force-pushed feature/9250-fix-a2a-session-close from 89a0448e5c
Some checks failed
CI / load-versions (pull_request) Successful in 14s
CI / push-validation (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 56s
CI / typecheck (pull_request) Successful in 54s
CI / security (pull_request) Successful in 1m1s
CI / build (pull_request) Successful in 38s
CI / quality (pull_request) Successful in 1m5s
CI / helm (pull_request) Successful in 37s
CI / unit_tests (pull_request) Successful in 5m27s
CI / docker (pull_request) Successful in 1m34s
CI / integration_tests (pull_request) Failing after 8m56s
CI / coverage (pull_request) Failing after 19m46s
CI / status-check (pull_request) Has been cancelled
to 92ad8c40bf
Some checks failed
CI / load-versions (pull_request) Successful in 15s
CI / push-validation (pull_request) Successful in 27s
CI / lint (pull_request) Successful in 38s
CI / typecheck (pull_request) Successful in 59s
CI / security (pull_request) Successful in 1m11s
CI / quality (pull_request) Successful in 59s
CI / build (pull_request) Successful in 59s
CI / helm (pull_request) Successful in 56s
CI / unit_tests (pull_request) Successful in 6m54s
CI / docker (pull_request) Successful in 2m0s
CI / integration_tests (pull_request) Successful in 11m20s
CI / coverage (pull_request) Failing after 15m38s
CI / status-check (pull_request) Has been cancelled
2026-06-17 13:03:22 +00:00
Compare
fix(a2a): remove unreachable session_id guard in _cleanup_session_devcontainers
All checks were successful
CI / load-versions (pull_request) Successful in 16s
CI / push-validation (pull_request) Successful in 27s
CI / lint (pull_request) Successful in 44s
CI / typecheck (pull_request) Successful in 1m7s
CI / security (pull_request) Successful in 1m5s
CI / quality (pull_request) Successful in 1m1s
CI / build (pull_request) Successful in 35s
CI / helm (pull_request) Successful in 48s
CI / unit_tests (pull_request) Successful in 5m17s
CI / docker (pull_request) Successful in 1m45s
CI / integration_tests (pull_request) Successful in 8m57s
CI / coverage (pull_request) Successful in 10m11s
CI / status-check (pull_request) Successful in 6s
5b2e1c6a23
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
HAL9001 approved these changes 2026-06-17 16:38:13 +00:00
HAL9001 left a comment

Approved

Reviewed at commit 5b2e1c6.

Confidence: high.

**✅ Approved** Reviewed at commit `5b2e1c6`. Confidence: high. <!-- controller:fingerprint:8b47c9e38a35e33c -->
Author
Owner

Claimed by merge_drive.py (pid 1782369) until 2026-06-17T18:08:41.599611+00:00.

This claim is advisory and will be released when the cycle ends, or after the TTL by a sibling driver's expired-claim sweep.

<!-- merge_drive.py: claim --> Claimed by `merge_drive.py` (pid 1782369) until `2026-06-17T18:08:41.599611+00:00`. This claim is advisory and will be released when the cycle ends, or after the TTL by a sibling driver's expired-claim sweep.
HAL9001 approved these changes 2026-06-17 16:38:44 +00:00
HAL9001 left a comment

Approved by the controller reviewer stage (workflow 473).

Approved by the controller reviewer stage (workflow 473).
HAL9000 merged commit e7dcf03916 into master 2026-06-17 16:38:46 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core!11098
No description provided.