31472b5413
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 21s
CI / helm (pull_request) Successful in 22s
CI / lint (pull_request) Successful in 3m20s
CI / quality (pull_request) Successful in 3m43s
CI / typecheck (pull_request) Successful in 3m58s
CI / security (pull_request) Successful in 4m8s
CI / integration_tests (pull_request) Successful in 9m33s
CI / unit_tests (pull_request) Successful in 10m12s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 12m18s
CI / e2e_tests (pull_request) Successful in 19m51s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 15s
CI / helm (push) Successful in 22s
CI / lint (push) Successful in 3m18s
CI / quality (push) Successful in 3m41s
CI / typecheck (push) Successful in 3m57s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m10s
CI / unit_tests (push) Failing after 6m58s
CI / docker (push) Has been skipped
CI / integration_tests (push) Successful in 9m15s
CI / coverage (push) Successful in 12m26s
CI / e2e_tests (push) Successful in 23m11s
CI / status-check (push) Failing after 1s
CI / benchmark-publish (push) Successful in 28m31s
CI / benchmark-regression (pull_request) Successful in 54m53s
Add Behave feature/step pairs that exercise uncovered branches across handlers, LSP, CLI, and service layers to reach the coverage gate. ISSUES CLOSED: #1232
66 lines
3.4 KiB
Gherkin
66 lines
3.4 KiB
Gherkin
Feature: REPL uncovered code paths (rplcov3)
|
|
Exercises uncovered lines in src/cleveragents/cli/commands/repl.py:
|
|
610-611 (persona import file not found), 619-621 (persona import validation fail),
|
|
625-626 (unknown persona sub-command), 651-652 (session switch missing arg),
|
|
792-794 (@ reference suggestions in run_repl), 805 (empty argv after shlex.split).
|
|
|
|
Background:
|
|
Given rplcov3 the repl module is imported
|
|
|
|
# ---------------------------------------------------------------
|
|
# _handle_slash_command — persona import file-not-found (610-611)
|
|
# ---------------------------------------------------------------
|
|
Scenario: Persona import with non-existent file prints error
|
|
Given rplcov3 a temporary persona registry
|
|
When rplcov3 I handle slash command "persona import nonexistent.yaml"
|
|
Then rplcov3 the exit code is 1
|
|
And rplcov3 the output contains "File not found"
|
|
|
|
# ---------------------------------------------------------------
|
|
# _handle_slash_command — persona import validation fail (619-621)
|
|
# ---------------------------------------------------------------
|
|
Scenario: Persona import with invalid YAML persona prints validation error
|
|
Given rplcov3 a temporary persona registry
|
|
And rplcov3 an importable YAML file with invalid persona data
|
|
When rplcov3 I handle slash command for import with invalid persona file
|
|
Then rplcov3 the exit code is 1
|
|
And rplcov3 the output contains "Persona validation failed"
|
|
|
|
# ---------------------------------------------------------------
|
|
# _handle_slash_command — unknown persona sub-command (625-626)
|
|
# ---------------------------------------------------------------
|
|
Scenario: Unknown persona sub-command prints error
|
|
Given rplcov3 a temporary persona registry
|
|
When rplcov3 I handle slash command "persona unknowncmd extraarg"
|
|
Then rplcov3 the exit code is 2
|
|
And rplcov3 the output contains "Unknown persona command"
|
|
|
|
# ---------------------------------------------------------------
|
|
# _handle_slash_command — session switch missing name (651-652)
|
|
# ---------------------------------------------------------------
|
|
Scenario: Session switch without name prints usage error
|
|
Given rplcov3 a temporary persona registry
|
|
When rplcov3 I handle slash command "session switch"
|
|
Then rplcov3 the exit code is 2
|
|
And rplcov3 the output contains "Usage"
|
|
And rplcov3 the output contains "/session switch"
|
|
|
|
# ---------------------------------------------------------------
|
|
# run_repl — @ reference suggestions shown (792-794)
|
|
# ---------------------------------------------------------------
|
|
Scenario: REPL shows reference suggestions for unresolved @ token
|
|
Given rplcov3 a temporary persona registry
|
|
And rplcov3 a reference catalog with known entries
|
|
When rplcov3 I run the REPL with input "@zzz_nomatch_token" and mocked catalog
|
|
Then rplcov3 the repl exit code is 0
|
|
And rplcov3 the repl output contains "Reference suggestions"
|
|
|
|
# ---------------------------------------------------------------
|
|
# run_repl — empty argv after shlex.split (805)
|
|
# ---------------------------------------------------------------
|
|
Scenario: REPL skips empty tokenised input without dispatch
|
|
Given rplcov3 a temporary persona registry
|
|
When rplcov3 I run the REPL with input that tokenises to empty
|
|
Then rplcov3 the repl exit code is 0
|
|
And rplcov3 dispatch_command was not called
|