fix(test): add return code checks to intermediate commands in core CLI test #897

Closed
opened 2026-03-13 23:47:04 +00:00 by freemo · 0 comments
Owner

Metadata

  • Commit Message: fix(test): add return code checks to intermediate commands in core CLI test
  • Branch: fix/integration-core-cli-unchecked-rc

Background

The core CLI commands test (robot/core_cli_commands.robot, 228 lines) has approximately 11 intermediate Run Process calls for setup steps (init, tell, build, context add) that have no return code checks. If any setup command fails silently, the test's final assertions may pass for wrong reasons.

Affected Lines

Lines 48, 58, 67, 97, 99, 108, 118–119, 130–133, 142–144, 152, 203 — each runs a CLI command as a setup step without verifying ${result.rc} == 0.

For example, if agents init fails silently on line 48, then agents tell on line 58 operates on an uninitialized project, and the test's final assertion on the output may still pass if the error message happens to not match the negative assertion.

Acceptance Criteria

  • Every Run Process call that serves as a setup step (not the command under test) has an explicit Should Be Equal As Integers ${result.rc} 0 assertion
  • At minimum, all ~11 identified intermediate commands have RC checks added
  • The test still passes with all checks in place
  • nox -s integration_tests passes

Subtasks

  • Audit all Run Process calls in the file and identify which are setup vs. command-under-test
  • Add Should Be Equal As Integers ${result.rc} 0 after each setup Run Process call
  • Run nox -s integration_tests and verify the test suite passes
  • Verify coverage >= 97% via nox -s coverage_report

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 about the implementation.
  • 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**: `fix(test): add return code checks to intermediate commands in core CLI test` - **Branch**: `fix/integration-core-cli-unchecked-rc` ## Background The core CLI commands test (`robot/core_cli_commands.robot`, 228 lines) has approximately 11 intermediate `Run Process` calls for setup steps (init, tell, build, context add) that have **no return code checks**. If any setup command fails silently, the test's final assertions may pass for wrong reasons. ### Affected Lines Lines 48, 58, 67, 97, 99, 108, 118–119, 130–133, 142–144, 152, 203 — each runs a CLI command as a setup step without verifying `${result.rc} == 0`. For example, if `agents init` fails silently on line 48, then `agents tell` on line 58 operates on an uninitialized project, and the test's final assertion on the output may still pass if the error message happens to not match the negative assertion. ## Acceptance Criteria - [ ] Every `Run Process` call that serves as a setup step (not the command under test) has an explicit `Should Be Equal As Integers ${result.rc} 0` assertion - [ ] At minimum, all ~11 identified intermediate commands have RC checks added - [ ] The test still passes with all checks in place - [ ] `nox -s integration_tests` passes ## Subtasks - [ ] Audit all `Run Process` calls in the file and identify which are setup vs. command-under-test - [ ] Add `Should Be Equal As Integers ${result.rc} 0` after each setup `Run Process` call - [ ] Run `nox -s integration_tests` and verify the test suite passes - [ ] Verify coverage >= 97% via `nox -s coverage_report` ## 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 about the implementation. - 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-13 23:47:04 +00:00
freemo 2026-03-14 01:41:30 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#897
No description provided.