review_and_remediate
Assess code for security, standards, readiness, and sustainability; automatically apply fixes, run tests to confirm they work, and return a scorecard, diff, and updated code.
Instructions
Review code across security, standards, readiness, and sustainability; automatically fix the issues; verify the fix by running its tests; and return the findings, a per-dimension scorecard over all rules (passes included, for coverage attestation), the remediated code, a diff, citations, and a metrics-style summary.
Args:
code: the source code to review.
language: the source language (default: python).
tests: optional — the code's test suite if it lives in a separate file.
Provide it so the review runs the tests (they should import the code as
solution, e.g. from solution import ...) and doesn't false-positive on
"no tests detected".
tests_dir: optional — path to the code's test directory. Confirms tests are
present (RDY-03) WITHOUT running them; this is how coverage is attested in
detect-only mode (CODEPECKER_REMEDIATE=false), which skips test execution.
support_files: optional {filename: source} of sibling modules the code (or its
tests) imports — e.g. {"crypto.py": "...", "db.py": "..."}. They're written
into the sandbox next to the code so a local from crypto import ...
resolves instead of crashing test collection. Local files only; nothing is
installed from a package index.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| tests | No | ||
| language | No | python | |
| tests_dir | No | ||
| support_files | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||