fix(auto_debug): return partial state updates from nodes per LangGraph contract #11153

Merged
HAL9000 merged 8 commits from fix/10496-auto-debug-node-state-mutation into master 2026-06-15 05:30:23 +00:00

8 Commits

Author SHA1 Message Date
HAL9000 ac74edd175 fix(auto_debug): align test expectation with fail-safe LLM exception handling
CI / lint (pull_request) Successful in 59s
CI / typecheck (pull_request) Successful in 1m16s
CI / quality (pull_request) Successful in 54s
CI / security (pull_request) Successful in 1m10s
CI / build (pull_request) Successful in 34s
CI / push-validation (pull_request) Successful in 35s
CI / helm (pull_request) Successful in 40s
CI / unit_tests (pull_request) Successful in 5m2s
CI / docker (pull_request) Successful in 1m30s
CI / integration_tests (pull_request) Successful in 9m8s
CI / coverage (pull_request) Successful in 9m18s
CI / status-check (pull_request) Successful in 5s
CI / lint (push) Successful in 52s
CI / build (push) Successful in 50s
CI / quality (push) Successful in 55s
CI / typecheck (push) Successful in 1m1s
CI / security (push) Successful in 1m4s
CI / push-validation (push) Successful in 24s
CI / helm (push) Successful in 56s
CI / unit_tests (push) Successful in 4m50s
CI / docker (push) Successful in 1m32s
CI / integration_tests (push) Successful in 8m29s
CI / coverage (push) Successful in 9m35s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
The _validate_fix BDD scenario "Validate fix handles LLM invocation
failure gracefully" was asserting fix_validated=True (fail-open), but
the code already sets is_valid=False on LLM exception (fail-safe).
Update the scenario step to "the fix should not be marked as validated"
and remove the pragma: no cover comment since this branch is now
exercised by the test.

ISSUES CLOSED: #10496
2026-06-15 01:01:54 -04:00
controller-ci-rerun bf4da47bdc chore: re-trigger CI [controller]
CI / push-validation (pull_request) Successful in 27s
CI / helm (pull_request) Successful in 43s
CI / lint (pull_request) Successful in 57s
CI / quality (pull_request) Successful in 56s
CI / build (pull_request) Successful in 57s
CI / typecheck (pull_request) Successful in 1m9s
CI / security (pull_request) Successful in 1m12s
CI / unit_tests (pull_request) Failing after 5m8s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 9m1s
CI / status-check (pull_request) Failing after 3s
2026-06-15 00:43:45 -04:00
HAL9000 a5edf2563b fix(11153): resolve lint failure and revert conflicting registry change
- Format auto_debug.py per ruff to fix CI / lint failure
- Revert registry.py provider/model model-field change that conflicts with TDD test assertions from issue #10926 (models must use bare identifiers without provider prefix)
2026-06-15 00:43:45 -04:00
HAL9000 4422b76266 fix(tests): use provider/model format in actor YAML model field 2026-06-15 00:43:45 -04:00
HAL9000 c491f0e6ea fix(11153): close fail-open security bug and add positive assertions
- _validate_fix exception handler defaults to False (not True),
  preventing crashed LLM validators from passing unvalidated fixes.
- Added positive test assertions verifying returned partial-state dicts
  contain expected keys (messages, current_fix, fix_validated,
  attempted_fixes, result). This closes a coverage blind spot where
  an empty return dict would silently pass immutability tests.

ISSUES CLOSED: #10496
2026-06-15 00:43:45 -04:00
HAL9000 a177f0d6ea fix(11153): address peer review findings for PR #11153
- Fix CHANGELOG entry: replace non-existent update_node()/set_active_node() with
  actual method names (_analyze_error, _generate_fix, _validate_fix, _finalize)
  and clarify LangGraph node contract reference (HAL9000 observation #1).

- Add inline comment explaining shallow-copy semantics in _analyze_error's
  immutability pattern (HAL9000 observation #2): list is new but inner dicts
  are shared refs — safe because messages are immutable-after-creation.

- Document return-asymmetry in _validate_fix docstring: both fix_validated and
  attempted_fixes keys when invalid, only fix_validated when valid. This is
  intentional LangGraph behavior (omitted keys are not reset) (HAL9000 obs #4).

Addresses review comments from peer review #8822 (HAL9000).
2026-06-15 00:43:45 -04:00
HAL9000 ad58efcbe1 test(auto_debug): add missing @tdd_issue tags per CI quality gate (issue #10496)
The feature file for auto-debug state mutation tests was missing required
TDD tags (@tdd_issue, @tdd_issue_10496). This caused CI / tdd_quality_gate
to fail the tag validation check. Added minimal tagging to pass CI while
keeping the fix PR's scenarios passing (no @tdd_expected_fail needed since
the underlying bug is being fixed).
2026-06-15 00:42:16 -04:00
freemo 6353c54b85 fix(agents/graphs/auto_debug): return update dicts from node functions instead of mutating state in-place
ISSUES CLOSED: #10494
2026-06-15 00:42:16 -04:00