27 lines
1.5 KiB
Markdown
27 lines
1.5 KiB
Markdown
# CLI Deprecation Warning System
|
|
|
|
## Module
|
|
Cli
|
|
|
|
## Status
|
|
IMPLEMENTED
|
|
|
|
## Description
|
|
Deprecation warnings displayed when users invoke old command paths, guiding them to the new consolidated equivalents.
|
|
|
|
## Implementation Details
|
|
- **Route Mapping**: `src/Cli/StellaOps.Cli/cli-routes.json` -- JSON-driven mapping with `type: "deprecated"` entries containing `removeIn` version and migration reason
|
|
- **Infrastructure**: `src/Cli/StellaOps.Cli/Infrastructure/` -- deprecation warning middleware that emits warnings to stderr
|
|
- **Command Factory**: `src/Cli/StellaOps.Cli/Commands/CommandFactory.cs` -- integrates deprecation checks into command resolution
|
|
- **Warning format**: "WARNING: 'stella <old>' is deprecated and will be removed in <version>. Use 'stella <new>' instead. Reason: <reason>"
|
|
- **Tests**: `src/Cli/__Tests/StellaOps.Cli.Tests/Integration/DeprecationWarningTests.cs`
|
|
|
|
## E2E Test Plan
|
|
- [ ] Run a deprecated command (e.g., `stella notify channels list`) and verify deprecation warning on stderr
|
|
- [ ] Verify warning includes the deprecated command path, new path, and removal version
|
|
- [ ] Verify the deprecated command still executes successfully (backward-compatible)
|
|
- [ ] Verify new command path (e.g., `stella config notify channels list`) shows no warning
|
|
- [ ] Verify warnings go to stderr (not stdout) so they don't break JSON output parsing
|
|
- [ ] Verify `--quiet` or `--no-warnings` suppresses deprecation warnings
|
|
- [ ] Verify all route mappings with `type: "deprecated"` emit warnings
|