Skip to content

Add doctor names command to detect naming policy violations - #404

Merged
em3s merged 1 commit into
mainfrom
feat/validate-resource-names-script
Jul 10, 2026
Merged

em3s merged 1 commit into
mainfrom
feat/validate-resource-names-script

Conversation

@em3s

@em3s em3s commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds doctor names command to the CLI REPL that scans all storages, databases, tables, and aliases and reports names violating the naming policy (^[a-z][a-z0-9_]{0,63}$). Intended as a pre-upgrade audit tool before deploying PR #403.

Changes

  • cli/internal/command/doctor.go: scans storages, databases, tables, aliases; prints violations and a scan summary
  • cli/internal/command/command_type.go: adds TypeDoctor
  • cli/internal/runner/actionbase_runner.go: registers doctor in the REPL

How to Test

# interactive
actionbase> doctor names

# non-interactive (requires #407)
actionbase -e "doctor names"

Exits 0 if no violations; exits 1 otherwise. Output example:

  VIOLATION  [table] abc_user_v1_20260218T2029  (sys.abc_user_v1_20260218T2029)
Scanned 2 storage(s), 5 database(s), 42 table(s), 10 alias(es). 1 violation(s) found.

AI Assistance

  • This PR was written largely with AI assistance.
    • Tool / model: Claude Sonnet 4.6

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files. size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. size:S This PR changes 10-29 lines, ignoring generated files. labels Jul 9, 2026
@em3s em3s changed the title Add validate_resource_names.sh to detect naming policy violations Add doctor subcommand for resource name validation Jul 10, 2026
@em3s em3s changed the title Add doctor subcommand for resource name validation Add non-interactive mode and doctor command Jul 10, 2026
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jul 10, 2026
@em3s em3s changed the title Add non-interactive mode and doctor command Add doctor command for resource name validation Jul 10, 2026
@em3s
em3s changed the base branch from main to feat/non-interactive-mode July 10, 2026 02:33
Base automatically changed from feat/non-interactive-mode to main July 10, 2026 03:59
Scans all storages, databases, tables, and aliases and reports names
violating the naming policy (^[a-z][a-z0-9_]{0,63}$). Prints a scan
summary on completion.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
@em3s
em3s force-pushed the feat/validate-resource-names-script branch from afb8a7c to 5b5879e Compare July 10, 2026 04:09
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jul 10, 2026
@em3s em3s changed the title Add doctor command for resource name validation Add doctor names command Jul 10, 2026
@em3s em3s changed the title Add doctor names command Add doctor names command to detect naming policy violations Jul 10, 2026
@em3s

em3s commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Optimistic merge

@em3s
em3s merged commit faccf7a into main Jul 10, 2026
3 checks passed
@em3s
em3s deleted the feat/validate-resource-names-script branch July 10, 2026 04:12
@em3s em3s self-assigned this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant