Skip to content

[rfc] Simplifying the New Health Check #75

@theap06

Description

@theap06

A clear and concise description of what you want to happen.

  1. Add a scaffold tool:
    Introduce:
    bin/create_new_health_check.py <check_name>
    It generates/updates:
    gcm/health_checks/checks/check_.py (template)
    gcm/tests/health_checks_tests/test_check_.py (template)
    registration in gcm/health_checks/checks/init.py
    registration in gcm/health_checks/cli/health_checks.py
    docs stub under website/docs/GCM_Health_Checks/health_checks/
    checklist output for remaining manual steps (if any)

Optional flags:
--dry-run
--group (for grouped/subcommand checks)

  1. Add shared boilerplate helper:
    Create a small utility for common check runtime setup:
    logger init
    telemetry/output context setup
    killswitch pattern
    standardized exit-code/message flow
    New checks should use this helper; existing checks migrate gradually.

Acceptance Criteria
Running create_new_health_check.py check_example produces a compilable check scaffold and test/docs stubs.
New check is auto-registered in CLI and checks package.
Generated check includes killswitch wiring and telemetry/output skeleton.
Script is idempotent (re-running does not duplicate entries).
Developer docs are updated with usage instructions.

Success Metrics
Fewer manual file edits per new check.
Reduced time-to-first-working-check.
Fewer review comments for missed registration/docs/killswitch steps.

A clear and concise description of any alternative solutions or features you've considered, if any.

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions