Skip to content

Design: let languages select configured checks (Rust next) #71

Description

@rxdt

Contributor summary: Design the smallest clear rule for choosing Python, Rust, and shared checks in one runner. Document the rule and test all three modes. (Difficulty: medium)

Context

The Python process is the runner. It executes command arrays from pyproject.toml, records exit status, and renders the existing report. Do not add a Rust runner, RustGate class, or second harness configuration file.

Today [tool.harness.settings].languages is metadata and phase checks are flat dictionaries.

Desired rule

Use check-name prefixes:

  • py_*: execute only when py appears in languages.
  • rust_*: execute only when rust appears in languages.
  • harness_*: execute in every mode; these are language-neutral checks such as forbidden-path and diff-size validation.

Exact behavior:

languages execute
["py"] py_* + harness_*
["rust"] rust_* + harness_*
["py", "rust"] py_* + rust_* + harness_*

No command definitions are deleted when switching modes.

Compatibility question

Existing unprefixed checks must be classified: rename Python-only checks to py_*, rename language-neutral checks to harness_*, or define a narrowly scoped compatibility rule. Python-only embedded checks (for example preferences/Mutmut) must not run in Rust-only mode.

Trade-off

Prefixes preserve the current flat TOML shape and require the smallest selector change. Nested per-language tables are more explicit structurally but require more parser and report changes.

Acceptance

The three modes above are documented and tested. Human output and JSON retain the current result shape and show the configured check names.

How to contribute

Leave a short comment with your plan before coding. Keep changes focused, add or update tests, and run the checks in CONTRIBUTING.md. This is agentic developer tooling; pull requests from Python, Rust, and generalist contributors are welcome.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershacktoberfestOpen for Hacktoberfest contributionsup-for-grabsAvailable for outside contributors

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions