Merged
Conversation
…symbol' - Updated JSON Schema to use 'identity' field for Subject - Updated TypeScript types to use 'identity' field - Updated Rust types and tests to use 'identity' field - Updated all documentation examples in spec files - Updated CANONICAL-JSON-ALIGNMENT.md to reflect current state The Haskell implementation already used 'identity' correctly. This change synchronizes the contracts (schema, types, docs) with the actual implementation. Rationale: Field name should reflect semantic meaning (identity) rather than implementation type (Symbol). All tests pass: 249 examples, 0 failures.
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request standardizes the canonical JSON format for the Subject object by renaming the field "symbol" to "identity" across all documentation, schemas, type definitions, and code samples. This aligns the specification and contract files with the actual Haskell implementation, which already uses "identity", and ensures consistency across implementations (gram-hs, gram-rs, and related tooling).
Changes:
- Updated JSON Schema to require
"identity"instead of"symbol"for the Subject object with corresponding field description updates - Updated TypeScript and Rust type definitions, documentation, and test code to use
identityas the Subject identifier field - Updated all documentation files with corrected JSON examples, Haskell/Rust/TypeScript mappings, and attribute lists
- Updated alignment documentation to reflect that both gram-hs and gram-rs now correctly use
"identity", marking this field as already aligned
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| specs/029-canonical-json-pattern/research.md | Updated Haskell JSON parsing logic to expect "identity" field |
| specs/029-canonical-json-pattern/quickstart.md | Updated JSON examples in CLI output and programming language samples |
| specs/029-canonical-json-pattern/data-model.md | Updated data model documentation, field descriptions, validation rules, and all JSON examples |
| specs/029-canonical-json-pattern/contracts/typescript-types.ts | Updated TypeScript interface definition and field documentation |
| specs/029-canonical-json-pattern/contracts/rust-types.rs | Updated Rust struct definition, field documentation, and test assertions |
| specs/029-canonical-json-pattern/contracts/json-schema.json | Updated JSON Schema required fields and property definitions |
| docs/reference/CANONICAL-JSON-ALIGNMENT.md | Updated alignment status to show both implementations now use "identity" with explanatory notes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request standardizes the canonical JSON format for the "Subject" object by renaming the field
"symbol"to"identity"across all documentation, schemas, type definitions, and code samples. This ensures consistency between implementations (gram-hs, gram-rs, and related tooling) and aligns all references with the correct, canonical structure.Canonical JSON alignment and documentation:
data-model.md,quickstart.md, andCANONICAL-JSON-ALIGNMENT.md) to use"identity"instead of"symbol"for the Subject identifier, with updated examples, attribute lists, and Haskell/Rust/TypeScript mappings. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]Schema and type definition updates:
json-schema.json) to require"identity"instead of"symbol"for the Subject object and updated the field description.rust-types.rs) and TypeScript interface (typescript-types.ts) definitions to useidentityas the Subject identifier, with corresponding field documentation and test updates. [1] [2] [3]Implementation notes and alignment status:
"identity", and marked the field as already correct, requiring no further changes. Updated the status of the alignment process and provided additional notes for future development. [1] [2]Research and parsing logic:
research.mdto expect"identity"instead of"symbol"in JSON decoding.These changes collectively ensure that all documentation, code, and tooling reference the correct canonical field name, reducing confusion and potential integration errors across the project.