test(integration): workflow example 3 — multi-file refactoring with invariants (cautious profile) #767

Open
opened 2026-03-12 19:38:57 +00:00 by freemo · 1 comment
Owner

Metadata

  • Commit Message: test(integration): workflow example 3 — multi-file refactoring with invariants (cautious profile)
  • Branch: test/int-wf03-refactoring

Background

Integration test for Specification Workflow Example 3: Multi-File Refactoring with Invariants. Exercises the cautious automation profile with multi-scope invariants, custom actor registration, confidence-threshold pausing, and plan correct --mode revert using mocked LLM providers.

Runs within the standard nox -s integration_tests session using mocked LLM providers.

Expected Behavior

The integration test validates cautious-profile refactoring with deterministic mocked LLM responses. The mock produces a low-confidence decision that triggers pausing, enabling testing of the correction/revert flow.

Acceptance Criteria

  • Robot Framework test suite in robot/ directory (standard integration tests)
  • Test exercises cautious-profile workflow with multi-scope invariants
  • Test uses integration-appropriate mocking (mocked LLM providers)
  • Test verifies confidence-threshold pausing behavior
  • Test exercises plan explain, plan correct --mode revert, and plan prompt
  • Test verifies corrected execution output
  • Test passes via nox -s integration_tests
  • Coverage >=97% maintained

Subtasks

  • Write Robot Framework integration test suite for workflow example 3
  • Configure mocked LLM responses for refactoring scenario (including low-confidence decision)
  • Create temp project fixture with raw SQL auth module
  • Implement cautious-profile workflow with correction flow
  • Verify via nox -s integration_tests
  • Verify coverage >=97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
## Metadata - **Commit Message**: `test(integration): workflow example 3 — multi-file refactoring with invariants (cautious profile)` - **Branch**: `test/int-wf03-refactoring` ## Background Integration test for Specification Workflow Example 3: Multi-File Refactoring with Invariants. Exercises the `cautious` automation profile with multi-scope invariants, custom actor registration, confidence-threshold pausing, and `plan correct --mode revert` using mocked LLM providers. Runs within the standard `nox -s integration_tests` session using mocked LLM providers. ## Expected Behavior The integration test validates cautious-profile refactoring with deterministic mocked LLM responses. The mock produces a low-confidence decision that triggers pausing, enabling testing of the correction/revert flow. ## Acceptance Criteria - [ ] Robot Framework test suite in `robot/` directory (standard integration tests) - [ ] Test exercises cautious-profile workflow with multi-scope invariants - [ ] Test uses integration-appropriate mocking (mocked LLM providers) - [ ] Test verifies confidence-threshold pausing behavior - [ ] Test exercises `plan explain`, `plan correct --mode revert`, and `plan prompt` - [ ] Test verifies corrected execution output - [ ] Test passes via `nox -s integration_tests` - [ ] Coverage >=97% maintained ## Subtasks - [ ] Write Robot Framework integration test suite for workflow example 3 - [ ] Configure mocked LLM responses for refactoring scenario (including low-confidence decision) - [ ] Create temp project fixture with raw SQL auth module - [ ] Implement cautious-profile workflow with correction flow - [ ] Verify via `nox -s integration_tests` - [ ] Verify coverage >=97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done.
freemo added this to the v3.2.0 milestone 2026-03-12 19:38:57 +00:00
Member

Implementation Notes

Files Created

File Lines Description
robot/wf03_refactoring.robot 74 5 Robot Framework test cases
robot/helper_wf03_refactoring.py 497 Python helper with 5 subcommands

Test Coverage

5 test cases covering the full WF03 workflow: invariant management (global + project scope), actor/action creation with cautious profile and typed arguments, plan lifecycle with --automation-profile cautious, decision tree + explain, and plan correct --mode revert.

Quality Gates

Session Result
nox -s lint PASS
nox -s typecheck PASS (0 errors)
nox -s integration_tests PASS (all 5 WF03 tests)

Commit

218be0b72b319512fbdef3136109ee278f1bd635 on branch test/int-wf03-refactoring

PR

PR #944

## Implementation Notes ### Files Created | File | Lines | Description | |---|---|---| | `robot/wf03_refactoring.robot` | 74 | 5 Robot Framework test cases | | `robot/helper_wf03_refactoring.py` | 497 | Python helper with 5 subcommands | ### Test Coverage 5 test cases covering the full WF03 workflow: invariant management (global + project scope), actor/action creation with cautious profile and typed arguments, plan lifecycle with `--automation-profile cautious`, decision tree + explain, and plan correct --mode revert. ### Quality Gates | Session | Result | |---|---| | `nox -s lint` | PASS | | `nox -s typecheck` | PASS (0 errors) | | `nox -s integration_tests` | PASS (all 5 WF03 tests) | ### Commit `218be0b72b319512fbdef3136109ee278f1bd635` on branch `test/int-wf03-refactoring` ### PR [PR #944](https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/944)
freemo self-assigned this 2026-04-02 06:13:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#767
No description provided.