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.
7 lines
85 B
INI
7 lines
85 B
INI
[mutmut]
|
|
also_copy=
|
|
pyproject.toml
|
|
docker-compose.yml
|
|
config
|
|
scripts
|