feat(catalog-gateway): unified resolve/lineage + first real DCAT emitter (read-only) - #1158
Open
mdheller wants to merge 1 commit into
Open
feat(catalog-gateway): unified resolve/lineage + first real DCAT emitter (read-only)#1158mdheller wants to merge 1 commit into
mdheller wants to merge 1 commit into
Conversation
…ter (read-only)
New apps/catalog-gateway — the GMS-equivalent seam over the Crystal Atlas catalog
families (docs/strategy/PROPHET_DATA_CATALOG_DESIGN.md), composing existing pieces
rather than reinventing them (file-state layout from crystal-atlas-contract-intel;
Crystal Atlas contract families as the API contract).
First increment (read-only):
* GET /v1/catalog/{kind}/{id} — resolve source|asset|model|workflow entry
* GET /v1/catalog/{kind}/{id}/lineage — upstream source_refs, best-effort resolved
* GET /v1/catalog/asset/{id}.dcat.json — the first REAL DCAT/schema.org emitter
(application/ld+json), carrying prophet:distributionClass — the moat exported.
app/store.py: read-only over $SOCIOPROFIT_STATE_HOME/prophet-platform/catalog/<kind>/<id>.json;
ids constrained to [A-Za-z0-9._:-], ".." refused, resolved-path-under-root enforced
(path traversal fails closed).
app/dcat.py: asset-catalog-entry.v0 → dcat:Dataset (accessRights from distribution_class,
prov:wasDerivedFrom from source_refs) + Prophet extension.
tests/ (7): healthz, resolve found/404, unknown-kind 404, DCAT emitter shape +
access-rights mapping, lineage, id-validation/traversal guard.
Not fork of crystal-atlas-contract-intel, not the Go tritrpc gateway. Next increments:
registration (write), search, real CKAN/DataHub-MCP/CK.org emitters off the DCAT bridge,
masking-PDP mount.
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.
The Catalog Gateway first increment (strategy item B) — the GMS-equivalent seam the data-catalog design brief calls for, built by composing what already exists rather than forking it.
What
New
apps/catalog-gateway/(FastAPI), read-only over the shared file-state layout, with the Crystal Atlas contract families as the API contract:GET /v1/catalog/{kind}/{id}— resolvesource|asset|model|workflowGET /v1/catalog/{kind}/{id}/lineage— upstreamsource_refs, best-effort resolvedGET /v1/catalog/asset/{id}.dcat.json— the first real DCAT / schema.org emitter (application/ld+json), the seam CKAN/DataHub/CK.org harvest from; carriesprophet:distributionClass(the moat, exported)Security
Ids constrained to
[A-Za-z0-9._:-],..refused, resolved path enforced under the catalog root — path traversal fails closed (tested).Tests
tests/— 7 passing (resolve/404, DCAT shape + access-rights mapping, lineage, traversal guard). Two real bugs were caught and fixed during test (regex admitting..; the generic/{kind}/{id}route shadowing.dcat.jsonvia Starlette ordering).Not
Not a fork of
crystal-atlas-contract-intel; not the Go tritrpc gateway. Next: registration (write path), search, real CKAN/DataHub-MCP/CK.org emitters off the DCAT bridge, and mounting the masking PDP as a read-path filter.🤖 Generated with Claude Code