Client-orchestrated graph writes; inference-free ontology serving - #343
Merged
Conversation
…rites Move the "Add data" and "Generate containers" orchestration to the client over the uniform Graph Store Protocol interface, removing the server-side fetch/SSRF surface (pen-test LNK-002) and collapsing two special-purpose endpoints into standard per-document writes. - Add data: the submit handler splits by the presence of a spin:query input. The add/clone variant fetches dct:source through the same-origin ?uri= proxy as RDF/XML (CORS + Jena format conversion) and POST-appends it to the sd:name target (ldh:add-data-source-response / ldh:add-data-form-error). The import-ontology variant is unchanged and still RDF/POSTs to /transform. - Generate containers: builds one container document per checked class and PUTs them via parallel ixsl:all fan-out (ldh:generate-containers-fanout -> ldh:generate-containers-join), seeded by ixsl:resolve so the requests run in an active promise context. The view block is now correctly wrapped as ldh:Object -> rdf:value -> ldh:View (the endpoint's bare ldh:View bypassed ldh:InvalidContentBlockType validation). - Delete Add.java, Generate.java and their Dispatcher locators. /transform is retained until a client-side SPARQL engine lands. - http-tests: drop the obsolete /add and /generate tests (the system/ suite is unregistered); add add/GET-proxied-source-POST-append.sh and add/PUT-generate-container.sh. CHANGELOG updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… schema load - Initialise the parent typeahead with the current container (ldh:LoadTypeaheads from ldh:base-uri, matching btn-save-as), which was lost when the form stopped carrying a source param. - Disable the Generate button until the schema is loaded; enable it in ldh:endpoint-classes-response once the class list is populated. - Make Load schema fully async: the service-endpoint resolution used a blocking document() fetch (the "TO-DO: asynchronous request"). Replaced with an ixsl:resolve -> ldh:load-schema-endpoint -> ldh:load-schema-results promise chain, so the request no longer blocks and the progress cursor shows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…te targets The "Add RDF data" dialog seeded its target graph typeahead from ldh:base-uri(.), which resolves to the proxied remote resource when viewing one (ac:document-uri(ac:uri())). So adding data while viewing a proxied document defaulted the write target to that remote and proxied the append to it (403). The source is still ldh:base-uri (the remote being imported). - btn-save-as now seeds the graph typeahead from ac:absolute-path(ldh:request-uri()) (the local browser location), which is always a local dataspace document. - Guard the append: a cross-origin target renders an inline error instead of proxying the write. ldh:add-data-form-error now tolerates a missing response so pre-fetch validation can reuse it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Moves the Add data and Generate containers orchestration to the client over the uniform Graph Store Protocol, and reworks application-ontology serving to be inference-free. Together this removes the server-side fetch/SSRF surface (pen-test LNK-002) and stops inferred
rdf:type rdfs:Resourcefrom leaking into proxied namespace documents.Changes
Client-orchestrated writes (BREAKING — replaces
/addand/generate)spin:queryinput. The add/clone variant fetchesdct:sourcethrough the same-origin?uri=proxy as RDF/XML (CORS + Jena format conversion) and POST-appends it to thesd:nametarget. The import-ontology variant is unchanged and still RDF/POSTs to/transform.ixsl:allfan-out, seeded byixsl:resolveso requests run in an active promise context. The view block is now correctly wrapped asldh:Object→rdf:value→ldh:View(the endpoint's bareldh:Viewbypassedldh:InvalidContentBlockTypevalidation).Add.java,Generate.javaand theirDispatcherlocators./transformis retained until a client-side SPARQL engine lands.Dialog fixes
ac:absolute-path(ldh:request-uri())) instead ofldh:base-uri(.), which resolved to the proxied remote when viewing one and defaulted the write target to that remote (403). Cross-origin targets now render an inline error instead of proxying the write.document()fetch with anixsl:resolvepromise chain).Inference-free ontology serving
owl:importsunion graph (cached per ontology URI onApplication) instead of a manually flattened, RDFS-materialized model. Every consumer traverses hierarchies explicitly via(rdfs:subClassOf)*.ProxyRequestFilterserves directly — asserted triples only, identical to a direct document GET. This fixes inferredrdf:type rdfs:Resourceleaking into proxied namespace documents (multi-token@typeofthat silently degraded View blocks).Namespaceno-query GET serves the raw ontology graph from the shared repository instead of rebuilding a repository per request./nsSPARQL endpoint instead of proxying each term's vocabulary document (Resolve view term labels from /ns instead of the Linked Data proxy #340).Tests
/addand/generateHTTP tests; addsadd/GET-proxied-source-POST-append.sh,add/PUT-generate-container.sh,proxy/GET-proxied-mapped-vocab.sh, andsparql-protocol/query/GET-ns-no-query.sh.OntologyClosureCIReproTestand extendsOntologyImportsCharacterizationTest.See
CHANGELOG.mdfor the user-facing summary.🤖 Generated with Claude Code