Skip to content

Enforce expected_runtime and confidence for executable model responses#20

Merged
CoreyRDean merged 1 commit into
mainfrom
coreyrdean/review-engineering-agent-directives
Apr 21, 2026
Merged

Enforce expected_runtime and confidence for executable model responses#20
CoreyRDean merged 1 commit into
mainfrom
coreyrdean/review-engineering-agent-directives

Conversation

@CoreyRDean
Copy link
Copy Markdown
Owner

Motivation

  • The v1 spec requires executable proposals to include both an expected runtime and the model's confidence, and the codebase needed to consistently enforce that contract.
  • Strengthen defense-in-depth by validating those fields both in the JSON schema sent to backends and at runtime so backends that bypass schema still fail closed.

Description

  • Tighten the JSON schema in internal/model/schema.go to require expected_runtime and confidence for approach=command and approach=script branches.
  • Add presence checks for ExpectedRuntime and Confidence in Response.Validate() in internal/model/types.go so runtime validation matches the schema.
  • Update the mock backend in internal/model/mock/mock.go to populate ExpectedRuntime for the INTENT_MOCK_CMD override and sample responses so tests remain representative.
  • Add unit tests in internal/model/types_test.go that assert missing expected_runtime and confidence are correctly rejected for both command and script approaches.

Testing

  • Ran the focused packages tests with go test ./internal/model/... ./internal/cli/... which completed successfully.
  • Ran the full unit suite with go test ./... which completed successfully (all tests passed or reported as expected/cached).
  • The newly added internal/model/types_test.go passed as part of the above runs.

Codex Task

@CoreyRDean CoreyRDean merged commit ffc006c into main Apr 21, 2026
8 checks passed
@CoreyRDean CoreyRDean deleted the coreyrdean/review-engineering-agent-directives branch April 21, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant