Skip to content

feat(cli): executable verification criteria (#432) - #574

Merged
dan-petty merged 1 commit into
release/v0.2.23from
feat/432-executable-verification-criteria
Sep 25, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.23from
feat/432-executable-verification-criteria

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary

Resolves #432.

Transforms verification and invalidation criteria from unexecuted prose descriptions into executable, verified assertions:

  1. Schema Models & Validation:
    • Defined VerificationCriterion and CriterionExecutionResult models in devops_cli.ai.review_schema.
    • Constrained criteria so each item is either a command from a closed read-only allowlist (executable: true) or explicitly marked unexecutable prose (executable: false).
    • Attached CriterionExecutionResult outputs directly to Finding.criteria_execution_results.
  2. Execution Sandbox:
    • Added command allowlist validator and bounded subprocess execution sandbox in devops_cli.ai.review.review_environment.
    • Enforced closed binary/subcommand allowlists (CONST_ALLOWED_CRITERIA_BINARIES, CONST_ALLOWED_GIT_SUBCOMMANDS, CONST_DISALLOWED_SHELL_TOKENS, CONST_FORBIDDEN_PYTHON_CRITERIA_MODULES).
    • Bounded execution with POSIX process group isolation (start_new_session=True), defensive signal termination, and output truncation.
  3. Pipeline Integration:
    • Integrated criteria execution into _deterministic_pre_verification and _apply_single_finding_verification.
    • Derived objective tool-grounded confidence_score and status from sandbox execution pass/fail outcomes, while preserving absent confidence scores when only unexecutable prose criteria exist.
  4. Persona Prompts & Guardrails:
    • Updated persona instructions across review.md, review_output_instruction.md, compose.md, and prompt.md.
    • Added comprehensive tests in tests/test_executable_criteria.py with structural tuple equality assertions.

Verification

  • uv run devops ci: All 10 gates passed (100%).
  • tests/test_executable_criteria.py: 17 passed.
  • All architectural invariants, complexity (M <= 10), and nesting depth (<= 5) maintained.

@dan-petty dan-petty added this to the v0.2.23 milestone Sep 25, 2026
@dan-petty
dan-petty merged commit fba3d47 into release/v0.2.23 Sep 25, 2026
7 checks passed
@dan-petty
dan-petty deleted the feat/432-executable-verification-criteria branch September 25, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant