Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
df24b0f
fix: enforce schema dialect semantics
Artifizer Sep 23, 2026
0917306
fix: reject mixed local references
Artifizer Sep 23, 2026
317b24f
chore: support GTS spec v0.14.1
Artifizer Sep 24, 2026
e93a33c
test(files_reader): avoid assuming filesystem discovery order
Artifizer Sep 24, 2026
0bce0fc
fix: require canonical type schema identity
Artifizer Sep 24, 2026
b34ca2c
chore: support gts-spec v0.14.2
Artifizer Sep 25, 2026
0f7ac54
fix(validation): enforce dialect checks on instance paths
Artifizer Sep 25, 2026
00969bd
fix(store): make registration atomic and isolated
Artifizer Sep 25, 2026
aef6072
fix(store): cache schema registry and secure diagnostics
Artifizer Sep 25, 2026
86c1c25
chore(spec): pin conformance suite to gts-spec v0.14.3
Artifizer Sep 25, 2026
98711c9
feat(core): structured errors, focused schema modules, and compatibil…
Artifizer Sep 25, 2026
fdce27d
chore(types): fix mypy findings and gate `make check` on mypy
Artifizer Sep 25, 2026
b5d5f1a
fix(store): check ancestor $ref dialects during chain validation
Artifizer Sep 26, 2026
ec5ffd5
Register x-gts-ref as a JSON Schema keyword; fix id parsing and matching
Artifizer Sep 26, 2026
9b052b9
fix(store): resolve /$id in x-gts-ref during combinator resolution
Artifizer Sep 26, 2026
df21598
feat(ops): honor validate and gts-ref-validation on batch add_schemas
Artifizer Sep 27, 2026
bb5f4b0
feat(store): stage validate=true registration behind a committed overlay
Artifizer Sep 27, 2026
39e9387
fix: fix formatting issues
Artifizer Sep 27, 2026
a4c00f5
test: run the staging concurrency test under `make test`
Artifizer Sep 27, 2026
bcc2881
fix(store): make validate=true batch staging leak-, conflict- and dep…
Artifizer Sep 27, 2026
9ca6d38
fix(validation): bound patternProperties key matching to prevent ReDoS
Artifizer Sep 28, 2026
add874a
Isolate staging per session and publish batches atomically
Artifizer Sep 28, 2026
a7ccbf2
chore: update to gts-spec v0.14.4
Artifizer Sep 28, 2026
d68e70a
fix: fix formatting
Artifizer Sep 28, 2026
0a6faeb
fix(validation): make regex dialect handling explicit
Artifizer Sep 29, 2026
dcca589
fix: persist batch updates with inherited dialects
Artifizer Sep 29, 2026
46b09b2
chore: bump gts-spec pin to v0.14.5
Artifizer Sep 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gts-spec-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.14.5
29 changes: 23 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(error PYTHON must be set for local package targets (examples: venv: PYTHON=.ve
endif
endif

.PHONY: help py-env install build install-local uninstall-local clean dev-fmt all check fmt lint clippy mypy test security update-spec e2e coverage gts-server
.PHONY: help py-env install build install-local uninstall-local clean dev-fmt all check fmt lint clippy mypy test security update-spec verify-spec-version e2e coverage gts-server

# Default target - show help
.DEFAULT_GOAL := help
Expand Down Expand Up @@ -125,8 +125,8 @@ PORT ?= 8000
gts-server: install
$(PYTHON) -m gts server --host 127.0.0.1 --port $(PORT)

# Run end-to-end tests against gts-spec
e2e: install
# Run end-to-end tests against gts-spec (pinned via .gts-spec-version)
e2e: install verify-spec-version
@echo "Starting server in background..."
@$(PYTHON) -m gts server --port 8000 & echo $$! > .server.pid
@sleep 2
Expand All @@ -144,12 +144,29 @@ security: py-env
$(PYTHON) -m pip install pip-audit
$(PYTHON) -m pip_audit

# Update gts-spec submodule to latest
# Spec conformance suite is pinned in .gts-spec-version (format vMAJOR.MINOR.PATCH)
# so every checkout reproduces the same e2e run, mirroring the Rust reference.
GTS_SPEC_VERSION ?= $(shell cat .gts-spec-version 2>/dev/null)

# Check out the gts-spec submodule at the pinned .gts-spec-version tag
update-spec:
git submodule update --remote .gts-spec
git submodule update --init .gts-spec
git -C .gts-spec fetch --tags --quiet origin
git -C .gts-spec checkout --quiet "$(GTS_SPEC_VERSION)"
@echo "gts-spec pinned to $(GTS_SPEC_VERSION)"

# Fail if the checked-out gts-spec submodule does not match the pinned version
verify-spec-version:
@current="$$(git -C .gts-spec describe --tags 2>/dev/null)"; \
if [ "$$current" != "$(GTS_SPEC_VERSION)" ]; then \
echo "gts-spec is at '$$current' but .gts-spec-version pins '$(GTS_SPEC_VERSION)'"; \
echo "run 'make update-spec' to sync"; \
exit 1; \
fi; \
echo "gts-spec matches pinned $(GTS_SPEC_VERSION)"

# Run all checks and build
all: check build

# Run all quality checks
check: fmt lint test e2e
check: fmt lint mypy test e2e
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

A minimal, idiomatic Python library for working with **GTS** ([Global Type System](https://github.com/gts-spec/gts-spec)) identifiers and JSON/JSON Schema artifacts.

Current supported GTS spec version: `0.14.0`
Current supported GTS spec version: `0.14.5`

## Roadmap

Expand Down
6 changes: 3 additions & 3 deletions gts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Python helpers and a reference HTTP service for the [Global Type System (GTS)](https://github.com/globaltypesystem/gts-spec). The package supports GTS identifier parsing, JSON Schema-backed validation, schema compatibility and derivation checks, traits, casting, queries, file loading, a CLI, and a FastAPI application.

The package targets GTS specification v0.14.0 and requires Python 3.9 or later.
The package targets GTS specification v0.14.5 and requires Python 3.9 or later.

## Installation

Expand Down Expand Up @@ -185,7 +185,7 @@ ops.reload_from_path("replacement-directory")

ops.add_entity(content, validate=False)
ops.add_entities([content_a, content_b])
ops.add_schema(type_id, schema)
ops.add_schemas([schema_a, schema_b])
ops.extract_id(content)
ops.validate_id(gts_id)
ops.parse_id(gts_id)
Expand Down Expand Up @@ -268,7 +268,7 @@ app = GtsHttpServer(ops=GtsOps()).app
| `/entities/{gts_id}` | `GET` | Retrieves one entity. |
| `/entities` | `POST` | Entity/schema body; optional `validate=true` runs full validation. Failed registration returns 422 and is rolled back. |
| `/entities/bulk` | `POST` | JSON array of entity/schema objects. |
| `/type-schemas` | `POST` | `{"type_id": "...~", "type_schema": {...}}`. |
| `/type-schemas` | `POST` | JSON array of GTS Type Schema objects (batch); each entry's `type_id` is derived from its embedded `$id`. Returns `{"ok": ..., "results": [{"ok": ..., "type_id": ..., "error": ...}]}`. |
| `/validate-id` | `GET` | `gts_id` query parameter. |
| `/extract-id` | `POST` | JSON entity/schema object. |
| `/parse-id` | `GET` | `gts_id` query parameter. |
Expand Down
Loading
Loading