Skip to content

chore: bump .gts-spec to v0.13.4 - #27

Merged
Artifizer merged 3 commits into
mainfrom
validate-json
Sep 15, 2026
Merged

Artifizer merged 3 commits into
mainfrom
validate-json

Conversation

@Artifizer

@Artifizer Artifizer commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added an option to allow updates to existing entities and schemas through the server command.
    • Existing records with changed content are protected from accidental replacement by default.
    • Conflicting entity or schema registrations now return HTTP 409 Conflict.
    • Enabled updates replace existing content when explicitly permitted.

Protect registry state by rejecting changed schema and instance registrations by default while preserving idempotent re-submissions.

Allow callers to opt into replacement behavior with --allow-entity-updates, and return HTTP 409 for rejected changes.

Signed-off-by: Artifizer <artifizer@gmail.com>
Signed-off-by: Artifizer <artifizer@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 55d537e7-6b54-41bc-a087-0d1e6d28229f

📥 Commits

Reviewing files that changed from the base of the PR and between d0f4781 and def08e9.

📒 Files selected for processing (7)
  • .gts-spec
  • gts/src/gts/_cli.py
  • gts/src/gts/_server.py
  • gts/src/gts/ops.py
  • tests/test_cli.py
  • tests/test_ops.py
  • tests/test_server.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

GtsOps now detects conflicting entity and schema content. Conflicts preserve existing data and return HTTP 409 by default. The CLI adds --allow-entity-updates to enable replacements. Tests cover operation, CLI, and server behavior.

Changes

Entity Update Conflict Handling

Layer / File(s) Summary
Conflict detection and result contracts
gts/src/gts/ops.py, .gts-spec, tests/test_ops.py
Registration results now include conflict. Changed content returns a conflict unless updates are enabled. Identical content remains idempotent.
CLI and HTTP integration
gts/src/gts/_cli.py, gts/src/gts/_server.py, tests/test_cli.py, tests/test_server.py
The server CLI accepts --allow-entity-updates. Entity and schema conflicts return HTTP 409. Tests cover default rejection and enabled updates.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant Server
  participant GtsOps
  participant Store
  Client->>Server: Register entity or schema
  Server->>GtsOps: Call add_entity or add_schema
  GtsOps->>Store: Check existing content
  alt Changed content and updates disabled
    GtsOps-->>Server: Conflict result
    Server-->>Client: HTTP 409
  else Updates enabled or content identical
    GtsOps-->>Server: Success result
    Server-->>Client: HTTP 200
  end
Loading

Merge Risk: ⚪ Minimal · up to def08

The conflict-handling change has no identified current-head defect requiring resolution before merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 34 functions across 6 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the .gts-spec submodule update, but it does not identify the main implementation change: conflict handling and optional entity updates. It remains related to the chang…
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 34 functions across 6 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch validate-json

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.

…orted

Signed-off-by: Artifizer <artifizer@gmail.com>
@Artifizer
Artifizer merged commit e632dcd into main Sep 15, 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.

1 participant