Skip to content

feat(merge_requests): validate literal original diff selection - #637

Merged
sjungwon03 merged 1 commit into
devfrom
feat/636-literal-original-diff
Oct 11, 2026
Merged

sjungwon03 merged 1 commit into
devfrom
feat/636-literal-original-diff

Conversation

@sjungwon03

Copy link
Copy Markdown
Member

Summary

Validate original commit diff text and metadata before matching review endpoints. Malformed, truncated, omitted or contradictory input returns no selectable range instead of being silently repaired by the display parser. Retain literal text, nullable flags and deeply immutable validated hunks; existing display parsing and original range behavior remain compatible.

Closes #636

Validation

  • dart format .: 971 files; no outstanding changes.
  • flutter analyze: no issues.
  • All five package suites: 7,877 tests.
  • 56 new test-first cases. Parser stub fails 50; endpoint/origin tests fail six before implementation.
  • Generated models, dependencies, UI/layout/themes and localization: unchanged.
  • No live instance/device validation claimed.

Checklist

  • Targets dev, linked issue, Conventional Commit and DCO sign-off.
  • Test-first behavior and updated contract/parity docs.
  • English repository prose; no credentials.

Notes for reviewers

The validator accepts a conservative local textual format. It does not prove full server coverage or original commit references; captured origin/membership checks and guarded controller/private-save reservation/recovery UI remain follow-ups. This slice provides strict literal range matching without changing permissive display parsing.

Reject malformed or incomplete literal diff input before binding review endpoints, preserving raw text and immutable validated coordinates.

Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
@sjungwon03
sjungwon03 marked this pull request as ready for review October 11, 2026 04:39
@github-actions github-actions Bot added area:ui Screens and feature UI area:docs AGENTS.md, .agents/, README and friends feat New feature labels Oct 11, 2026

@sjungwon03-ai sjungwon03-ai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed commit 9a72ad2: All five remote PR blobs match the reviewed local commit. The literal validator rejects unsupported metadata, omitted content, malformed/truncated/overlapping hunks, unequal unchanged gaps, invalid count/coordinate bounds and stray/repeated no-newline markers without repairing raw text. Literal metadata and whitespace are retained; validated hunks, rows and selections are immutable. Literal range matching validates the whole input before the shared matcher; existing display parsing remains unchanged. Full format/analyze and 7,877 local tests pass, including 56 test-first cases. No blocking findings. Conservative local validation does not establish server coverage, original references or private-write safety; guarded controller/private-save UI remains a follow-up.

@sjungwon03
sjungwon03 merged commit 47b2184 into dev Oct 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs AGENTS.md, .agents/, README and friends area:ui Screens and feature UI feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate literal original commit diff before coordinate selection

2 participants