Repository navigation
Split service.tn into service.tn and http.tn, and give each module a schema package - #32
Merged
Merged
Conversation
…the http half to tson-http service.tn keeps its identity and its root map and holds the protocol side only. http.tn, under the root map http, imports it and holds the projection of a protocol onto HTTP: service.http is http.projection, service.http_verb is http.verb, service.http_auth is http.auth, and every other member keeps its name under http. A description using HTTP imports http.tn alone and sees the protocol vocabulary through its import closure. The Java follows the schemas. Each module's root package is its API, schema holds only the classes mirroring the module's .tn types, and internal is unexported machinery: - tson-service: TsonBindings, TsonServiceSchema, the join TsonServiceProtocol and ExchangeName in io.ltr8.tson.service; Protocol, Exchange and Signature in io.ltr8.tson.service.schema; Landed in internal, exported to tson-http only. - tson-http: TsonHttpSchema, TsonServiceDescription, TsonServiceCoverage, Route, PayloadType and RequestPlacement beside the codec; http.tn's mirrors in io.ltr8.tson.http.schema. The description's tests and fixtures sit in the module whose code they test, and MediaTypeNames gives way to TsonMediaType. The reader refuses a projection or a protocol left unbound by per-schema bindings, naming the fix, where it threw a ClassCastException. The probe measures that a root of the http schema's own is as open to an importer as service is, and proposal/schema-split.md is adopted with that corrected. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… own root map tson-http's layout rule now covers its three schemas. The root package is the API, the holder of each schema among it; a class mirroring a .tn type lives under schema: http.tn's, whose root map is the module's own, in schema itself, and those of each other schema the module owns in schema.<root map>. - TsonProblem and TsonProblemDiagnostic are in io.ltr8.tson.http.schema.problem. - TsonDeployment and its nested records are in io.ltr8.tson.http.schema.deployment. What it held as a schema holder (ID, source, bindings, read, tson) is the root class TsonDeploymentSchema, shaped like TsonProblemSchema. No behaviour changes. A descriptor that is not valid against deployment.tn stopping the read is now pinned through read itself, and TsonHttpSchema.bindings says its service.tn entries are inert under http.tn's key in per-schema bindings. CLAUDE.md no longer claims the demos run as named modules: only each module's main source set is one. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ot map reserves Route, PayloadType and RequestPlacement in io.ltr8.tson.http and ExchangeName in io.ltr8.tson.service are types a consumer names, sitting beside Tson-prefixed API; Route also met io.helidon.webserver.Route under wildcard imports. They are TsonRoute, TsonPayloadType, TsonRequestPlacement and TsonExchangeName. problem.tn and deployment.tn no longer say each reserves its root name alone. A nested schema map is open, so another schema's map of the same name adds its members, and only a path both declare collides: the name is reserved only against a root that is no schema map. TsonProblemSchema, TsonServiceSchema and the notes say the same. Co-Authored-By: Claude Fable 5.2 <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.
The schema split
service.tnis now two schemas, asproposal/schema-split.md(adopted here) measured:service.tnkeeps its!!idand root mapservice, and holds the protocol side only.http.tn(https://tson.io/2026/40/io/ltr8/http/http.tn, root maphttp) imports it and holds the projection of aprotocol onto HTTP.
Every HTTP-side name moves from
service.Xtohttp.Xkeeping its member name, exceptservice.http→http.projection,service.http_verb→http.verbandservice.http_auth→http.auth. The facts annotations stay@service.safeand the rest. A description using HTTP importshttp.tnalone and sees the protocol vocabulary throughits import closure; a protocol-only description imports
service.tn.The module and package layout
The HTTP half of the description moves out of
tson-serviceintotson-http, and both modules follow one rule: theroot package is the API;
schemaholds only the classes that mirror a.tntype;internalis unexported. Mirrors ofa module's own root map sit in
schema, and mirrors of another schema it owns inschema.<root map>.tson-serviceio.ltr8.tson.serviceTsonBindings,TsonServiceSchema, the joinTsonServiceProtocol,TsonExchangeNameio.ltr8.tson.service.schemaProtocol,Exchange,Signatureio.ltr8.tson.service.internalLanded, exported totson-httponlytson-httpio.ltr8.tson.httpTsonHttpSchema,TsonServiceDescription,TsonServiceCoverage,TsonRoute,TsonPayloadType,TsonRequestPlacement,TsonDeploymentSchemaio.ltr8.tson.http.schemahttp.tn's mirrors (HttpProjection,Endpoint,Binding, …)io.ltr8.tson.http.schema.problemTsonProblem,TsonProblemDiagnosticio.ltr8.tson.http.schema.deploymentTsonDeploymentand its nested recordsConsequences worth knowing when reading the diff:
tson-serviceno longer holds anything of HTTP. The packagesio.ltr8.tson.service.protocolandio.ltr8.tson.service.httpare gone.TsonServiceSchemaholdsservice.tn;TsonHttpSchemaholdshttp.tnand is what an HTTP description wires (itpublishes and binds both schemas).
TsonDeployment's schema-holder statics areTsonDeploymentSchema.HttpisHttpProjection.MediaTypeNames, a hand copy of themedia type names, gives way to
TsonMediaType.Behaviour changes
Apart from names, two refusals are new. With per-schema bindings (
TsonBindings.bySchema) a caller must now key bothschemas' identities; leaving one out would otherwise surface as a
ClassCastException, so the reader andthe join refuse a projection or a protocol whose value did not bind, naming the fix.
Measured, and corrected
SchemaSplitProbeTest.aRootOfTheHttpSchemasOwnIsOpenToEveryImportershows a root map of the HTTP schema's own is asopen to an importer as
serviceis: only a member path two schemas both declare collides. The proposal had claimed sucha root is closed; that is corrected, and the notes say each root is reserved only against a root that is no schema map.
CLAUDE.mdno longer claims the demos run as named modules: only each module's main source set is one.Names
Four root-package types a consumer names take the
Tsonprefix:TsonRoute,TsonPayloadTypeandTsonRequestPlacementinio.ltr8.tson.http(the first metio.helidon.webserver.Routeunder wildcard imports), andTsonExchangeNameinio.ltr8.tson.service.problem.tnanddeployment.tnno longer say each reserves its root name alone; they state the same rule asservice.tnandhttp.tn. It is measured forserviceandhttp, and follows from the spec's rule for the other two.Left open
projection binding its protocol is read.
BACKLOG.mdrecords it.Verification
./gradlew build javadoc --rerun-tasksis green locally against the sibling'smain, and both doc checks pass. Each ofthe three structural stages had an independent review; one verified from a throwaway named module that both schemas load from
their own modules and a description reads through the qualified export.
🤖 Generated with Claude Code