chore(commands): remove deprecated validate command, update count to 63 (closes #100)#101
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Closes #100.
The
validatecommand was deprecated several versions ago with a "renamed toregistry-validate" message. This PR removes the deprecated alias entirely, dropping the CLI command count from 64 → 63.Changes
Removed
scripts/commands/validate.py— the deprecated alias module (itsregister_command("validate", ...)call was the only thing keeping the command registered). Commands are auto-imported fromscripts/commands/, so deleting the file is sufficient to unregister the command._TOOL_DEFINITIONS["validate"]entry inscripts/mcp_server.py— the static MCP tool schema forcodelens_validate. Without this removal, the MCP server would still advertisecodelens_validateeven though the underlying command no longer exists (callers would get"Unknown command: validate").codelens_registry_validatecontinues to work as a dynamic tool, unchanged._md_validate()function and its dispatch entry inscripts/formatters/markdown.py— dead code path for the removed command.registry-validatecontinues to use the generic markdown formatter (no behavior change).Updated
scripts/codelens.py:validate→registry-validate._REGISTRY_COMMANDSset: removed"validate"(it was a dead entry; the auto-setup block only runs whenargs.commandis inCOMMAND_REGISTRY, whichvalidateno longer is).scripts/commands/registry_validate.py: docstring updated to note the deprecated alias was removed in [CHORE] Remove deprecated validate command — already replaced by registry-validate #100 (previously pointed atvalidate.py). Help text simplified — no more "(renamed fromvalidate)" suffix.tests/test_integration.py:NO_ARGS_COMMANDSlist: removed"validate"(was parametrizing a smoke test against a command that no longer exists).EXPECTED_COMMAND_COUNTsentinel:64 → 63(this is the one place the count is allowed to be hardcoded, per the file's own docstring —sync_command_count.pyintentionally does not touch it).README.mdcommand table:validate [workspace]→registry-validate [workspace].SKILL-QUICK.mdSetup & Lifecycle section:validate→registry-validate.Synced via
python3 scripts/sync_command_count.py --applyThe single-source-of-truth sync script auto-updated the command/MCP counts in:
README.md(5 substitutions:64 → 63,62 → 61,51 → 50in multiple places)SKILL.md(2 substitutions:64 → 63,62 → 61)SKILL-QUICK.md(5 substitutions:64 → 63,62 → 61, plus theTotal: N commandsline)pyproject.toml(1 substitution:64 → 63)skill.json(1 substitution:64 → 63)scripts/graph_model.py(1 substitution:64 → 63in docstring)tests/test_integration.pymodule docstring (1 substitution:64 → 63)Manual count fixes (sync script regex did not match — pre-existing gaps)
scripts/mcp_server.pyline 7:64 → 63in module docstring (sync regex requires\d+\+but file has plain\d+).SKILL-QUICK.mdline 160:51 → 50statically-defined tools (sync regex requiresincluding ...suffix that no longer exists in the file).Verification — Definition of Done
codelens validatereturns "unrecognized command"error: argument command: invalid choice: 'validate'codelens registry-validatestill works normallyokPYTHONUTF8=1 python scripts/codelens.py --command-countreturns6363PYTHONUTF8=1 python -m pytest tests/ --ignore=tests/test_integration.py— no regressionAdditional checks:
python3 scripts/sync_command_count.py --checkreportsAll documentation files are in sync with COMMAND_REGISTRY.tests/test_command_count.py— all 4 doc-sync tests pass.Constraints honored
registry-validateis not affected in any functional way. It is still registered, still callable from the CLI, still exposed as thecodelens_registry_validateMCP tool with the same dynamic schema as before.validatedeprecation message was found in the non-integration suite — the only test that mentionedvalidateas a command wastests/test_integration.py(ignored by DoD), and itsNO_ARGS_COMMANDSlist was updated.Findings (out of scope, not fixed)
scripts/sync_command_count.pyhas two stale regex rules that no longer match the current file contents:mcp_server.pyrule requires\d+\+but the file uses plain\d+(so the count must be updated manually whenever it changes).SKILL-QUICK.md"statically-defined tools" rule requires anincluding ...suffix that was removed in a previous edit.Both are pre-existing — they caused the sync script to silently skip these files. Worth a follow-up issue to tighten the regexes.