Skip to content

[Route Weight][testgen] Add round-1 repo-review schema validator edge tests #2620

Description

@stranske

Why

scripts/repo_review_round1_schema.py gates round-1 reviewer findings before they feed the weekly repo-review workflow. The validator contains subtle checks for repo-relative refs, generic summaries, Workflows misroutes, candidate substance, and expected repo matching. This is a safe Route-Weight testgen opener because it is pure JSON validation.

Scope

  • Add focused tests for scripts/repo_review_round1_schema.py.
  • Cover _looks_like_repo_relative_path() with bare paths, :line ranges, markdown anchors with spaces, URLs, prose with spaces, and empty values.
  • Cover validate_implementation_piece() required fields and allowed statuses.
  • Cover validate_candidate() for generic gap phrases, invalid refs, too-short fields, missing test-like AC, Workflows misroute title tokens, and valid candidate acceptance.
  • Cover validate_findings() for expected repo mismatch, pilot agent allowance, generic summaries, and a fully valid minimal payload.

Acceptance Criteria

  • Tests use in-memory payload dictionaries only.
  • Tests assert precise error substrings for the important guardrails.
  • Existing schema contract remains strict.

Validation

pytest -q tests/scripts/test_repo_review_round1_schema.py

Route-Weight Metadata

  • task_type: testgen
  • lane: opener
  • safe_opener: true
  • defect_class: repo-review-round1-schema-coverage-gap
  • source: 2026-06-27-direct-exploration-next-wave

Non-Goals

  • Do not relax the schema to make tests pass.
  • Do not change repo-review prompts.
  • Do not write report artifacts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    from:codexCreated from Codex agentpriority:normalNormal-priority weekly repo-review workrepo-review-approvedApproved by weekly design-vs-implementation repo reviewrisk:lowLow risk changestatus: readyReady to work ontestingSynthesized from ChatGPT import for testing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions