Skip to content

chore(commands): remove deprecated validate command, update count to 63 (closes #100)#101

Merged
Wolfvin merged 1 commit into
mainfrom
chore/issue-100-remove-deprecated-validate
Jun 30, 2026
Merged

chore(commands): remove deprecated validate command, update count to 63 (closes #100)#101
Wolfvin merged 1 commit into
mainfrom
chore/issue-100-remove-deprecated-validate

Conversation

@Wolfvin

@Wolfvin Wolfvin commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #100.

The validate command was deprecated several versions ago with a "renamed to registry-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 (its register_command("validate", ...) call was the only thing keeping the command registered). Commands are auto-imported from scripts/commands/, so deleting the file is sufficient to unregister the command.
  • _TOOL_DEFINITIONS["validate"] entry in scripts/mcp_server.py — the static MCP tool schema for codelens_validate. Without this removal, the MCP server would still advertise codelens_validate even though the underlying command no longer exists (callers would get "Unknown command: validate"). codelens_registry_validate continues to work as a dynamic tool, unchanged.
  • _md_validate() function and its dispatch entry in scripts/formatters/markdown.py — dead code path for the removed command. registry-validate continues to use the generic markdown formatter (no behavior change).

Updated

  • scripts/codelens.py:
    • Top-level docstring usage example: validateregistry-validate.
    • _REGISTRY_COMMANDS set: removed "validate" (it was a dead entry; the auto-setup block only runs when args.command is in COMMAND_REGISTRY, which validate no 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 at validate.py). Help text simplified — no more "(renamed from validate)" suffix.
  • tests/test_integration.py:
    • NO_ARGS_COMMANDS list: removed "validate" (was parametrizing a smoke test against a command that no longer exists).
    • EXPECTED_COMMAND_COUNT sentinel: 64 → 63 (this is the one place the count is allowed to be hardcoded, per the file's own docstring — sync_command_count.py intentionally does not touch it).
  • README.md command table: validate [workspace]registry-validate [workspace].
  • SKILL-QUICK.md Setup & Lifecycle section: validateregistry-validate.

Synced via python3 scripts/sync_command_count.py --apply

The single-source-of-truth sync script auto-updated the command/MCP counts in:

  • README.md (5 substitutions: 64 → 63, 62 → 61, 51 → 50 in multiple places)
  • SKILL.md (2 substitutions: 64 → 63, 62 → 61)
  • SKILL-QUICK.md (5 substitutions: 64 → 63, 62 → 61, plus the Total: N commands line)
  • pyproject.toml (1 substitution: 64 → 63)
  • skill.json (1 substitution: 64 → 63)
  • scripts/graph_model.py (1 substitution: 64 → 63 in docstring)
  • tests/test_integration.py module docstring (1 substitution: 64 → 63)

Manual count fixes (sync script regex did not match — pre-existing gaps)

  • scripts/mcp_server.py line 7: 64 → 63 in module docstring (sync regex requires \d+\+ but file has plain \d+).
  • SKILL-QUICK.md line 160: 51 → 50 statically-defined tools (sync regex requires including ... suffix that no longer exists in the file).

Verification — Definition of Done

# Check Result
1 codelens validate returns "unrecognized command" error: argument command: invalid choice: 'validate'
2 codelens registry-validate still works normally ✅ Returns valid JSON, status ok
3 PYTHONUTF8=1 python scripts/codelens.py --command-count returns 63 63
4 PYTHONUTF8=1 python -m pytest tests/ --ignore=tests/test_integration.py — no regression ✅ Baseline: 788 passed, 87 skipped → Post-fix: 788 passed, 87 skipped

Additional checks:

  • python3 scripts/sync_command_count.py --check reports All documentation files are in sync with COMMAND_REGISTRY.
  • tests/test_command_count.py — all 4 doc-sync tests pass.

Constraints honored

  • registry-validate is not affected in any functional way. It is still registered, still callable from the CLI, still exposed as the codelens_registry_validate MCP tool with the same dynamic schema as before.
  • No test that exercised the deprecated validate deprecation message was found in the non-integration suite — the only test that mentioned validate as a command was tests/test_integration.py (ignored by DoD), and its NO_ARGS_COMMANDS list was updated.

Findings (out of scope, not fixed)

  • scripts/sync_command_count.py has two stale regex rules that no longer match the current file contents:
    1. The mcp_server.py rule requires \d+\+ but the file uses plain \d+ (so the count must be updated manually whenever it changes).
    2. The SKILL-QUICK.md "statically-defined tools" rule requires an including ... 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sonarqubecloud

Copy link
Copy Markdown

@Wolfvin Wolfvin merged commit 9b32a7b into main Jun 30, 2026
2 of 8 checks passed
@Wolfvin Wolfvin deleted the chore/issue-100-remove-deprecated-validate branch July 1, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE] Remove deprecated validate command — already replaced by registry-validate

1 participant