Files
nixos-core/pyproject.toml
T
kiskaadee b6ec909bb6 fix(core): resolve AST parser and strict model incompatibilities for mutation testing
Configure mutmut mutation testing framework, eliminate Parso AST syntax
errors in appctl engine, permit dynamic mutant injection on strict
Pydantic models, and prune redundant dead code.

- Tooling & Configuration:
  - Add setup.cfg defining authoritative [mutmut] runner configuration and file copy targets.
  - Update .gitignore to exclude mutants/ and .mutmut-cache/ directories.
- AST Parser Compatibility:
  - scripts/appctl_engine.py: rewrite parenthesized multi-context statements with
    'as' targets to nested with blocks (# noqa: SIM117) to prevent Parso 0.8.7
    grammar syntax errors during AST mutation.
- Pydantic v2 Invariants & Dead Code Removal:
  - scripts/appctl_contracts.py: configure ignored_types=(dict,) on StrictModel and
    OperationRequest to permit unannotated class-level mutant injection; replace
    unreachable OPERATION_PARAMS_MAP fallback defaults with direct mapping access.
  - scripts/core_manifest.py: configure ignored_types=(dict,) on strict manifest
    models; prune redundant branch patterns in classify_ref() down to single fallback.
  - scripts/appctl_auth.py: remove redundant target == "core" check in enforce_rbac().

Rationale: Mutmut failed to parse scripts/appctl_engine.py and threw PydanticUserError
when injecting unannotated mutant dictionaries into strict models with extra="forbid".
Resolving these AST and contract barriers allows mutation test runners to analyze
core control plane scripts hermetically.
2026-10-23 15:47:33 -05:00

25 lines
429 B
TOML

[project]
name = "homelab-core"
version = "0.1.0"
description = "Homelab Core platform and orchestration"
requires-python = ">=3.13"
dependencies = [
"pyyaml>=6.0",
"pydantic>=2.0,<3.0",
]
[tool.pyright]
include = ["scripts"]
extraPaths = ["scripts"]
venvPath = "."
venv = ".venv"
[tool.pytest.ini_options]
# Automatically adds app modules and script hooks to the sys.venvPath
pythonpath = [
".",
"scripts"
]