Skip to content

refactor: exclude ui-only git ids from codable payloads#93

Merged
ori0o0p merged 1 commit intomainfrom
feature/git-model-codingkeys
Feb 16, 2026
Merged

refactor: exclude ui-only git ids from codable payloads#93
ori0o0p merged 1 commit intomainfrom
feature/git-model-codingkeys

Conversation

@ori0o0p
Copy link
Member

@ori0o0p ori0o0p commented Feb 16, 2026

Summary

  • add explicit CodingKeys for GitFileChange, GitBranch, and GitStash to keep id as a view-only field
  • prevent UI-only random UUIDs from being serialized/deserialized in Git model payloads
  • add regression tests that assert id is excluded from encoded JSON while existing fields remain intact

Testing

  • swift test --filter EncodingExcludesUIOnlyID
  • swift test --filter GitServiceTests
  • swift test
  • swift build -c release

Closes #92

@ori0o0p ori0o0p merged commit ea84aa9 into main Feb 16, 2026
1 check passed
@ori0o0p ori0o0p deleted the feature/git-model-codingkeys branch February 16, 2026 13:27
ori0o0p added a commit that referenced this pull request Feb 20, 2026
refactor: exclude ui-only git ids from codable payloads
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.

Harden Git model serialization by excluding UI-only id fields

1 participant