Files
cleveragents-core/robot/plan_correct_isolated_resolve.robot
brent.edwards 84b0c10dbf
CI / build (push) Successful in 20s
CI / helm (push) Successful in 22s
CI / lint (push) Successful in 3m20s
CI / quality (push) Successful in 3m45s
CI / typecheck (push) Successful in 3m57s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m9s
CI / integration_tests (push) Successful in 6m27s
CI / unit_tests (push) Successful in 6m27s
CI / docker (push) Successful in 1m19s
CI / coverage (push) Successful in 8m54s
CI / e2e_tests (push) Successful in 22m50s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Has been cancelled
fix(cli): plan correct active-plan resolution in isolated environments (#1184)
## Summary
- tighten `plan correct` active-plan fallback so it only runs for isolated `CLEVERAGENTS_HOME` mismatch cases and never when explicit DB env overrides are configured
- narrow fallback exception handling in `_resolve_active_plan_id()` to expected DB/path/service failures; unexpected errors now surface instead of being silently swallowed
- add BDD regression coverage for both safeguards in `features/consolidated_plan_misc.feature` + `features/steps/plan_cli_legacy_r2_steps.py`

## Validation
- `nox -e lint`: PASS
- `nox -e typecheck`: PASS
- `nox -e unit_tests`: PASS
- `nox -e integration_tests`: FAIL in current branch baseline (29 failing Robot integration tests in this environment)
- `nox -e e2e_tests`: FAIL in current branch baseline (45 failing E2E tests in this environment)
- `nox -e coverage_report`: PASS (97%)

Closes #1025

Reviewed-on: #1184
Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com>
Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com>
2026-03-31 01:49:16 +00:00

20 lines
924 B
Plaintext

*** Settings ***
Documentation Regression test for issue #1025 (plan correct auto-resolve)
Resource ${CURDIR}/common.resource
Suite Setup Setup Test Environment
Suite Teardown Cleanup Test Environment
*** Variables ***
${HELPER} ${CURDIR}/helper_plan_correct_isolated_resolve.py
*** Test Cases ***
Plan Correct Auto Resolves Active Plan In Isolated Environment
[Documentation] Verify ``plan correct`` resolves active plan without ``--plan``
... when subprocess-like invocations share CLEVERAGENTS_HOME but
... run from different working directories.
${result}= Run Process ${PYTHON} ${HELPER} cwd=${WORKSPACE} timeout=120s on_timeout=kill
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} issue-1025-plan-correct-isolated-resolve-ok