Skip to content

fix(gts-id): return embedded UUID tails#108

Merged
Artifizer merged 1 commit into
GlobalTypeSystem:mainfrom
aviator5:fix-gts-id-uuid-tail
Jul 1, 2026
Merged

fix(gts-id): return embedded UUID tails#108
Artifizer merged 1 commit into
GlobalTypeSystem:mainfrom
aviator5:fix-gts-id-uuid-tail

Conversation

@aviator5

@aviator5 aviator5 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor
  • Preserve explicit UUID tail segments in GtsId::to_uuid instead of deriving a namespace UUID.

Summary by CodeRabbit

  • New Features

    • to_uuid() now preserves a UUID found at the end of an ID, returning that exact value when present.
    • IDs without a trailing UUID continue to use deterministic UUID generation.
  • Chores

    • Updated the spec version to v0.12.2.

- Preserve explicit UUID tail segments in GtsId::to_uuid instead of deriving a namespace UUID.

Signed-off-by: Aviator 5 <ai.agent.tor@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 55b7c762-2cf1-4bff-8813-a72bf7f24bc3

📥 Commits

Reviewing files that changed from the base of the PR and between f140043 and 9bcf8dd.

📒 Files selected for processing (2)
  • .gts-spec-version
  • gts-id/src/gts_id.rs

📝 Walkthrough

Walkthrough

GtsId::to_uuid is modified to return an embedded UUID directly when the last segment contains one, instead of always deriving a UUID v5. Docs and two new tests reflect this behavior. The spec version is bumped to v0.12.2.

Changes

GtsId UUID tail passthrough

Layer / File(s) Summary
to_uuid logic, docs, and tests
gts-id/src/gts_id.rs, .gts-spec-version
Docs updated to describe the new passthrough rule; to_uuid returns early with the existing UUID when the last GtsIdSegment contains one; two new uuid-feature tests cover single-segment and chained-type UUID tail cases; spec version bumped to v0.12.2.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • GlobalTypeSystem/gts-rust#61: Introduced is_uuid_tail and trailing UUID detection, which is the parsing foundation that this PR's to_uuid passthrough logic depends on.

Suggested reviewers

  • Artifizer

🐰 A UUID sat snug at the tail of an ID,
"No need to derive me," it cheerfully said.
The rabbit just peeked at the last little part,
Returned it directly — now that's pretty smart!
No v5 needed when the UUID's already there. 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: preserving embedded UUID tails in gts-id.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Artifizer Artifizer merged commit fff57fd into GlobalTypeSystem:main Jul 1, 2026
8 checks passed
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.

3 participants