feat: support configurable GTS ID prefixes#106
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR makes GTS identifier prefixes configurable at compile time, updates parsing, macro, validator, and schema-generation code to use the new prefix constants, adds a ChangesConfigurable prefix and identifier macro
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
d21a1ee to
1229d16
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
gts-validator/src/format/json.rs (1)
80-98: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winValidate every non-pointer
x-gts-refvalue.Line 98 still uses the generic candidate pre-filter for
x-gts-ref. Becausex-gts-refonly permits GTS IDs/patterns,/..., or*, a stale prefix likegts.x...under a customGTS_ID_PREFIXis now silently skipped instead of reported.Proposed fix
- if looks_like_filename { + if looks_like_filename && !is_xgts_ref { return; } - if looks_like_gts_candidate(candidate_str) { + if is_xgts_ref || looks_like_gts_candidate(candidate_str) { match normalize_candidate(candidate_str) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@gts-validator/src/format/json.rs` around lines 80 - 98, The x-gts-ref validation path in json formatting is still relying on the generic looks_like_gts_candidate pre-filter, which can skip invalid non-pointer values instead of reporting them. Update the validation logic around is_xgts_ref, looks_like_filename, and looks_like_gts_candidate so that x-gts-ref accepts only "/", "*", or valid GTS IDs/patterns and does not suppress stale prefixed values like gts.x... under a custom prefix; ensure non-pointer x-gts-ref strings are always checked and rejected when they are not valid refs.
🧹 Nitpick comments (2)
gts-validator/src/normalize.rs (1)
46-60: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover the non-default prefix path in this module's tests.
normalize_candidateis now driven byGTS_ID_PREFIX/GTS_ID_URI_PREFIX, but the tests below still hardcodegts.literals. That leaves the newly supported custom-prefix build unexercised here.🧪 Example adjustment
#[test] fn test_normalize_gts_uri() { - let result = normalize_candidate("gts://gts.x.core.type.v1~").unwrap(); - assert_eq!(result.gts_id, "gts.x.core.type.v1~"); - assert_eq!(result.original, "gts://gts.x.core.type.v1~"); + let id = format!("{GTS_ID_PREFIX}x.core.type.v1~"); + let uri = format!("{GTS_ID_URI_PREFIX}{id}"); + let result = normalize_candidate(&uri).unwrap(); + assert_eq!(result.gts_id, id); + assert_eq!(result.original, uri); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@gts-validator/src/normalize.rs` around lines 46 - 60, The tests in this module still hardcode the default gts. prefix, so the custom-prefix path in normalize_candidate is not being exercised. Update the tests around normalize_candidate to reference GTS_ID_PREFIX and GTS_ID_URI_PREFIX instead of literal gts. strings, and add coverage that verifies normalization and rejection behavior when the build is configured with a non-default prefix. Keep the assertions aligned with the same helper names so the prefix-driven logic in normalize_candidate is covered in both plain and URI forms.gts-macros/src/lib.rs (1)
2302-2306: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd direct negative coverage for
gts_id!.The new proc-macro path is still missing coverage according to the PR notes, and the uncovered branches here are the ones most likely to regress silently: malformed standalone input in
gts-macros/src/lib.rsand bad-body handling ingts-macros/src/id_arg.rs. A small compile-fail case forgts_id!(123)plus one nestedtype_id = gts_id!(123)case would lock down both diagnostics cheaply.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@gts-macros/src/lib.rs` around lines 2302 - 2306, Add direct negative test coverage for gts_id! by exercising the proc-macro entry point in gts_id and the parsing path in id_arg::build_prefixed_lit. Add a compile-fail case for malformed standalone input like gts_id!(123), and a second case for invalid nested usage like type_id = gts_id!(123), so both the top-level macro input handling and the bad-body diagnostics stay covered.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@gts-id/src/parse.rs`:
- Around line 319-323: The parser test module is only partially prefix-agnostic
because some success-path fixtures still use hardcoded gts IDs while the error
assertions already reference GTS_ID_PREFIX. Update the affected tests in
parse.rs to build expected and input IDs from the configurable prefix instead of
literal "gts...." strings, using the existing parser test helpers and any
prefix-aware constants or constructors in the module. Make sure the cases around
the checked assertions and related success-path tests all derive from the same
prefix source so the module passes under non-default compile-time prefixes.
In `@gts-id/src/prefix.rs`:
- Around line 86-90: The test test_default_prefix_is_in_effect is hardcoding the
default prefix, so it fails when GTS_ID_PREFIX is overridden at compile time.
Update the assertion logic to reference GTS_ID_PREFIX and DEFAULT_GTS_ID_PREFIX
in a way that accepts the active configured value, rather than requiring "gts."
specifically. Keep the test aligned with the prefix constants in prefix.rs so it
validates the compile-time override behavior instead of rejecting it.
In `@gts-macros/README.md`:
- Around line 797-799: The README text for the gts_id macro is hardcoding the
backward-compatible full literal as gts...., which is misleading when
GTS_ID_PREFIX is overridden. Update the documentation around gts_id! and the
full-literal form to state that the accepted literal uses the configured prefix
value, while keeping the note that qualified paths like
gts_macros::gts_id!("...") are supported.
---
Outside diff comments:
In `@gts-validator/src/format/json.rs`:
- Around line 80-98: The x-gts-ref validation path in json formatting is still
relying on the generic looks_like_gts_candidate pre-filter, which can skip
invalid non-pointer values instead of reporting them. Update the validation
logic around is_xgts_ref, looks_like_filename, and looks_like_gts_candidate so
that x-gts-ref accepts only "/", "*", or valid GTS IDs/patterns and does not
suppress stale prefixed values like gts.x... under a custom prefix; ensure
non-pointer x-gts-ref strings are always checked and rejected when they are not
valid refs.
---
Nitpick comments:
In `@gts-macros/src/lib.rs`:
- Around line 2302-2306: Add direct negative test coverage for gts_id! by
exercising the proc-macro entry point in gts_id and the parsing path in
id_arg::build_prefixed_lit. Add a compile-fail case for malformed standalone
input like gts_id!(123), and a second case for invalid nested usage like type_id
= gts_id!(123), so both the top-level macro input handling and the bad-body
diagnostics stay covered.
In `@gts-validator/src/normalize.rs`:
- Around line 46-60: The tests in this module still hardcode the default gts.
prefix, so the custom-prefix path in normalize_candidate is not being exercised.
Update the tests around normalize_candidate to reference GTS_ID_PREFIX and
GTS_ID_URI_PREFIX instead of literal gts. strings, and add coverage that
verifies normalization and rejection behavior when the build is configured with
a non-default prefix. Keep the assertions aligned with the same helper names so
the prefix-driven logic in normalize_candidate is covered in both plain and URI
forms.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e9139331-41c1-4b40-bbff-e2da11b562ba
📒 Files selected for processing (34)
README.mdgts-cli/src/gen_schemas.rsgts-id/README.mdgts-id/build.rsgts-id/src/gts_id.rsgts-id/src/gts_id_segment.rsgts-id/src/lib.rsgts-id/src/parse.rsgts-id/src/prefix.rsgts-macros/README.mdgts-macros/src/id_arg.rsgts-macros/src/instance.rsgts-macros/src/lib.rsgts-macros/tests/compile_fail/instance_id_not_literal.stderrgts-macros/tests/compile_fail/instance_raw_id_not_literal.stderrgts-macros/tests/golden/traits_bool_false.rsgts-macros/tests/golden/traits_bool_true.rsgts-macros/tests/golden/traits_generic_child.rsgts-macros/tests/golden/traits_inline_chain.rsgts-macros/tests/golden/traits_referenced_chain.rsgts-macros/tests/golden/traits_schema_narrowing.rsgts-macros/tests/golden/traits_struct_literal.rsgts-macros/tests/instance_macro_tests.rsgts-validator/src/format/json.rsgts-validator/src/format/markdown.rsgts-validator/src/normalize.rsgts-validator/src/output.rsgts/src/entities.rsgts/src/gts.rsgts/src/lib.rsgts/src/schema_refs.rsgts/src/schema_resolver.rsgts/src/schema_traits.rsgts/src/x_gts_ref.rs
1229d16 to
e722627
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
gts-id/src/gts_id.rs (1)
550-555: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winMake the UUID snapshot conditional on the default prefix.
Line 550 now feeds
to_uuid()a prefix-configured ID, but Line 555 still asserts the UUID for the defaultgts.input. Any non-defaultGTS_ID_PREFIXwill fail this test even ifto_uuid()is correct.Proposed fix
let uuid1 = id.to_uuid(); let uuid2 = id.to_uuid(); // UUIDs should be deterministic assert_eq!(uuid1, uuid2); - assert_eq!(uuid1.to_string(), "154302ad-df5c-56e6-97d4-f87c5faca44b"); + if crate::GTS_ID_PREFIX == crate::DEFAULT_GTS_ID_PREFIX { + assert_eq!(uuid1.to_string(), "154302ad-df5c-56e6-97d4-f87c5faca44b"); + }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@gts-id/src/gts_id.rs` around lines 550 - 555, The UUID snapshot test in GtsId::to_uuid is still hardcoded to the default gts. value even though the test now builds the ID with gts_id("x.core.events.event.v1~"), so it will fail under non-default GTS_ID_PREFIX settings. Update the test to derive the expected UUID from the actual configured prefix or only assert the fixed snapshot when the default prefix is in use, keeping the determinism check for uuid1 and uuid2 intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@gts-id/src/gts_id.rs`:
- Around line 550-555: The UUID snapshot test in GtsId::to_uuid is still
hardcoded to the default gts. value even though the test now builds the ID with
gts_id("x.core.events.event.v1~"), so it will fail under non-default
GTS_ID_PREFIX settings. Update the test to derive the expected UUID from the
actual configured prefix or only assert the fixed snapshot when the default
prefix is in use, keeping the determinism check for uuid1 and uuid2 intact.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4c93ba0c-3158-4b0b-9319-3bb0ce69a52e
📒 Files selected for processing (35)
README.mdgts-cli/src/gen_schemas.rsgts-id/README.mdgts-id/build.rsgts-id/src/gts_id.rsgts-id/src/gts_id_pattern.rsgts-id/src/gts_id_segment.rsgts-id/src/lib.rsgts-id/src/parse.rsgts-id/src/prefix.rsgts-macros/README.mdgts-macros/src/id_arg.rsgts-macros/src/instance.rsgts-macros/src/lib.rsgts-macros/tests/compile_fail/instance_id_not_literal.stderrgts-macros/tests/compile_fail/instance_raw_id_not_literal.stderrgts-macros/tests/golden/traits_bool_false.rsgts-macros/tests/golden/traits_bool_true.rsgts-macros/tests/golden/traits_generic_child.rsgts-macros/tests/golden/traits_inline_chain.rsgts-macros/tests/golden/traits_referenced_chain.rsgts-macros/tests/golden/traits_schema_narrowing.rsgts-macros/tests/golden/traits_struct_literal.rsgts-macros/tests/instance_macro_tests.rsgts-validator/src/format/json.rsgts-validator/src/format/markdown.rsgts-validator/src/normalize.rsgts-validator/src/output.rsgts/src/entities.rsgts/src/gts.rsgts/src/lib.rsgts/src/schema_refs.rsgts/src/schema_resolver.rsgts/src/schema_traits.rsgts/src/x_gts_ref.rs
✅ Files skipped from review due to trivial changes (11)
- gts-macros/tests/compile_fail/instance_raw_id_not_literal.stderr
- gts/src/schema_traits.rs
- README.md
- gts-macros/tests/golden/traits_referenced_chain.rs
- gts-macros/tests/golden/traits_inline_chain.rs
- gts-macros/tests/golden/traits_schema_narrowing.rs
- gts/src/schema_refs.rs
- gts-id/README.md
- gts-macros/tests/golden/traits_bool_true.rs
- gts-macros/tests/compile_fail/instance_id_not_literal.stderr
- gts-macros/README.md
🚧 Files skipped from review as they are similar to previous changes (21)
- gts-macros/tests/golden/traits_struct_literal.rs
- gts-id/build.rs
- gts/src/schema_resolver.rs
- gts/src/lib.rs
- gts-macros/tests/golden/traits_generic_child.rs
- gts-macros/src/id_arg.rs
- gts-validator/src/output.rs
- gts-id/src/prefix.rs
- gts-validator/src/format/markdown.rs
- gts-validator/src/normalize.rs
- gts-id/src/gts_id_segment.rs
- gts/src/entities.rs
- gts/src/x_gts_ref.rs
- gts-macros/tests/golden/traits_bool_false.rs
- gts-id/src/lib.rs
- gts-id/src/parse.rs
- gts-macros/src/instance.rs
- gts-validator/src/format/json.rs
- gts-macros/src/lib.rs
- gts-cli/src/gen_schemas.rs
- gts-macros/tests/instance_macro_tests.rs
8b76709 to
e722627
Compare
|
[high] Configurable-prefix support is still incomplete for chain-derived IDs. The PR updates parsing/validation to honor Examples I found:
Why this matters: Suggested fix: |
- Add compile-time GTS_ID_PREFIX configuration with validation and Cargo rebuild tracking. - Thread the configured prefix through ID parsing, schema generation, validation, and schema reference handling. - Add macro argument support and tests for prefix-aware ID construction. Signed-off-by: Aviator 5 <ai.agent.tor@gmail.com>
e722627 to
522a8ee
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
gts-macros/tests/inheritance_tests.rs (1)
400-419: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winFinish the schema-URI migration in this suite.
A lot of the raw ID expectations were updated to
gts_id!(...), but this file still has multiple$id/$refassertions hard-coded to"gts://gts...."(for example Line 664, Line 707, Line 718, Line 1570, Line 1778, and Line 2580). That keeps the inheritance tests tied to the default prefix even when the configured-prefix run is enabled.🔧 Suggested fix
- assert_eq!(topic_schema["$id"], "gts://gts.x.core.events.topic.v1~"); + assert_eq!( + topic_schema["$id"], + format!("gts://{}", gts_id!("x.core.events.topic.v1~")) + ); - assert_eq!(first["$ref"], "gts://gts.x.core.events.topic.v1~"); + assert_eq!( + first["$ref"], + format!("gts://{}", gts_id!("x.core.events.topic.v1~")) + );Based on learnings,
make checkincludestest-gts-id-prefix; the PR objective says schema generation and schema reference handling should honor the configured prefix.Also applies to: 2548-2551, 2697-2701, 2715-2717
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@gts-macros/tests/inheritance_tests.rs` around lines 400 - 419, Finish the schema-URI migration in the inheritance tests by replacing the remaining hard-coded "gts://gts...." $id/$ref expectations with prefix-aware assertions using gts_id!(...) or equivalent configured-prefix values. Update the affected checks in the test suite around test_schema_inheritance and the other referenced assertions so schema generation and reference handling validate against the active prefix instead of the default URI.Source: Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 241-242: The Checkout step currently leaves the default token
persisted in git config, which broadens exposure after the repository code is
checked out. Update the actions/checkout usage in the Checkout job step to
explicitly set persist-credentials to false so the token is not retained for
subsequent build scripts or proc macros.
In `@gts-dylint/src/lib.rs`:
- Around line 42-48: The default prefix list in configured_prefixes() only
includes gts., so gts:// literals are not caught when GTS_DYLINT_PREFIXES is
unset. Update configured_prefixes() to include gts:// in the default Vec, or
ensure the entrypoints that invoke cargo dylint --all explicitly export both
prefixes. Use the existing configured_prefixes() symbol as the main place to
make the default behavior cover both schema URI forms.
- Line 47: The default branch in the prefix list builder currently hard-codes
the forbidden "gts." literal; keep the behavior but make the exception explicit
by adding the documented narrow suppression on the relevant item in
gts-dylint/src/lib.rs. Locate the match arm in the prefix-building logic and
apply #[allow(unknown_lints, gts_id_hardcoded_prefix)] only where this
intentional fallback is needed, so the hard-coded prefix is clearly exempted
rather than silently reintroduced.
In `@gts-macros/tests/integration_tests.rs`:
- Line 995: The $id assertions in the integration tests are still hardcoded to
the default gts:// prefix even though the schemas are registered with
gts_id!(...), so update the affected assertions to derive the expected $id using
the configured prefix instead of comparing against literal gts://gts... values.
Use the same prefix-aware helper or construction already used around
register_schema and the runtime-resolution checks in
gts-macros/tests/integration_tests.rs so the test coverage validates
configurable-prefix behavior consistently.
In `@Makefile`:
- Around line 44-50: The alternate-prefix coverage in test-gts-id-prefix is too
narrow because it only rebuilds and tests gts-id, so prefix-aware changes in
other touched crates can still slip through. Update the Makefile target to run
the relevant prefix-consuming crates from this PR under GTS_ID_PREFIX=acme., or
widen it to a workspace subset that exercises all affected code paths, so make
check actually validates the changed prefix behavior beyond gts-id.
---
Outside diff comments:
In `@gts-macros/tests/inheritance_tests.rs`:
- Around line 400-419: Finish the schema-URI migration in the inheritance tests
by replacing the remaining hard-coded "gts://gts...." $id/$ref expectations with
prefix-aware assertions using gts_id!(...) or equivalent configured-prefix
values. Update the affected checks in the test suite around
test_schema_inheritance and the other referenced assertions so schema generation
and reference handling validate against the active prefix instead of the default
URI.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 61530301-149a-4386-ae40-d0b5ec636cb9
⛔ Files ignored due to path filters (1)
gts-dylint/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (66)
.github/workflows/ci.yml.github/workflows/release.ymlCLAUDE.mdCargo.tomlMakefileREADME.mdgts-cli/src/gen_schemas.rsgts-dylint/.cargo/config.tomlgts-dylint/Cargo.tomlgts-dylint/README.mdgts-dylint/rust-toolchain.tomlgts-dylint/src/lib.rsgts-dylint/ui/no_trigger_non_gts.rsgts-dylint/ui/no_trigger_with_allow.rsgts-dylint/ui/trigger_gts_prefix.rsgts-dylint/ui/trigger_gts_prefix.stderrgts-id/README.mdgts-id/build.rsgts-id/src/gts_id.rsgts-id/src/gts_id_pattern.rsgts-id/src/gts_id_segment.rsgts-id/src/lib.rsgts-id/src/parse.rsgts-id/src/prefix.rsgts-macros-cli/src/main.rsgts-macros/README.mdgts-macros/src/id_arg.rsgts-macros/src/instance.rsgts-macros/src/lib.rsgts-macros/tests/compile_fail/gts_id_invalid_pattern.rsgts-macros/tests/compile_fail/gts_id_invalid_pattern.stderrgts-macros/tests/compile_fail/gts_id_missing_prefix.rsgts-macros/tests/compile_fail/gts_id_missing_prefix.stderrgts-macros/tests/compile_fail/instance_id_not_literal.stderrgts-macros/tests/compile_fail/instance_raw_id_not_literal.stderrgts-macros/tests/deprecated_schema_id_alias.rsgts-macros/tests/golden/traits_bool_false.rsgts-macros/tests/golden/traits_bool_true.rsgts-macros/tests/golden/traits_generic_child.rsgts-macros/tests/golden/traits_inline_chain.rsgts-macros/tests/golden/traits_referenced_chain.rsgts-macros/tests/golden/traits_schema_narrowing.rsgts-macros/tests/golden/traits_struct_literal.rsgts-macros/tests/inheritance_tests.rsgts-macros/tests/inheritance_tests_mixed.rsgts-macros/tests/instance_macro_tests.rsgts-macros/tests/integration_tests.rsgts-macros/tests/serde_rename_tests.rsgts-macros/tests/traits_tests.rsgts-macros/tests/value_dispatch_tests.rsgts-validator/src/format/json.rsgts-validator/src/format/markdown.rsgts-validator/src/normalize.rsgts-validator/src/output.rsgts/src/entities.rsgts/src/gts.rsgts/src/lib.rsgts/src/ops.rsgts/src/schema.rsgts/src/schema_modifiers.rsgts/src/schema_refs.rsgts/src/schema_resolver.rsgts/src/schema_traits.rsgts/src/store.rsgts/src/testing.rsgts/src/x_gts_ref.rs
✅ Files skipped from review due to trivial changes (26)
- gts-macros/tests/compile_fail/gts_id_missing_prefix.rs
- gts-dylint/.cargo/config.toml
- gts-dylint/rust-toolchain.toml
- gts-macros/tests/compile_fail/gts_id_invalid_pattern.stderr
- gts-macros/tests/compile_fail/gts_id_missing_prefix.stderr
- gts-macros/tests/compile_fail/gts_id_invalid_pattern.rs
- gts-dylint/ui/trigger_gts_prefix.stderr
- gts-dylint/ui/no_trigger_non_gts.rs
- gts-dylint/ui/trigger_gts_prefix.rs
- gts/src/ops.rs
- gts-dylint/Cargo.toml
- gts-dylint/ui/no_trigger_with_allow.rs
- gts-macros/tests/golden/traits_bool_false.rs
- gts-macros/README.md
- gts-validator/src/output.rs
- gts-macros/tests/compile_fail/instance_raw_id_not_literal.stderr
- gts/src/testing.rs
- gts-id/README.md
- gts-macros/tests/compile_fail/instance_id_not_literal.stderr
- gts/src/schema_traits.rs
- gts-macros/tests/golden/traits_bool_true.rs
- gts/src/schema_modifiers.rs
- gts-macros/tests/golden/traits_referenced_chain.rs
- gts-macros-cli/src/main.rs
- README.md
- CLAUDE.md
🚧 Files skipped from review as they are similar to previous changes (25)
- gts-macros/tests/golden/traits_generic_child.rs
- gts/src/lib.rs
- gts-id/build.rs
- gts-id/src/lib.rs
- gts-validator/src/normalize.rs
- gts-macros/tests/golden/traits_schema_narrowing.rs
- gts-validator/src/format/markdown.rs
- gts-id/src/prefix.rs
- gts-macros/tests/golden/traits_inline_chain.rs
- gts-macros/src/id_arg.rs
- gts-validator/src/format/json.rs
- gts/src/schema_resolver.rs
- gts-id/src/gts_id_segment.rs
- gts/src/entities.rs
- gts-macros/tests/golden/traits_struct_literal.rs
- gts/src/schema_refs.rs
- gts-macros/src/instance.rs
- gts/src/gts.rs
- gts/src/x_gts_ref.rs
- gts-macros/src/lib.rs
- gts-id/src/gts_id.rs
- gts-id/src/parse.rs
- gts-cli/src/gen_schemas.rs
- gts-macros/tests/instance_macro_tests.rs
- gts-id/src/gts_id_pattern.rs
cbf68c2 to
64bf86d
Compare
- Add a gts-dylint crate that warns on hard-coded "gts." string literals. - Wire the lint into workspace metadata, CI, release checks, and make check. - Document lint usage and add targeted suppressions for intentional prefix constants. Signed-off-by: Aviator 5 <ai.agent.tor@gmail.com>
64bf86d to
02a6752
Compare
thanks, fixed. I implemented |
Summary by CodeRabbit
GTS_ID_PREFIX) and updated identifier generation/validation to honor it.gts_id!macro with a prefix-awaregts_id!("...")marker form.gts-dylintlint to flag hard-coded GTS ID prefixes, configurable viaGTS_DYLINT_PREFIXES.$id/$ref, normalization, Markdown discovery, andx-gts-refhandling to use the configured prefix consistently.make dylint, and prefix-aware test instructions.test-gts-id-prefix) and dylint runs.