Skip to content

fix: address PR37 review feedback — zero line counts and verification enum YAML#41

Merged
haasonsaas merged 1 commit intomainfrom
fix/pr37-review-feedback
Mar 14, 2026
Merged

fix: address PR37 review feedback — zero line counts and verification enum YAML#41
haasonsaas merged 1 commit intomainfrom
fix/pr37-review-feedback

Conversation

@haasonsaas
Copy link
Collaborator

Summary

  • diff_parser: Add regression assertions and a TDD test for zero line counts in hunk headers (@@ -0,0 +1,N @@ and @@ -N,N +0,0 @@). PR37/Bugbot had flagged that a .filter(|v| *v > 0) would break new/deleted file parsing; main already uses parse_optional_capture without that filter; these tests would fail if it were re-introduced.
  • config: Add tests that deserialize verification_model_role and verification_consensus_mode from YAML (flat keys into config.verification). Covers weak/majority and primary/all; uses config.verification.model_role / consensus_mode after the VerificationConfig flatten refactor on main.

Test plan

  • cargo test diff_parser — 15 tests (includes test_parse_deleted_file, test_parse_new_file, test_parse_new_file_multi_line_zero_old_lines).
  • cargo test test_config_deserialize_verification — 2 tests for YAML deserialize of verification enums.
  • CI: version, lint, security, test, mutation, review.

Made with Cursor

… enum YAML

- diff_parser: add regression assertions for @@ -0,0 +1,N @@ and @@ -N,N +0,0 @@
  so zero line counts are preserved (Bugbot/CRITICAL). Add TDD test
  test_parse_new_file_multi_line_zero_old_lines. Main already uses
  parse_optional_capture without a zero filter; tests would fail if re-introduced.
- config: add tests that deserialize verification_model_role and
  verification_consensus_mode from YAML (flat keys into config.verification).
  Assert weak/majority and primary/all; use config.verification.* after
  VerificationConfig flatten refactor.

Made-with: Cursor
@cursor
Copy link

cursor bot commented Mar 14, 2026

PR Summary

Low Risk
Test-only changes that add regression coverage for diff parsing edge cases and YAML config deserialization; no production logic changes.

Overview
Adds regression/TDD tests to ensure DiffParser preserves old_lines/new_lines when hunk headers contain zeros (new/deleted files), including multi-line additions.

Adds YAML deserialization tests to verify flattened verification_model_role and verification_consensus_mode enum fields correctly populate config.verification (e.g., weak/majority, primary/all).

Written by Cursor Bugbot for commit c32c679. This will update automatically on new commits. Configure here.

@haasonsaas haasonsaas merged commit 9f2e265 into main Mar 14, 2026
13 checks passed
@haasonsaas haasonsaas deleted the fix/pr37-review-feedback branch March 14, 2026 18:02
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