Files
cleveragents-core/robot/correction_flows.robot
T
freemo 33a5adcfee
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 17s
CI / build (pull_request) Successful in 22s
CI / typecheck (pull_request) Successful in 28s
CI / security (pull_request) Successful in 33s
CI / integration_tests (pull_request) Successful in 2m25s
CI / unit_tests (pull_request) Successful in 5m43s
CI / docker (pull_request) Successful in 58s
CI / benchmark-regression (pull_request) Successful in 17m48s
CI / coverage (pull_request) Successful in 19m18s
feat(M4.2): Correction service with revert/append BFS + dry-run
Adds CorrectionRequest, CorrectionResult, CorrectionMode,
CorrectionPatch, CorrectionDryRunReport, CorrectionNotFoundError,
and CorrectionConflictError domain models.

Implements CorrectionService with BFS-based revert (marks decisions
as rolled back and restores via inverse changes) and append mode
(spawns a child correction plan).  Includes request_correction()
with dry-run support and dispatch_correction() convenience method.

33 Behave scenarios, 8 Robot smoke tests, ASV benchmark suite,
and reference documentation.

Ref: Day-14 Rebaseline – M4.2 Decision-correction flows [Jeff]
2026-02-22 16:40:06 +00:00

67 lines
3.2 KiB
Plaintext

*** Settings ***
Documentation Smoke tests for correction flows: revert, append, dry-run,
... impact analysis, cancellation, and error handling.
Resource ${CURDIR}/common.resource
Suite Setup Setup Test Environment
Suite Teardown Cleanup Test Environment
*** Variables ***
${HELPER} robot/helper_correction_flows.py
*** Test Cases ***
Revert Simple Correction
[Documentation] Verify simple revert invalidates target decision
[Tags] phase2 correction flows revert
${result}= Run Process ${PYTHON} ${HELPER} revert-simple cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} revert-simple-ok
Revert Deep Subtree
[Documentation] Verify revert walks full BFS subtree
[Tags] phase2 correction flows revert
${result}= Run Process ${PYTHON} ${HELPER} revert-deep-subtree cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} revert-deep-subtree-ok
Append Correction
[Documentation] Verify append spawns a child plan
[Tags] phase2 correction flows append
${result}= Run Process ${PYTHON} ${HELPER} append-correction cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} append-correction-ok
Dry Run Report Generation
[Documentation] Verify dry-run report contains expected fields
[Tags] phase2 correction flows dryrun
${result}= Run Process ${PYTHON} ${HELPER} dry-run-report cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} dry-run-report-ok
Impact Analysis Risk Levels
[Documentation] Verify risk classification low / high thresholds
[Tags] phase2 correction flows impact
${result}= Run Process ${PYTHON} ${HELPER} impact-risk-levels cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} impact-risk-levels-ok
Cancel Correction
[Documentation] Verify pending correction can be cancelled
[Tags] phase2 correction flows cancel
${result}= Run Process ${PYTHON} ${HELPER} cancel-correction cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} cancel-correction-ok
Execute Already Cancelled Error
[Documentation] Verify executing a cancelled correction raises error
[Tags] phase2 correction flows error
${result}= Run Process ${PYTHON} ${HELPER} execute-cancelled-error cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} execute-cancelled-error-ok
List Corrections By Plan
[Documentation] Verify listing corrections filters by plan_id
[Tags] phase2 correction flows query
${result}= Run Process ${PYTHON} ${HELPER} list-corrections-by-plan cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} list-corrections-by-plan-ok