Files
cleveragents-core/robot/checkpoint_rollback.robot
CoreRasurae 86e245c585
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 19s
CI / security (pull_request) Successful in 35s
CI / typecheck (pull_request) Successful in 37s
CI / unit_tests (pull_request) Successful in 2m22s
CI / integration_tests (pull_request) Successful in 2m51s
CI / docker (pull_request) Successful in 38s
CI / coverage (pull_request) Successful in 3m34s
CI / benchmark-regression (pull_request) Successful in 22m10s
CI / lint (push) Successful in 12s
CI / build (push) Successful in 14s
CI / quality (push) Successful in 18s
CI / security (push) Successful in 32s
CI / typecheck (push) Successful in 34s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 1m55s
CI / docker (push) Successful in 38s
CI / integration_tests (push) Successful in 2m52s
CI / coverage (push) Successful in 4m4s
CI / benchmark-publish (push) Successful in 13m13s
feat(checkpoint): add checkpointing and rollback
fix Alembic migration down_revision to chain after
  m4_002_skill_flattened_tools (was pointing to stale
  c3_001_actor_registry)

BDD coverage: 33 scenarios (7 new), 129 steps, all passing.

ISSUES CLOSED: #206
2026-03-02 10:18:14 +00:00

88 lines
4.3 KiB
Plaintext

*** Settings ***
Documentation Smoke tests for checkpoint and rollback: create, list, rollback,
... prune, guards, and metadata auditability.
Resource ${CURDIR}/common.resource
Suite Setup Setup Test Environment
Suite Teardown Cleanup Test Environment
*** Variables ***
${HELPER} robot/helper_checkpoint_rollback.py
*** Test Cases ***
Create Checkpoint
[Documentation] Verify checkpoint creation succeeds
[Tags] phase2 checkpoint create
${result}= Run Process ${PYTHON} ${HELPER} create-checkpoint cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} create-checkpoint-ok
List Checkpoints
[Documentation] Verify listing checkpoints returns expected count
[Tags] phase2 checkpoint list
${result}= Run Process ${PYTHON} ${HELPER} list-checkpoints cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} list-checkpoints-ok
Rollback To Checkpoint
[Documentation] Verify rollback restores sandbox state
[Tags] phase2 checkpoint rollback
${result}= Run Process ${PYTHON} ${HELPER} rollback-checkpoint cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} rollback-checkpoint-ok
Rollback Rejected Applied Plan
[Documentation] Verify rollback blocked when plan is applied
[Tags] phase2 checkpoint rollback guard
${result}= Run Process ${PYTHON} ${HELPER} rollback-applied-guard cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} rollback-applied-guard-ok
Rollback Rejected Missing Sandbox
[Documentation] Verify rollback blocked when sandbox is missing
[Tags] phase2 checkpoint rollback guard
${result}= Run Process ${PYTHON} ${HELPER} rollback-sandbox-guard cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} rollback-sandbox-guard-ok
Prune Checkpoints
[Documentation] Verify pruning removes oldest checkpoints
[Tags] phase2 checkpoint prune
${result}= Run Process ${PYTHON} ${HELPER} prune-checkpoints cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} prune-checkpoints-ok
Delete Checkpoint
[Documentation] Verify deleting a checkpoint removes it
[Tags] phase2 checkpoint delete
${result}= Run Process ${PYTHON} ${HELPER} delete-checkpoint cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} delete-checkpoint-ok
Checkpoint Metadata Auditability
[Documentation] Verify checkpoint metadata stores reason and source
[Tags] phase2 checkpoint metadata
${result}= Run Process ${PYTHON} ${HELPER} checkpoint-metadata cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} checkpoint-metadata-ok
Auto Prune On Create
[Documentation] Verify auto-prune on checkpoint creation
[Tags] phase2 checkpoint prune
${result}= Run Process ${PYTHON} ${HELPER} auto-prune-create cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} auto-prune-create-ok
Checkpoint Spec Fields
[Documentation] Verify spec-aligned fields: decision_id, checkpoint_type, resource_id, filesystem_path, size_bytes
[Tags] phase2 checkpoint spec
${result}= Run Process ${PYTHON} ${HELPER} checkpoint-spec-fields cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} checkpoint-spec-fields-ok
Correction Service With Checkpoint
[Documentation] Verify correction service accepts checkpoint_service
[Tags] phase2 checkpoint correction
${result}= Run Process ${PYTHON} ${HELPER} correction-checkpoint cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} correction-checkpoint-ok