Skip to content

020 subject serialization#31

Merged
akollegger merged 10 commits intomainfrom
020-subject-serialization
Nov 29, 2025
Merged

020 subject serialization#31
akollegger merged 10 commits intomainfrom
020-subject-serialization

Conversation

@akollegger
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements comprehensive subject identity and serialization capabilities for the gram-hs library, enabling robust round-trip serialization of graph patterns. The feature introduces automatic identity generation for anonymous subjects using a sequential ID strategy with the #<N> format.

Key Changes:

  • Stateful identity generation for anonymous subjects using State monad, ensuring unique IDs within each parse operation
  • Enhanced serialization with escape sequence support for control characters and special handling for implicit root patterns
  • Comprehensive test coverage including property-based testing for round-trip verification and collision avoidance

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
specs/020-subject-serialization/*.md Complete feature specification including tasks, research, data model, and API contracts
libs/gram/src/Gram/Transform.hs Implements stateful ID generation using #<N> format with collision detection
libs/gram/src/Gram/Serialize.hs Enhanced with control character escaping and implicit root serialization
libs/gram/src/Gram/Parse.hs Minor update to handle optional comma separators between patterns
libs/gram/tests/Spec/Gram/SerializeSpec.hs Added property tests and round-trip verification with QuickCheck generators
libs/gram/tests/Spec/Gram/ParseSpec.hs Updated all tests to verify generated #<N> IDs for anonymous subjects
libs/gram/gram.cabal Added QuickCheck dependency for property-based testing
TODO.md Updated to reflect completion of Feature 20
.cursor/rules/specify-rules.mdc Added feature context to development guidelines

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libs/gram/tests/Spec/Gram/SerializeSpec.hs
Comment thread specs/020-subject-serialization/data-model.md Outdated
Comment thread specs/020-subject-serialization/contracts/api.md Outdated
Comment thread specs/020-subject-serialization/contracts/api.md Outdated
Comment thread libs/gram/src/Gram/Transform.hs
Comment thread specs/020-subject-serialization/research.md
Comment thread specs/020-subject-serialization/research.md Outdated
Comment thread specs/020-subject-serialization/data-model.md Outdated
Comment thread libs/gram/src/Gram/Serialize.hs
Comment thread libs/gram/src/Gram/Serialize.hs
Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 29, 2025

@akollegger I've opened a new pull request, #32, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Andreas Kollegger <akollegger@gmail.com>
@akollegger
Copy link
Copy Markdown
Contributor Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 29, 2025

@akollegger I've opened a new pull request, #33, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits November 29, 2025 18:10
Co-authored-by: akollegger <53756+akollegger@users.noreply.github.com>
docs: align identity format spec with implementation (#<N>)
@akollegger akollegger merged commit b136ca1 into main Nov 29, 2025
1 check passed
@akollegger akollegger deleted the 020-subject-serialization branch November 29, 2025 21:51
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