fix(cli): remove extra --mode flag from validation attach #1305
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!1305
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/validation-attach-remove-mode-flag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Remove the
--mode/-mCLI flag fromvalidation attachto align with the specification. The validation mode is an inherent property of the validation definition, set at registration time viavalidation add, not a per-attachment override.Changes
CLI Layer (
src/cleveragents/cli/commands/validation.py)--mode/-mTyper option from theattach()commandmode=modefrom theservice.attach_validation()callService Layer (
src/cleveragents/application/services/tool_registry_service.py)modeparameter fromattach_validation()signatureself._tool_repo.get_by_name()ValidationErrorimport (no longer needed without mode validation)Repository Layer (
src/cleveragents/infrastructure/database/repositories.py)modetoToolRegistryRepository._to_legacy_domain()so the mode field is available from tool lookupsTest Updates
features/tool_cli.featurestep_run_validation_attach_modestep fromfeatures/steps/tool_cli_steps.pyfeatures/consolidated_tool.featuremodemodefieldmodetoattach_validation()Quality Gates
All 11 nox sessions pass:
Closes #913
--mode/-mflag fromvalidation attach#913a856f52b0b9f83786ca4Review claimed by reviewer pool instance reviewer-pool-1. Dispatching independent code review.
Code Review — PR #1305: fix(cli): remove extra --mode flag from validation attach
✅ APPROVED
I've reviewed the complete diff across all changed files against the specification and project standards. This is a clean, well-scoped fix.
Specification Alignment ✅
The spec defines
validation attachas:The
--modeflag was not part of the spec signature. Validation mode is an inherent property of the validation definition, set at registration time viavalidation add. This PR correctly removes the non-spec--mode/-mflag from the CLI and service layer.Changes Reviewed
CLI Layer (
validation.py):--mode/-mTyper option correctly removed fromattach()command. Docstring updated. ✅Service Layer (
tool_registry_service.py):modeparameter removed fromattach_validation()signature. Mode now correctly read from the validation's registered definition viaself._tool_repo.get_by_name(). Handles both dict and object return types. Type safety maintained withmode_str: str. UnusedValidationErrorimport removed. ✅Repository Layer (
repositories.py):modefield added to_to_legacy_domain()so the service can access it from tool lookups. ✅Test Updates: CLI scenario for
--moderemoved. Step definition removed. 3 "invalid mode" service-layer scenarios removed. Service-layer attach steps updated. Mock sentinel updated. Robot Framework helpers updated. ✅Commit Quality ✅
ISSUES CLOSED: #913footer presentPR Metadata ✅
Closes #913in PR bodyType/Tasklabel presentNo Issues Found
# type: ignoresuppressionsProceeding to merge.
--mode/-mflag fromvalidation attach#913