@techspokes/typescript-wsdl-client 1.1.5 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (480) hide show
  1. package/README.md +64 -66
  2. package/dist/app/generateApp.d.ts +0 -1
  3. package/dist/app/generateApp.js +1 -1
  4. package/dist/app/generateCheckedApp.d.ts +38 -0
  5. package/dist/app/generateCheckedApp.js +108 -0
  6. package/dist/checkedPipeline.d.ts +155 -0
  7. package/dist/checkedPipeline.js +448 -0
  8. package/dist/checkedPlanning.d.ts +123 -0
  9. package/dist/checkedPlanning.js +245 -0
  10. package/dist/cli.d.ts +0 -1
  11. package/dist/cli.js +75 -1
  12. package/dist/client/checkedDirectRuntime.d.ts +40 -3
  13. package/dist/client/checkedDirectRuntime.js +28 -8
  14. package/dist/client/directClientRuntime.d.ts +27 -2
  15. package/dist/client/directClientRuntime.js +142 -89
  16. package/dist/client/directClientVersion.d.ts +3 -1
  17. package/dist/client/directClientVersion.js +3 -0
  18. package/dist/client/generateClient.d.ts +0 -1
  19. package/dist/client/generateClient.js +26 -12
  20. package/dist/client/generateDirectClient.d.ts +21 -3
  21. package/dist/client/generateDirectClient.js +138 -6
  22. package/dist/client/generateOperations.d.ts +0 -1
  23. package/dist/client/generateTypes.d.ts +0 -1
  24. package/dist/client/generateUtils.d.ts +0 -1
  25. package/dist/client/generateUtils.js +3 -1
  26. package/dist/compiler/applicationGroups.d.ts +53 -0
  27. package/dist/compiler/applicationGroups.js +403 -0
  28. package/dist/compiler/buildCanonicalGraph.d.ts +0 -1
  29. package/dist/compiler/canonicalGraph.d.ts +0 -1
  30. package/dist/compiler/catalogErrors.d.ts +0 -1
  31. package/dist/compiler/catalogProvenance.d.ts +0 -1
  32. package/dist/compiler/checkedAssessment.d.ts +0 -1
  33. package/dist/compiler/checkedAssessment.js +1 -1
  34. package/dist/compiler/checkedComponentSource.d.ts +16 -0
  35. package/dist/compiler/checkedComponentSource.js +31 -0
  36. package/dist/compiler/checkedSourcePreparation.d.ts +38 -1
  37. package/dist/compiler/checkedSourcePreparation.js +71 -0
  38. package/dist/compiler/complexTypeContent.d.ts +5 -6
  39. package/dist/compiler/complexTypeContent.js +2 -2
  40. package/dist/compiler/componentCorrespondence.d.ts +32 -0
  41. package/dist/compiler/componentCorrespondence.js +140 -0
  42. package/dist/compiler/componentRecordProjection.d.ts +109 -0
  43. package/dist/compiler/componentRecordProjection.js +319 -0
  44. package/dist/compiler/componentSoapPreparation.d.ts +20 -0
  45. package/dist/compiler/componentSoapPreparation.js +36 -0
  46. package/dist/compiler/composeCanonicalGraph.d.ts +0 -1
  47. package/dist/compiler/dataOwnership.d.ts +0 -1
  48. package/dist/compiler/dataOwnership.js +14 -4
  49. package/dist/compiler/datatypeValues.d.ts +0 -1
  50. package/dist/compiler/directCodec.d.ts +59 -2
  51. package/dist/compiler/directCodec.js +275 -90
  52. package/dist/compiler/directExecutionPolicy.d.ts +0 -1
  53. package/dist/compiler/directOperation.d.ts +46 -4
  54. package/dist/compiler/directOperation.js +105 -14
  55. package/dist/compiler/directSoap.d.ts +29 -5
  56. package/dist/compiler/directSoap.js +130 -37
  57. package/dist/compiler/directSoapSource.d.ts +24 -1
  58. package/dist/compiler/directSoapSource.js +166 -19
  59. package/dist/compiler/directSourceCapsule.d.ts +74 -2
  60. package/dist/compiler/directSourceCapsule.js +428 -6
  61. package/dist/compiler/directStructure.d.ts +83 -6
  62. package/dist/compiler/directStructure.js +349 -58
  63. package/dist/compiler/directStructurePlan.d.ts +135 -2
  64. package/dist/compiler/directStructurePlan.js +594 -29
  65. package/dist/compiler/directValues.d.ts +63 -4
  66. package/dist/compiler/directValues.js +950 -116
  67. package/dist/compiler/finiteRe01Construction.d.ts +69 -0
  68. package/dist/compiler/finiteRe01Construction.js +422 -0
  69. package/dist/compiler/finiteRe01Verification.d.ts +81 -3
  70. package/dist/compiler/finiteRe01Verification.js +391 -4
  71. package/dist/compiler/generateCatalog.d.ts +0 -1
  72. package/dist/compiler/graphTraversal.d.ts +0 -1
  73. package/dist/compiler/hypotheticalScopedIdentity.d.ts +0 -1
  74. package/dist/compiler/occurrenceAnalysis.d.ts +2 -1
  75. package/dist/compiler/occurrenceAnalysis.js +23 -7
  76. package/dist/compiler/originalSourceMembership.d.ts +0 -1
  77. package/dist/compiler/particleAttribution.d.ts +0 -1
  78. package/dist/compiler/particleAttribution.js +20 -0
  79. package/dist/compiler/particleDeclarationConsistency.d.ts +0 -1
  80. package/dist/compiler/particleDeclarationConsistency.js +9 -0
  81. package/dist/compiler/particleExtension.d.ts +0 -1
  82. package/dist/compiler/particleExtension.js +5 -1
  83. package/dist/compiler/particleLocalAssessment.d.ts +0 -1
  84. package/dist/compiler/particleRestriction.d.ts +0 -1
  85. package/dist/compiler/particleRestriction.js +6 -1
  86. package/dist/compiler/particleSemanticView.d.ts +2 -1
  87. package/dist/compiler/particleSemanticView.js +16 -3
  88. package/dist/compiler/particleWildcardRelation.d.ts +0 -1
  89. package/dist/compiler/projectionScalar.d.ts +32 -0
  90. package/dist/compiler/projectionScalar.js +184 -0
  91. package/dist/compiler/re01CandidateAssignments.d.ts +95 -0
  92. package/dist/compiler/re01CandidateAssignments.js +341 -0
  93. package/dist/compiler/re01CandidateCorrespondence.d.ts +22 -1
  94. package/dist/compiler/re01CandidateCorrespondence.js +167 -38
  95. package/dist/compiler/re01TypeProperties.d.ts +0 -1
  96. package/dist/compiler/re01TypePropertyValidation.d.ts +0 -1
  97. package/dist/compiler/resolveCanonicalGraph.d.ts +5 -2
  98. package/dist/compiler/resolveCanonicalGraph.js +77 -7
  99. package/dist/compiler/scalarSchemaAssessment.d.ts +0 -1
  100. package/dist/compiler/schemaAttributeGroupProperties.d.ts +0 -1
  101. package/dist/compiler/schemaAttributeProperties.d.ts +0 -1
  102. package/dist/compiler/schemaAttributeUses.d.ts +22 -2
  103. package/dist/compiler/schemaAttributeUses.js +86 -13
  104. package/dist/compiler/schemaBinaryWordReconstruction.d.ts +0 -1
  105. package/dist/compiler/schemaBuiltinFacets.d.ts +0 -1
  106. package/dist/compiler/schemaCalendarImages.d.ts +0 -1
  107. package/dist/compiler/schemaCalendarLanguage.d.ts +0 -1
  108. package/dist/compiler/schemaCompiler.d.ts +0 -1
  109. package/dist/compiler/schemaComponentEquality.d.ts +0 -1
  110. package/dist/compiler/schemaConstructionAssessment.d.ts +34 -1
  111. package/dist/compiler/schemaConstructionAssessment.js +88 -6
  112. package/dist/compiler/schemaDatatypeValues.d.ts +0 -1
  113. package/dist/compiler/schemaDecimalLanguage.d.ts +0 -1
  114. package/dist/compiler/schemaDeclarationPrimitives.d.ts +7 -2
  115. package/dist/compiler/schemaDeclarationPrimitives.js +18 -1
  116. package/dist/compiler/schemaDocumentSyntax.d.ts +0 -1
  117. package/dist/compiler/schemaDurationLanguage.d.ts +0 -1
  118. package/dist/compiler/schemaElementInstance.d.ts +30 -0
  119. package/dist/compiler/schemaElementInstance.js +45 -0
  120. package/dist/compiler/schemaElementProperties.d.ts +0 -1
  121. package/dist/compiler/schemaEndpointWordCapacity.d.ts +0 -1
  122. package/dist/compiler/schemaExactCalendar.d.ts +0 -1
  123. package/dist/compiler/schemaFacetAnnotation.d.ts +0 -1
  124. package/dist/compiler/schemaGeneratedScalarShape.d.ts +0 -1
  125. package/dist/compiler/schemaGeneratedScalarShape.js +2 -0
  126. package/dist/compiler/schemaIdentityConstraints.d.ts +0 -1
  127. package/dist/compiler/schemaIeeeLanguage.d.ts +0 -1
  128. package/dist/compiler/schemaIntegerImages.d.ts +0 -1
  129. package/dist/compiler/schemaLexicalPredicates.d.ts +0 -1
  130. package/dist/compiler/schemaNotationProperties.d.ts +0 -1
  131. package/dist/compiler/schemaNumericImageConditions.d.ts +0 -1
  132. package/dist/compiler/schemaParticleWildcardProperties.d.ts +0 -1
  133. package/dist/compiler/schemaPattern.d.ts +0 -1
  134. package/dist/compiler/schemaRegularLanguage.d.ts +0 -1
  135. package/dist/compiler/schemaScalarContext.d.ts +5 -1
  136. package/dist/compiler/schemaScalarKernel.d.ts +0 -1
  137. package/dist/compiler/schemaScalarWitnesses.d.ts +0 -1
  138. package/dist/compiler/schemaSimpleTypeProperties.d.ts +0 -1
  139. package/dist/compiler/schemaSourceGrammar.d.ts +0 -1
  140. package/dist/compiler/schemaSourceLexical.d.ts +0 -1
  141. package/dist/compiler/schemaSourceValues.d.ts +0 -1
  142. package/dist/compiler/schemaSourceWildcards.d.ts +1 -2
  143. package/dist/compiler/schemaSourceWildcards.js +3 -1
  144. package/dist/compiler/schemaSymbolicSequences.d.ts +0 -1
  145. package/dist/compiler/schemaSymbolicValueSets.d.ts +0 -1
  146. package/dist/compiler/schemaSyntaxAssessment.d.ts +0 -1
  147. package/dist/compiler/schemaTemporalAliases.d.ts +0 -1
  148. package/dist/compiler/schemaTokenImages.d.ts +0 -1
  149. package/dist/compiler/schemaTypeIdentity.d.ts +0 -1
  150. package/dist/compiler/schemaTypeIdentity.js +2 -0
  151. package/dist/compiler/schemaTypeRelations.d.ts +0 -1
  152. package/dist/compiler/schemaUri.d.ts +0 -1
  153. package/dist/compiler/schemaValueContext.d.ts +0 -1
  154. package/dist/compiler/schemaValueImages.d.ts +0 -1
  155. package/dist/compiler/schemaValueSequences.d.ts +0 -1
  156. package/dist/compiler/semanticBudget.d.ts +18 -1
  157. package/dist/compiler/semanticBudget.js +17 -2
  158. package/dist/compiler/semanticCatalog.d.ts +1 -2
  159. package/dist/compiler/semanticContext.d.ts +12 -1
  160. package/dist/compiler/semanticContext.js +39 -0
  161. package/dist/compiler/semanticTypeDependencies.d.ts +0 -1
  162. package/dist/compiler/semanticTypeReference.d.ts +0 -1
  163. package/dist/compiler/shapeResolver.d.ts +0 -1
  164. package/dist/compiler/soapHeaders.d.ts +16 -0
  165. package/dist/compiler/soapHeaders.js +42 -0
  166. package/dist/compiler/sourceSchemaBinding.d.ts +0 -1
  167. package/dist/compiler/standardSchemaComponents.d.ts +71 -0
  168. package/dist/compiler/standardSchemaComponents.js +74 -0
  169. package/dist/compiler/standardSchemaConstruction.d.ts +20 -0
  170. package/dist/compiler/standardSchemaConstruction.js +34 -0
  171. package/dist/compiler/structuralCompanions.d.ts +0 -1
  172. package/dist/compiler/validateSemanticGraph.d.ts +0 -1
  173. package/dist/compiler/wildcardAlgebra.d.ts +0 -1
  174. package/dist/compiler/wsdlPolicyRequirements.d.ts +43 -0
  175. package/dist/compiler/wsdlPolicyRequirements.js +239 -0
  176. package/dist/config.d.ts +0 -1
  177. package/dist/gateway/generateCheckedGateway.d.ts +32 -0
  178. package/dist/gateway/generateCheckedGateway.js +293 -0
  179. package/dist/gateway/generateGateway.d.ts +0 -1
  180. package/dist/gateway/generators.d.ts +0 -1
  181. package/dist/gateway/helpers.d.ts +0 -1
  182. package/dist/generation/componentShape.d.ts +14 -0
  183. package/dist/generation/componentShape.js +269 -0
  184. package/dist/generation/preamble.d.ts +0 -1
  185. package/dist/generation/sourceLayout.d.ts +13 -0
  186. package/dist/generation/sourceLayout.js +40 -0
  187. package/dist/generation/writeGeneratedSource.d.ts +0 -1
  188. package/dist/index.d.ts +7 -2
  189. package/dist/index.js +2 -1
  190. package/dist/loader/fetch.d.ts +0 -1
  191. package/dist/loader/orderedSyntax.d.ts +8 -1
  192. package/dist/loader/orderedSyntax.js +26 -6
  193. package/dist/loader/resolutionDepth.d.ts +0 -1
  194. package/dist/loader/schemaInput.d.ts +28 -1
  195. package/dist/loader/schemaInput.js +41 -4
  196. package/dist/loader/schemaResources.d.ts +2 -1
  197. package/dist/loader/schemaResources.js +45 -4
  198. package/dist/loader/wsdlLoader.d.ts +0 -1
  199. package/dist/openapi/casing.d.ts +0 -1
  200. package/dist/openapi/generateOpenAPI.d.ts +0 -1
  201. package/dist/openapi/generatePaths.d.ts +0 -1
  202. package/dist/openapi/generateSchemas.d.ts +0 -1
  203. package/dist/openapi/security.d.ts +0 -1
  204. package/dist/pipeline.d.ts +6 -2
  205. package/dist/pipeline.js +13 -0
  206. package/dist/test/generateCheckedTests.d.ts +17 -0
  207. package/dist/test/generateCheckedTests.js +60 -0
  208. package/dist/test/generateTests.d.ts +0 -1
  209. package/dist/test/generators.d.ts +0 -1
  210. package/dist/test/mockData.d.ts +0 -1
  211. package/dist/test/mockData.js +20 -14
  212. package/dist/util/attributeWildcards.d.ts +0 -1
  213. package/dist/util/builder.d.ts +0 -1
  214. package/dist/util/catalogMeta.d.ts +0 -1
  215. package/dist/util/checkedCliDiagnostics.d.ts +11 -0
  216. package/dist/util/checkedCliDiagnostics.js +22 -0
  217. package/dist/util/cli.d.ts +0 -1
  218. package/dist/util/errors.d.ts +0 -1
  219. package/dist/util/imports.d.ts +0 -1
  220. package/dist/util/runtimeSource.d.ts +0 -1
  221. package/dist/util/runtimeSource.js +3 -5
  222. package/dist/util/securityConfig.d.ts +0 -1
  223. package/dist/util/streamConfig.d.ts +0 -1
  224. package/dist/util/tools.d.ts +0 -1
  225. package/dist/util/xmlWhitespace.d.ts +0 -1
  226. package/dist/xsd/primitives.d.ts +0 -1
  227. package/docs/agent-skill.md +2 -0
  228. package/docs/api-reference.md +1 -1
  229. package/docs/checked-gateway.md +210 -0
  230. package/docs/checked-generation.md +161 -0
  231. package/docs/cli-reference.md +23 -1
  232. package/docs/concepts.md +136 -1
  233. package/docs/configuration.md +5 -1
  234. package/docs/corpus.md +33 -0
  235. package/docs/direct-values.md +13 -13
  236. package/docs/examples/checked-forecast.wsdl +19 -0
  237. package/docs/gateway-guide.md +1 -1
  238. package/docs/generated-code.md +10 -5
  239. package/docs/mapping-contract.md +114 -0
  240. package/docs/migration-playbook.md +1 -1
  241. package/docs/output-anatomy.md +1 -1
  242. package/docs/start-here.md +8 -2
  243. package/docs/supported-patterns.md +7 -3
  244. package/docs/testing.md +117 -31
  245. package/llms.txt +7 -7
  246. package/package.json +63 -22
  247. package/src/runtime/checkedGatewayHost.tpl.txt +157 -0
  248. package/src/runtime/streamXml.ts +1 -1
  249. package/dist/app/generateApp.d.ts.map +0 -1
  250. package/dist/cli.d.ts.map +0 -1
  251. package/dist/client/checkedDirectRuntime.d.ts.map +0 -1
  252. package/dist/client/directClientRuntime.d.ts.map +0 -1
  253. package/dist/client/directClientVersion.d.ts.map +0 -1
  254. package/dist/client/generateClient.d.ts.map +0 -1
  255. package/dist/client/generateDirectClient.d.ts.map +0 -1
  256. package/dist/client/generateOperations.d.ts.map +0 -1
  257. package/dist/client/generateTypes.d.ts.map +0 -1
  258. package/dist/client/generateUtils.d.ts.map +0 -1
  259. package/dist/compiler/buildCanonicalGraph.d.ts.map +0 -1
  260. package/dist/compiler/canonicalGraph.d.ts.map +0 -1
  261. package/dist/compiler/catalogErrors.d.ts.map +0 -1
  262. package/dist/compiler/catalogProvenance.d.ts.map +0 -1
  263. package/dist/compiler/checkedAssessment.d.ts.map +0 -1
  264. package/dist/compiler/checkedSourcePreparation.d.ts.map +0 -1
  265. package/dist/compiler/complexTypeContent.d.ts.map +0 -1
  266. package/dist/compiler/composeCanonicalGraph.d.ts.map +0 -1
  267. package/dist/compiler/dataOwnership.d.ts.map +0 -1
  268. package/dist/compiler/datatypeValues.d.ts.map +0 -1
  269. package/dist/compiler/directCodec.d.ts.map +0 -1
  270. package/dist/compiler/directExecutionPolicy.d.ts.map +0 -1
  271. package/dist/compiler/directOperation.d.ts.map +0 -1
  272. package/dist/compiler/directSoap.d.ts.map +0 -1
  273. package/dist/compiler/directSoapSource.d.ts.map +0 -1
  274. package/dist/compiler/directSourceCapsule.d.ts.map +0 -1
  275. package/dist/compiler/directStructure.d.ts.map +0 -1
  276. package/dist/compiler/directStructurePlan.d.ts.map +0 -1
  277. package/dist/compiler/directValues.d.ts.map +0 -1
  278. package/dist/compiler/finiteRe01Verification.d.ts.map +0 -1
  279. package/dist/compiler/generateCatalog.d.ts.map +0 -1
  280. package/dist/compiler/graphTraversal.d.ts.map +0 -1
  281. package/dist/compiler/hypotheticalScopedIdentity.d.ts.map +0 -1
  282. package/dist/compiler/occurrenceAnalysis.d.ts.map +0 -1
  283. package/dist/compiler/originalSourceMembership.d.ts.map +0 -1
  284. package/dist/compiler/particleAttribution.d.ts.map +0 -1
  285. package/dist/compiler/particleDeclarationConsistency.d.ts.map +0 -1
  286. package/dist/compiler/particleExtension.d.ts.map +0 -1
  287. package/dist/compiler/particleLocalAssessment.d.ts.map +0 -1
  288. package/dist/compiler/particleRestriction.d.ts.map +0 -1
  289. package/dist/compiler/particleSemanticView.d.ts.map +0 -1
  290. package/dist/compiler/particleWildcardRelation.d.ts.map +0 -1
  291. package/dist/compiler/re01CandidateCorrespondence.d.ts.map +0 -1
  292. package/dist/compiler/re01TypeProperties.d.ts.map +0 -1
  293. package/dist/compiler/re01TypePropertyValidation.d.ts.map +0 -1
  294. package/dist/compiler/resolveCanonicalGraph.d.ts.map +0 -1
  295. package/dist/compiler/scalarSchemaAssessment.d.ts.map +0 -1
  296. package/dist/compiler/schemaAttributeGroupProperties.d.ts.map +0 -1
  297. package/dist/compiler/schemaAttributeProperties.d.ts.map +0 -1
  298. package/dist/compiler/schemaAttributeUses.d.ts.map +0 -1
  299. package/dist/compiler/schemaBinaryWordReconstruction.d.ts.map +0 -1
  300. package/dist/compiler/schemaBuiltinFacets.d.ts.map +0 -1
  301. package/dist/compiler/schemaCalendarImages.d.ts.map +0 -1
  302. package/dist/compiler/schemaCalendarLanguage.d.ts.map +0 -1
  303. package/dist/compiler/schemaCompiler.d.ts.map +0 -1
  304. package/dist/compiler/schemaComponentEquality.d.ts.map +0 -1
  305. package/dist/compiler/schemaConstructionAssessment.d.ts.map +0 -1
  306. package/dist/compiler/schemaDatatypeValues.d.ts.map +0 -1
  307. package/dist/compiler/schemaDecimalLanguage.d.ts.map +0 -1
  308. package/dist/compiler/schemaDeclarationPrimitives.d.ts.map +0 -1
  309. package/dist/compiler/schemaDocumentSyntax.d.ts.map +0 -1
  310. package/dist/compiler/schemaDurationLanguage.d.ts.map +0 -1
  311. package/dist/compiler/schemaElementProperties.d.ts.map +0 -1
  312. package/dist/compiler/schemaEndpointWordCapacity.d.ts.map +0 -1
  313. package/dist/compiler/schemaExactCalendar.d.ts.map +0 -1
  314. package/dist/compiler/schemaFacetAnnotation.d.ts.map +0 -1
  315. package/dist/compiler/schemaGeneratedScalarShape.d.ts.map +0 -1
  316. package/dist/compiler/schemaIdentityConstraints.d.ts.map +0 -1
  317. package/dist/compiler/schemaIeeeLanguage.d.ts.map +0 -1
  318. package/dist/compiler/schemaIntegerImages.d.ts.map +0 -1
  319. package/dist/compiler/schemaLexicalPredicates.d.ts.map +0 -1
  320. package/dist/compiler/schemaNotationProperties.d.ts.map +0 -1
  321. package/dist/compiler/schemaNumericImageConditions.d.ts.map +0 -1
  322. package/dist/compiler/schemaParticleWildcardProperties.d.ts.map +0 -1
  323. package/dist/compiler/schemaPattern.d.ts.map +0 -1
  324. package/dist/compiler/schemaRegularLanguage.d.ts.map +0 -1
  325. package/dist/compiler/schemaScalarContext.d.ts.map +0 -1
  326. package/dist/compiler/schemaScalarKernel.d.ts.map +0 -1
  327. package/dist/compiler/schemaScalarWitnesses.d.ts.map +0 -1
  328. package/dist/compiler/schemaSimpleTypeProperties.d.ts.map +0 -1
  329. package/dist/compiler/schemaSourceGrammar.d.ts.map +0 -1
  330. package/dist/compiler/schemaSourceLexical.d.ts.map +0 -1
  331. package/dist/compiler/schemaSourceValues.d.ts.map +0 -1
  332. package/dist/compiler/schemaSourceWildcards.d.ts.map +0 -1
  333. package/dist/compiler/schemaSymbolicSequences.d.ts.map +0 -1
  334. package/dist/compiler/schemaSymbolicValueSets.d.ts.map +0 -1
  335. package/dist/compiler/schemaSyntaxAssessment.d.ts.map +0 -1
  336. package/dist/compiler/schemaTemporalAliases.d.ts.map +0 -1
  337. package/dist/compiler/schemaTokenImages.d.ts.map +0 -1
  338. package/dist/compiler/schemaTypeIdentity.d.ts.map +0 -1
  339. package/dist/compiler/schemaTypeRelations.d.ts.map +0 -1
  340. package/dist/compiler/schemaUri.d.ts.map +0 -1
  341. package/dist/compiler/schemaValueContext.d.ts.map +0 -1
  342. package/dist/compiler/schemaValueImages.d.ts.map +0 -1
  343. package/dist/compiler/schemaValueSequences.d.ts.map +0 -1
  344. package/dist/compiler/semanticBudget.d.ts.map +0 -1
  345. package/dist/compiler/semanticCatalog.d.ts.map +0 -1
  346. package/dist/compiler/semanticContext.d.ts.map +0 -1
  347. package/dist/compiler/semanticTypeDependencies.d.ts.map +0 -1
  348. package/dist/compiler/semanticTypeReference.d.ts.map +0 -1
  349. package/dist/compiler/shapeResolver.d.ts.map +0 -1
  350. package/dist/compiler/sourceSchemaBinding.d.ts.map +0 -1
  351. package/dist/compiler/structuralCompanions.d.ts.map +0 -1
  352. package/dist/compiler/validateSemanticGraph.d.ts.map +0 -1
  353. package/dist/compiler/wildcardAlgebra.d.ts.map +0 -1
  354. package/dist/config.d.ts.map +0 -1
  355. package/dist/gateway/generateGateway.d.ts.map +0 -1
  356. package/dist/gateway/generators.d.ts.map +0 -1
  357. package/dist/gateway/helpers.d.ts.map +0 -1
  358. package/dist/generation/preamble.d.ts.map +0 -1
  359. package/dist/generation/writeGeneratedSource.d.ts.map +0 -1
  360. package/dist/index.d.ts.map +0 -1
  361. package/dist/loader/fetch.d.ts.map +0 -1
  362. package/dist/loader/orderedSyntax.d.ts.map +0 -1
  363. package/dist/loader/resolutionDepth.d.ts.map +0 -1
  364. package/dist/loader/schemaInput.d.ts.map +0 -1
  365. package/dist/loader/schemaResources.d.ts.map +0 -1
  366. package/dist/loader/wsdlLoader.d.ts.map +0 -1
  367. package/dist/openapi/casing.d.ts.map +0 -1
  368. package/dist/openapi/generateOpenAPI.d.ts.map +0 -1
  369. package/dist/openapi/generatePaths.d.ts.map +0 -1
  370. package/dist/openapi/generateSchemas.d.ts.map +0 -1
  371. package/dist/openapi/security.d.ts.map +0 -1
  372. package/dist/pipeline.d.ts.map +0 -1
  373. package/dist/runtime/jsonArray.d.ts +0 -24
  374. package/dist/runtime/jsonArray.d.ts.map +0 -1
  375. package/dist/runtime/jsonArray.js +0 -52
  376. package/dist/runtime/ndjson.d.ts +0 -24
  377. package/dist/runtime/ndjson.d.ts.map +0 -1
  378. package/dist/runtime/ndjson.js +0 -30
  379. package/dist/runtime/streamXml.d.ts +0 -45
  380. package/dist/runtime/streamXml.d.ts.map +0 -1
  381. package/dist/runtime/streamXml.js +0 -212
  382. package/dist/test/generateTests.d.ts.map +0 -1
  383. package/dist/test/generators.d.ts.map +0 -1
  384. package/dist/test/mockData.d.ts.map +0 -1
  385. package/dist/util/attributeWildcards.d.ts.map +0 -1
  386. package/dist/util/builder.d.ts.map +0 -1
  387. package/dist/util/catalogMeta.d.ts.map +0 -1
  388. package/dist/util/cli.d.ts.map +0 -1
  389. package/dist/util/errors.d.ts.map +0 -1
  390. package/dist/util/imports.d.ts.map +0 -1
  391. package/dist/util/runtimeSource.d.ts.map +0 -1
  392. package/dist/util/securityConfig.d.ts.map +0 -1
  393. package/dist/util/streamConfig.d.ts.map +0 -1
  394. package/dist/util/tools.d.ts.map +0 -1
  395. package/dist/util/xmlWhitespace.d.ts.map +0 -1
  396. package/dist/xsd/primitives.d.ts.map +0 -1
  397. package/docs/AGENTS.md +0 -47
  398. package/docs/README.md +0 -69
  399. package/docs/architecture.md +0 -158
  400. package/docs/content-model-analysis.md +0 -92
  401. package/docs/content-model-baseline.md +0 -121
  402. package/docs/content-model-catalog.md +0 -116
  403. package/docs/content-model-companions.md +0 -90
  404. package/docs/content-model-composition.md +0 -103
  405. package/docs/content-model-decisions.md +0 -79
  406. package/docs/content-model-gateway-feasibility.md +0 -169
  407. package/docs/content-model-graph.md +0 -121
  408. package/docs/content-model-loading.md +0 -163
  409. package/docs/content-model-matching.md +0 -85
  410. package/docs/content-model-readiness.md +0 -144
  411. package/docs/content-model-resolution.md +0 -81
  412. package/docs/content-model-s02-handoff.md +0 -98
  413. package/docs/content-model-s06-au-01.md +0 -425
  414. package/docs/content-model-s06-dt-01.md +0 -386
  415. package/docs/content-model-s06-pw-01.md +0 -350
  416. package/docs/content-model-s06-re-01-resolver-implementation.md +0 -869
  417. package/docs/content-model-s06-re-01-resolver.md +0 -513
  418. package/docs/content-model-s06-re-01-scalar-witnesses.md +0 -1423
  419. package/docs/content-model-s06-re-01-support-reconstruction.md +0 -6337
  420. package/docs/content-model-s06-re-01.md +0 -7477
  421. package/docs/content-model-s06-research-handoff.md +0 -909
  422. package/docs/content-model-shipped-fix.md +0 -83
  423. package/docs/content-model-soap-feasibility.md +0 -165
  424. package/docs/decisions/001-test-generation.md +0 -36
  425. package/docs/decisions/002-streamable-responses.md +0 -332
  426. package/docs/decisions/003-content-model-contracts.md +0 -280
  427. package/docs/file-naming-and-path-organization.md +0 -213
  428. package/docs/reference-validation.md +0 -243
  429. package/docs/releases/README.md +0 -94
  430. package/docs/releases/v0.20.0.md +0 -22
  431. package/docs/releases/v0.21.0.md +0 -30
  432. package/docs/releases/v0.22.0.md +0 -30
  433. package/docs/releases/v0.23.0.md +0 -31
  434. package/docs/releases/v0.24.0.md +0 -38
  435. package/docs/releases/v0.25.0.md +0 -31
  436. package/docs/releases/v0.25.2.md +0 -32
  437. package/docs/releases/v0.26.0.md +0 -32
  438. package/docs/releases/v0.27.0.md +0 -31
  439. package/docs/releases/v0.28.0.md +0 -32
  440. package/docs/releases/v0.29.0.md +0 -32
  441. package/docs/releases/v0.30.0.md +0 -30
  442. package/docs/releases/v0.30.1.md +0 -31
  443. package/docs/releases/v0.30.2.md +0 -30
  444. package/docs/releases/v0.30.3.md +0 -33
  445. package/docs/releases/v0.31.0.md +0 -33
  446. package/docs/releases/v0.32.0.md +0 -33
  447. package/docs/releases/v0.33.0.md +0 -34
  448. package/docs/releases/v0.34.0.md +0 -30
  449. package/docs/releases/v0.35.0.md +0 -33
  450. package/docs/releases/v0.36.0.md +0 -32
  451. package/docs/releases/v0.37.0.md +0 -33
  452. package/docs/releases/v0.38.0.md +0 -35
  453. package/docs/releases/v0.39.0.md +0 -35
  454. package/docs/releases/v0.40.0.md +0 -45
  455. package/docs/releases/v0.40.1.md +0 -34
  456. package/docs/releases/v1.0.0.md +0 -42
  457. package/docs/releases/v1.0.1.md +0 -38
  458. package/docs/releases/v1.0.2.md +0 -51
  459. package/docs/releases/v1.0.3.md +0 -37
  460. package/docs/releases/v1.0.4.md +0 -45
  461. package/docs/releases/v1.0.5.md +0 -41
  462. package/docs/releases/v1.0.6.md +0 -35
  463. package/docs/releases/v1.0.7.md +0 -36
  464. package/docs/releases/v1.1.0.md +0 -42
  465. package/docs/releases/v1.1.1.md +0 -44
  466. package/docs/releases/v1.1.2.md +0 -42
  467. package/docs/releases/v1.1.3.md +0 -36
  468. package/docs/releases/v1.1.4.md +0 -36
  469. package/docs/releases/v1.1.5.md +0 -38
  470. package/docs/roadmap/README.md +0 -107
  471. package/docs/roadmap/v1.0-capability-conformance-framework.md +0 -582
  472. package/docs/roadmap/v1.0-choice-union-mode.md +0 -90
  473. package/docs/roadmap/v1.0-contract-audit.md +0 -75
  474. package/docs/roadmap/v1.0-json-array-streaming.md +0 -101
  475. package/docs/roadmap/v1.0-openapi-fastify-compatibility.md +0 -99
  476. package/docs/roadmap/v1.0-release-candidate-gates.md +0 -92
  477. package/docs/roadmap/v1.0-wsdl-coverage-matrix.md +0 -200
  478. package/docs/roadmap/v1.0-xs-anyattribute-wildcard-bag.md +0 -932
  479. package/src/runtime/jsonArray.ts +0 -55
  480. package/src/runtime/ndjson.ts +0 -32
@@ -1,79 +0,0 @@
1
- # Content Model Decision Register
2
-
3
- Stable S02 decision IDs, evidence and downstream ownership. See the root [README](../README.md).
4
-
5
- ## Ownership and dispositions
6
-
7
- The lead S02 implementation agent owns decision drafting/integration; independent review agents review semantic and integration domains. Maintainer approval is represented by the reviewed normal PR merge. Implementation ownership below means the named issue's assignee when taken up, not volunteering a contributor. The [ADR](decisions/003-content-model-contracts.md) owns the selected contracts.
8
-
9
- `Resolved` means a selected contract with evidence sufficient for its decision boundary; it does not claim later production code is implemented. `Open/blocking` identifies a decision that must be settled before its listed consumer. The initial draft passed independent semantic and integration review at `2f88ec81f77f4fc5a06b78f2d507ae8e20fe7a7c`; executed SOAP and gateway evidence now reconcile the selected contracts. Final delivery remains subject to the independent joint gate and required checks.
10
-
11
- ## Register
12
-
13
- | ID / disposition | Selected contract and artifact | Supporting evidence | Decision owner / implementation owner | Consumers / resolution gate |
14
- |---|---|---|---|---|
15
- | S02-D01 Resolved | Ordered input, immutable graph, contextual URI identity; ADR input section | S01 order/count fixtures; XSD structures/namespaces | S02 lead / #171-#180 | S03-S07; independent reviewed draft and final joint gate |
16
- | S02-D02 Resolved | XML-value versus graph; reversible/normalized/lossy projections; ADR value section | S01 `sequence-order`, `empty-alternative`; epic CM-04/05/08 | S02 lead / #182/#183/#187 | S08/S10/S13; reviewed draft and final joint gate |
17
- | S02-D03 Resolved | Non-mutating idempotent normalization and three laws; ADR equivalence examples | S01 invisible groups; XSD datatype normalization | S02 lead / #182/#184/#188/#189 | S08/S10/#198; reviewed draft and final joint gate |
18
- | S02-D04 Resolved | XSD 1.0 profile and scalar/particle matrix; ADR profile section | S01 independent manifest; W3C XSD 1.0 | S02 lead / #179/#180/#184 | #187-#189/#198-#200; independent fixture gates |
19
- | S02-D05 Resolved | Separate client/HTTP projections; portable formats and fingerprint; ADR bundle section | Flattened-catalog information loss; epic CM-11/17 | S02 lead / #183/#185/#186 | #195/#196/#201; reviewed draft and final joint gate |
20
- | S02-D06 Resolved | OAS 3.1.1; separate draft-07 lowerings, validated fallback and shared checks; ADR dialect section | Independently reviewed #170 corpus and gateway evidence | S02 lead / #197/#198/#199/#200 | First consumers implement selected lowerings and independent validation |
21
- | S02-D06-OpenAPI Resolved | OAS 3.1.1 documentation, separate lowerings; ADR dialect section | Gateway evidence: current emitter is OAS 3.1.0; primary OAS 3.1.1 | S02 lead / #197 | #198/#199/#200; selected dialect/completeness must be emitted |
22
- | S02-D06-runtime Resolved | Strict non-mutating route-local draft-07 Ajv; gateway runtime section | Gateway 19-case corpus: mutation control, recursion, facets, keyword rejection | S02 lead / #198/#199 | #199/#200; missing supplemental plans fail closed |
23
- | S02-D06-serializer Resolved | Separate draft-07 serializer plan, independent validation; gateway serializer section | Gateway byte preservation and facet counterexamples | S02 lead / #197/#200 | #200; serializer cannot certify response validity |
24
- | S02-D06-fallback Resolved | Explicit validated JSON fallback; gateway complexity section | Imported current emitter at 149/150 refs; invalid response rejected by proposed boundary | S02 lead / #200 | #198/#200; retain validation schema when serializer schema is omitted |
25
- | S02-D06-supplemental Resolved | Inject one #180/#184 owner at validation boundaries; ADR scalar/dialect sections | Gateway exact int64/fractionDigits callback; annotation-only failure | S02 lead / #180/#184/#198 | #199/#200; no complete plan without shared checks |
26
- | S02-D06-closure Resolved | Graph-derived complete closure; no generic allOf merge; gateway composition section | Original closed composition rejects value accepted after current flattening | S02 lead / #197 | #198/#199/#200; each lowering must prove equivalence or diagnose |
27
- | S02-D07 Resolved | Buffered raw body/event and retained dedicated stream; minimum matrix and verification-before-yield; ADR transport section | Executed #169 HTTP/TLS/signing and raw/fault/cancel seams | S02 lead / #190/#192/#193 | #190/#192/#193 gate all unqualified capabilities before dispatch |
28
- | S02-D07-stream-qualification Open/consumer-blocking | Reject unqualified stream auth/TLS/version combinations; ADR transport and SOAP matrix | Executed current omissions; no qualified stream security claim | S02 lead / #192/#194 | #192/#194 resolve qualification; blocks affected #196/#200 dispatch, not S03's fixed graph/raw/capability contracts |
29
- | S02-D07-incoming-verification Open/consumer-blocking | Verify before decoding/yield or reject; ADR security/completion sections | Outgoing signatures verified; incoming/combined security unverified | S02 lead / #190/#192/#193/#194 | Named owners resolve incoming qualification; blocks authenticated yielding, not S03's proven raw access and fixed ordering contract |
30
- | S02-D08 Resolved | Consumption-driven success certifies declared response scope; ADR completion section | ADR-002 truncation policy; epic CM-13 | S02 lead / #185/#193/#194 | #196/#200/#202; reviewed draft and final joint gate |
31
- | S02-D09 Resolved | Numeric provisional budgets and errors; ADR budget table | Epic CM-16 boundedness requirement | S02 lead / #171/#172/#179/#180/#184/#193 | All first consumers; #208 refines measured limits |
32
- | S02-D10 Resolved | Legacy support, source regeneration, mixed rejection; 1.x default preserved; ADR compatibility section | S01 lost structure; current release v1.1.4 | S02 lead / #174/#185/#186/#195/#196/#201 | #204 qualification/#205 retirement; 2.0.0 release/default gate |
33
- | S02-D11 Resolved | Reject bounds-only, flattening, parse DTOs, one dialect and security bypass; ADR alternatives section | S01 counterexamples; ADR-002 | S02 lead / all semantic and adapter owners | Architecture PRs; reviewed draft and final joint gate |
34
- | S06-AU-01 Selected | [Repeated attribute-use research](content-model-s06-au-01.md) | C1 and all-original-base source replacement; independent typed/default contrasts | #233 research / #179 schema; #184 payload | Complete local review/delivery; production integration in #179 |
35
- | S06-RE-01 Open/blocking | [Reordered derivation research](content-model-s06-re-01.md) | Formal witnesses; empty-choice and wildcard counterexamples | #234 research / #179 integration | Complete approved-domain procedure, reviewed predicates and proof |
36
- | S06-PW-01 Selected | [Group-to-wildcard research](content-model-s06-pw-01.md) | Explicit project R-240 selection; reference disagreement | #235 research / #179 integration | Complete local review/delivery; production integration in #179 |
37
- | S06-DT-01 Selected | [Calendar research](content-model-s06-dt-01.md) | Explicit candidate A repairs; BCE correction; rollover contrasts | #236 research / #179 schema; #184 payload | Complete local review/delivery; shared implementation in #179/#184 |
38
-
39
- ## Findings traceability
40
-
41
- S04's [immutable graph](content-model-graph.md) and [format 2 catalog boundary](content-model-catalog.md) implement the early D01/D04/D09/D10 consumers without changing the approved decisions or activating faithful generation.
42
- The #151 final handoff records independently reviewed revisions, validation results and the unchanged downstream qualification gates.
43
-
44
- | Finding | Decision and disposition | Implementation owner / evidence |
45
- |---|---|---|
46
- | CM-01/02/03 | D01/D02/D04 implement exact particles/projections | #178/#179/#180/#182/#198; S01 manifest |
47
- | CM-04/05 | D02/D03/D07 implement ordered values, normalize invisible history | #171 [ordered input](content-model-loading.md); later #182/#188/#189/#190/#192; SOAP probe |
48
- | CM-06/07 | D01/D04 implement namespace identity, references and derivation | #171/#172 [loading evidence](content-model-loading.md); #173 [graph contract](content-model-graph.md); later #175/#176/#179/#184 |
49
- | CM-08 | D02/D04 retain absence/empty/nil/attributes | #182/#183/#184/#187/#189; committed SOAP/gateway probes |
50
- | CM-09/10 | D06 non-mutating validation and independent serialization | #197/#198/#199/#200; committed gateway probe |
51
- | CM-11/17 | D05/D10 version/fingerprint routing; explicit activation | #174/#185/#186/#195/#196/#201/#204 |
52
- | CM-12 | D07 tested binding/security adapters, reject unverified combinations | #190/#192; committed SOAP probe |
53
- | CM-13/14 | D08 completion scope, isolated decoding and bounded lifecycle | #185/#187/#193/#194/#200 |
54
- | CM-15 | Independent evidence; preserve known oracle disagreement | #181/#207; S01 manifest, not altered by S02 |
55
- | CM-16 | D09 measurable first-owner limits | #171/#172 [measured loading limits](content-model-loading.md#loading-budgets); later #179/#180/#184/#193/#208 |
56
-
57
- ## Probe and acceptance checkpoints
58
-
59
- S05's [derivation evidence](content-model-composition.md) adds concrete #179 qualification inputs without changing the approved profile.
60
- Duplicate extension uses, fixed-value equivalence, group/local wildcard processing and imported wildcard expressibility require independent reconciliation before affected plans are assessed.
61
- S05 preserves these as typed obligations with original operands; this is not a new scalar checker or a declaration of verified arbitrary derivation support.
62
-
63
- The [joint research handoff](content-model-s06-research-handoff.md) coordinates #232 and its four leaves against accepted #178 and the pinned unaccepted #231 draft.
64
- Its research-only manifest and separately invoked probes preserve primary expectations, conditional proposals and engine observations.
65
- The maintainer selected C1 with universal source-replacement matching, R-240 and candidate A's three calendar repairs after reviewing concrete alternatives.
66
- Local acceptance still requires complete independent review and exact delivery gates; RE01's complete negative proof remains open.
67
- Green research checks do not accept #232/#179/#153 or make S07/S08 Ready.
68
- The [TypeScript RE01 continuation](content-model-s06-re-01.md#witness-domain-and-comparison-decision) starts from unmerged #254 and separates component representation from recursive endpoint resolution with executable group-incidence, particle and existing-intermediate controls.
69
- Abstract construction plans plus a separately checked hypothetical graph overlay are recommended for investigation; comparison closure, context-sensitive legality and the full proof remain open, with accepted sibling contracts and existing production guards preserved.
70
-
71
- The [S02 handoff](content-model-s02-handoff.md) and #149 acceptance record pin reviewed draft/probe revisions and final delivery review/checks/merge. The SOAP source probe at `4d1d3972fbb0f8170232a3bd143f0fcf0adc842d` passed independent integration review; the gateway source probe at `d826ff506a80437bca1b747f40b772727643a506` passed independent semantic/gateway review.
72
-
73
- No foundational graph, projection, bundle/runtime, base transport or compatibility question remains open. The two open qualification entries block their affected transport/security consumers; their rejection and verification-order contracts are already resolved, so they do not change S03's input contract. Future shared scalar/particle, completion and compatibility implementations remain mandatory first-consumer gates, not already implemented features. S03 starts only after S02's joint gate closes.
74
-
75
- ## Checked-product entry contract
76
-
77
- [P1-D01](decisions/003-content-model-contracts.md#checked-product-assessment-amendment-p1-d01) separates scoped, potentially inconclusive diagnostics from universal RE01 research acceptance. #367 owns the additive source API/report and assessment-only CLI; #368 measures that exact interface; #369 implements one later checked buffered client slice. #179/#153 retain full-profile ownership, and #234/#351/#362/#365 retain their unchanged research claims.
78
-
79
- The native-direct basis and dated-XSD correspondence are separate required dimensions. Unknown runtime capabilities remain unsupported or not-assessed, and whole-Gamma legality remains independent of operation reachability. Conditional admission #370 and public structured activation remain deferred.
@@ -1,169 +0,0 @@
1
- # Content Model Gateway Feasibility
2
-
3
- Executed S02 #170 evidence for validation, representation and serialized-byte boundaries. See the root [README](../README.md).
4
-
5
- ## Scope and disposition
6
-
7
- This bounded probe supports ADR 003's draft-07 runtime and serializer lowering, route-local non-mutating validation, and independently validated JSON serialization fallback. It introduces fixtures and tests only; the current gateway emitter and unrelated host policy remain unchanged.
8
-
9
- The [ADR](decisions/003-content-model-contracts.md#portable-contracts-and-dialects-s02-d05-s02-d06) defines the architecture; the [decision register](content-model-decisions.md) owns final dispositions. This document records executed observations, primary documentation, unverified combinations and first-consumer gates for #197/#198/#199/#200.
10
-
11
- ## Reproduction and inspected versions
12
-
13
- The executable corpus is [the gateway feasibility integration test](../test/integration/content-model-gateway-feasibility.test.ts). Its [route helper](../test/helpers/contentModelGatewayProbe.ts) uses installed Ajv and serializer engines, not another schema or semantic engine.
14
-
15
- The reviewed draft checkpoint was `2f88ec81f77f4fc5a06b78f2d507ae8e20fe7a7c`. The following installed versions were observed after `npm ci --cache tmp/cache/npm` on Node `24.19.0`; the lockfile, rather than package ranges, determines this evidence.
16
-
17
- | Component | Installed version | Role |
18
- |---|---|---|
19
- | Fastify | 5.12.5 | HTTP routes and injection |
20
- | Ajv | 8.20.0 | Runtime JSON validation |
21
- | `@fastify/ajv-compiler` | 4.0.6 | Host default validator |
22
- | `fast-json-stringify` | 7.0.1 | Schema serializer |
23
- | `@fastify/fast-json-stringify-compiler` | 5.1.0 | Host serializer adapter |
24
- | `ajv-formats` | 3.0.1 | Installed host format plugin |
25
- | Vitest | 5.0.3 | Executable evidence |
26
- | TypeScript | 6.0.3 | Existing integration typecheck |
27
-
28
- Run the local checks from the repository root:
29
-
30
- ```bash
31
- npm ci --cache tmp/cache/npm
32
- npx vitest run test/integration/content-model-gateway-feasibility.test.ts --reporter=verbose
33
- npm run typecheck:integration
34
- npm run docs:validate
35
- npm run test:conformance
36
- ```
37
-
38
- The integration suite writes `tmp/conformance/content-model-gateway/traces.json`. Each ordinary probe records submitted JSON text, parsed submission, validator-visible values before/after, handler input, returned response, response-validation values, serializer-output values, status and actual HTTP bytes.
39
-
40
- Missing handler/serializer snapshots mean the request or response was rejected before that boundary. The imported current-emitter fallback has no body validator, so its trace records that boundary as absent rather than inventing validator observations.
41
-
42
- ## Selected dialect boundaries
43
-
44
- ### OpenAPI documentation
45
-
46
- Select OpenAPI `3.1.1` and its OAS schema dialect based on JSON Schema 2020-12 for future faithful documentation. Primary specification inspection establishes the standard; it does not prove that the installed Fastify runtime or serializer executes every OpenAPI keyword.
47
-
48
- The [current OpenAPI generator](../src/openapi/generateOpenAPI.ts) emits `openapi: "3.1.0"` and omits `jsonSchemaDialect`; this is source inspection, not an assertion that it already emits the selected `3.1.1` target. The synthetic complexity document in this probe uses `3.1.1` only to test gateway emission from that input.
49
-
50
- OpenAPI documents representation constraints and supplemental requirements. `x-xsd-fractionDigits` is an annotation: strict route-local Ajv rejects it as unknown; explicitly registering it as annotation-only admits `"1.234"` despite a declared value of two.
51
-
52
- ### Runtime JSON Schema
53
-
54
- Select draft-07 for the bounded faithful runtime lowering. The installed default Ajv class loads the draft-07 vocabulary and meta-schema; the compiler uses `strict: true`, `coerceTypes: false`, `removeAdditional: false`, `useDefaults: false` and `allErrors: false`.
55
-
56
- Use route-level `validatorCompiler`; register referenced schemas with that Ajv instance explicitly. Do not change the host's global compiler or Ajv options. The same Fastify instance's control route retains coercion, default insertion and removal of unknown fields.
57
-
58
- Executed failures establish that a 2020-12 `$schema` cannot compile with this class and that unlabelled `unevaluatedProperties` fails strict compilation. Other modern vocabulary is outside the selected lowering; unknown required capabilities must fail planning or compilation rather than be ignored.
59
-
60
- ### Serializer JSON Schema
61
-
62
- Select separately emitted draft-07 serializer schemas for the tested closed shapes. Installed `fast-json-stringify` documentation expressly requires draft-07 input; its conversion and branch selection behavior is not complete response validation.
63
-
64
- Validate returned HTTP JSON before serialization, validate parsed serialized bytes with the same independent runtime plan and shared semantic owner, and compare admitted JSON values for preservation. The probe's serializer wrapper rejects field loss before bytes leave Fastify; it does not repair the value or silently switch backend.
65
-
66
- Select an explicit route-local `JSON.stringify` fallback when serializer lowering cannot preserve an admitted JSON value or when the configured complexity policy selects fallback. Keep response validation and its references available regardless of serializer selection; a fallback must never remove the validation obligation.
67
-
68
- ## Executed observations
69
-
70
- ### Requests and host control
71
-
72
- | Case | Route-local observation | Host control observation |
73
- |---|---|---|
74
- | Numeric field submitted for string | 400; original field unchanged | Converted to string |
75
- | Required field with schema default missing | 400; field remains absent | Default inserted |
76
- | Unknown closed-object property | 400; property remains present | Property removed |
77
- | Both closed exclusive-choice fields | 400; both fields retained | 200 after removing one field |
78
- | Valid declared fields | 200; validator and handler values equal submission | Control remains independent |
79
-
80
- These observations prove that invalid input cannot pass only because validation coerces, inserts defaults or removes fields on the proposed route. They characterize existing Fastify defaults; they do not recommend a global host-policy rewrite.
81
-
82
- ### Structural lowerings
83
-
84
- | Construct | Executed outcome | Boundary |
85
- |---|---|---|
86
- | Closed `oneOf` branches | Valid branch survives bytes; combined branches rejected | Runtime and schema serializer |
87
- | Overlapping `oneOf` | Both alternatives match; rejected | Runtime |
88
- | Overlapping `anyOf` | Both fields accepted and preserved | Runtime and JSON fallback |
89
- | Two empty `oneOf` alternatives | Empty object rejected because both match | Runtime |
90
- | Two empty `anyOf` alternatives | Empty object accepted and preserved | Runtime and JSON fallback |
91
- | Nullable array items | `["a",null]` accepted; null wrapper rejected | Runtime and schema serializer |
92
- | Nullable array wrapper | Null wrapper accepted; `[null]` rejected | Runtime and schema serializer |
93
- | Recursive `$ref` with nullable child | Nested valid response preserved; nested numeric value rejected | Runtime and schema serializer |
94
- | Outer object closure with `allOf` requirements | Both declared fields preserved; missing/unknown fields rejected | Runtime and schema serializer |
95
- | Closed disjoint `allOf` members | Original rejects `{a,b}`; current flattening accepts it | Current helper changes meaning |
96
-
97
- The draft-07 outer-closure fixture enumerates the complete property set once at its containing object and declares local properties in each required subschema to satisfy Ajv `strictRequired`. A graph-driven lowering must emit the equivalent complete closure; generic merging of arbitrary OpenAPI `allOf` is not an equivalence proof.
98
-
99
- An XML empty alternative is validated by the shared particle language, not by counting JSON `oneOf` matches. Overlapping or empty JSON alternatives that cannot express that language use a declared lowering plus #180 supplemental validation, with validated JSON fallback where serializer selection is unsuitable.
100
-
101
- ### Scalar and facet boundaries
102
-
103
- Precision-sensitive int64 `"9223372036854775807"` and decimal `"9007199254740993.12345678901234567890"` survive validator snapshots and HTTP bytes exactly. Numeric substitutions and exponent-form decimal strings are rejected by the string representation schema.
104
-
105
- Submitting the same digits as JSON numbers loses precision in JSON parsing before the validator sees them. The native-number probe sees `9223372036854776000` and `9007199254740994`; downstream schema validation cannot restore the submitted digits.
106
-
107
- The reviewed lexical-sensitive witness `"+01.00"` survives response serialization. The fixture's anchored JSON pattern selects that representation and rejects `"1"`; it does not claim arbitrary XSD pattern equivalence or authorize rewriting a facet-constrained lexical witness.
108
-
109
- Representation-only validation admits `"9223372036854775808"` and decimal `"1.234"`. A separate test-only shared-owner callback uses built-in `BigInt` for int64 bounds and exact textual fractional digits after trailing-zero removal for a two-fractional-digit profile; it rejects upper/lower out-of-range and excess-scale witnesses before handler dispatch and before response serialization, without mutating values.
110
-
111
- The callback proves an executable supplemental seam, not a production XSD validator. Exact coefficient/scale conversion, totalDigits, all numeric bounds, XSD lexical/value normalization and XSD regex semantics remain owned by #184/#198; no duplicate scalar engine is added here.
112
-
113
- | Constraint | Independent Ajv evidence | Serializer evidence |
114
- |---|---|---|
115
- | `type`, `required`, object closure | Accepted and rejected cases | Approved closed fields preserved |
116
- | `pattern`, `minLength`, `maxLength` | Request and returned-response failures | Invalid string still serialized without independent validation |
117
- | Integer `minimum`, `maximum` | Request and returned-response failures | Out-of-range integer still serialized without independent validation |
118
- | `enum`, `minItems`, `maxItems` | Request and returned-response failures | Invalid array still serialized without independent validation |
119
- | Exact int64/fractionDigits | Supplemental callback rejects exact witnesses | Callback retained under JSON fallback |
120
- | `x-xsd-fractionDigits` | Unknown keyword rejected; annotation registration does not enforce | No enforcement claim |
121
- | XSD particle/regex/QName rules | Injected shared semantic seam only | No enforcement claim |
122
-
123
- ### Response field preservation and complexity fallback
124
-
125
- An open object schema admits an `approved` field absent from `properties`. The schema serializer omits it, and the proposed preservation boundary returns 500 before output; explicitly selecting validated JSON fallback preserves the nested field and values.
126
-
127
- The current [gateway emitter](../src/gateway/generators.ts) selects no fallback at 149 reachable schema references and selects fallback at 150. The test imports the actual emitted route module and supplies a local handler for its generated stub; the route registration removes `response` and uses Fastify's JSON serialization fallback.
128
-
129
- That current emitted route returns both a valid 150-reference response and an invalid numeric/unknown-field response with 200 and unchanged bytes. The proposed adapter retains the same referenced runtime response schema, returns the valid response without field loss and rejects the invalid response before serialization even while using `JSON.stringify`.
130
-
131
- This broad 150-reference graph proves the existing policy boundary and fallback behavior. It does not measure the serializer's maximum depth, prove a stack overflow at exactly 150, or justify a new resource limit.
132
-
133
- ## Decision-register handoff
134
-
135
- The following D06 entries resolve architecture choices within the tested scope. Missing implementation and qualification remain blocking gates for their first consumers; they are not claims of already shipped faithful behavior.
136
-
137
- | Entry | Selected contract | Evidence | First owner and consuming gate |
138
- |---|---|---|---|
139
- | D06-OpenAPI | OAS 3.1.1 documentation; separate runtime lowering | Primary standard; current output source inspected | #197 must emit selected dialect and completeness metadata |
140
- | D06-runtime | Strict non-mutating route-local draft-07 Ajv | Host isolation, structures, facets, modern-keyword failures | #198 validator/compiler plan; #199 request integration |
141
- | D06-serializer | Separate draft-07 serializer plan; serializer is not validation | Actual byte checks and ordinary facet counterexamples | #197 lowering; #200 preservation validation |
142
- | D06-fallback | Explicit JSON fallback preserves independent response validation | Imported current emitter and 150-ref proposed route | #200 must retain validation when serializer schema is omitted |
143
- | D06-supplemental | One shared #180/#184 semantic owner, injected at each boundary | Exact facet callback and fail-closed seam tests | #198 must supply shared rules; #199/#200 must invoke them |
144
- | D06-closure | Complete graph-derived closure; no generic allOf flattening | Original/flattened meaning differs | #197 lowering proof before #198/#199/#200 consume it |
145
-
146
- Required blockers are explicit: #197 must diagnose an unsupported lowering or choose an evidenced validated fallback; #198 must reject incomplete plans lacking required #180/#184 checks; #199 must validate before explicit representation conversion and dispatch; #200 must validate converted response JSON and serializer bytes before sending. Exact scalar facets, complete particle languages and lexical-sensitive normalization cannot be waived by schema or serializer success.
147
-
148
- ## Documented and unverified combinations
149
-
150
- Installed primary docs describe draft-07, nullable extensions, recursive references, serializer defaults, field omission and branch selection. Documentation alone does not expand this finite executed corpus.
151
-
152
- Format plugins are installed on the host, but the route-local Ajv probe does not install them or claim date/time/binary format enforcement. QName namespace scope, XSD Unicode/regex differences, list/union assessment, wildcard and nil-with-attributes projections, mixed text, discriminator, `if/then/else`, dependent vocabulary and pathological recursive depth are unverified here and require implementing-issue fixtures.
153
-
154
- OpenAPI 3.1.1 document validation, generic 2020-12 Ajv compilation, arbitrary modern-to-draft-07 lowering, live network listeners, consumer-installed dependency matrices, Node 26 and adversarial performance/resource limits were not exercised by this integration suite. The current threshold remains a selected existing fallback policy rather than a newly measured engine limit.
155
-
156
- ## Validation record
157
-
158
- The final targeted suite passed all 19 tests on Node 24.19.0; the existing integration typecheck passed. Full conformance passed all 138 tests across three files; documentation validation and the pipeline smoke check passed.
159
-
160
- IDE inspections were unavailable; repository-local TypeScript, Vitest and documentation checks provide the local verification. No production files, dependencies or global host options were changed.
161
-
162
- ## Primary references
163
-
164
- - [Fastify 5.12.5 validation and serialization](https://github.com/fastify/fastify/blob/v5.12.5/docs/Reference/Validation-and-Serialization.md)
165
- - [Ajv 8.20.0 README](https://github.com/ajv-validator/ajv/blob/v8.20.0/README.md)
166
- - [Ajv 8.20.0 data modification](https://github.com/ajv-validator/ajv/blob/v8.20.0/docs/guide/modifying-data.md)
167
- - [fast-json-stringify 7.0.1 README](https://github.com/fastify/fast-json-stringify/blob/v7.0.1/README.md)
168
- - [OpenAPI 3.1.1 specification](https://github.com/OAI/OpenAPI-Specification/blob/3.1.1/versions/3.1.1.md)
169
- - [ADR 003 scalar profile](decisions/003-content-model-contracts.md#xsd-10-profile-and-enforcement-s02-d04)
@@ -1,121 +0,0 @@
1
- # Canonical Schema Graph
2
-
3
- Internal S04 graph contracts for the unreleased faithful compiler. See the root [README](../README.md).
4
-
5
- ## Ownership and data flow
6
-
7
- [ADR-003 D01/D04/D09](decisions/003-content-model-contracts.md) defines identity, profile and budgets.
8
- [S03 loading](content-model-loading.md) supplies immutable syntax through its repository-owned adapter.
9
- [The model](../src/compiler/canonicalGraph.ts) and [pure builder](../src/compiler/buildCanonicalGraph.ts) implement #173.
10
-
11
- ```text
12
- SchemaInput.schemas + ordered WSDL documents
13
- -> reserve global symbols
14
- -> build complete declarations and independent use sites
15
- -> link available targets without expansion
16
- -> freeze CanonicalGraph
17
- -> S05 reference/composition assessment
18
- ```
19
-
20
- `buildCanonicalGraph(input, {maxNodes?})` performs no I/O and never mutates input.
21
- The internal graph is not exported by the package entry point or activated by the CLI.
22
- The legacy compiler and its consumers retain the 1.x default.
23
-
24
- ## Identities and immutable references
25
-
26
- Global IDs are JSON tuples `['global', role, effectiveNamespace, localName]`.
27
- Element, attribute, type, model group, attribute group and WSDL roles occupy separate symbol spaces.
28
- Simple and complex named types share the type symbol space.
29
-
30
- Scoped identity is `(containingDeclarationId, sourceRelativePath, role)`.
31
- The ID is `scoped:` plus SHA-256 of the UTF-8 JSON tuple `[owner, path, role]`; the tuple remains explicit in `identity`.
32
- Hashing prevents recursively escaped anonymous-owner IDs from growing exponentially with nesting.
33
- An anonymous type is a distinct type node owned by its containing declaration.
34
- Local elements with the same expanded name in different types retain independent declarations and type references.
35
-
36
- Syntax paths are relative to the containing declaration and preserve the adapter's ordered element/text indexes.
37
- They contain no document URI or temporary directory.
38
- Changing source structure may change scoped IDs; output names and prefixes never define identity.
39
-
40
- Interpretation keys live only in `origins`; repeated root/include interpretations do not create additional globals.
41
- Repeated declarations from the same byte digest and source path share one complete body.
42
- Conflicting declarations for one global identity fail explicitly rather than being merged by name.
43
-
44
- References are discriminated `symbol`, `builtin` or `local` values.
45
- Available global targets are linked after all bodies exist; unresolved symbol references keep their expanded name and lexical context with no target.
46
- S05 owns missing-target diagnosis, reference visibility, component-cycle legality and complete derivation semantics.
47
-
48
- For recursive `element Shared -> type Shared -> element-use Shared`, each target points to a complete declaration.
49
- No eager expansion or empty recursion placeholder is introduced.
50
- Two uses of group `Pair` with bounds `0..2` and `3..900719925474099312345678901234567890` share its definition and keep separate particles.
51
-
52
- ## Node invariants
53
-
54
- Element and attribute declarations own their expanded names, type references and default/fixed constraints.
55
- Particles own only their local `Occurs` and term: ordered sequence, choice, legal XSD 1.0 all, element use, group use or wildcard.
56
- Attributes, attribute-group references and attribute wildcards occupy an ordered attribute-use list distinct from child content.
57
-
58
- Simple types retain restriction bases and ordered facets, list items or declaration-ordered union members.
59
- Complex types retain local content and attributes plus distinct extension/restriction edges and simple/complex content kind.
60
- No derived content, effective attribute composition or occurrence summary is calculated here.
61
-
62
- Finite bounds are canonical nonnegative decimal strings; `unbounded` is a distinct maximum token.
63
- The builder compares exact integers, rejects negative/fractional/reversed ranges and invalid all shapes, and never converts bounds to Number.
64
- Zero remains a local bound; S06 calculates its annihilating effect on summaries.
65
-
66
- WSDL nodes preserve ordered message/operation/binding/service syntax and role-qualified references.
67
- Their binding extensions, actions, body/header/fault selections and lexical attributes remain available to later planning.
68
- The graph does not select a SOAP transport or advertise qualified capabilities.
69
-
70
- ## Lexical context and provenance
71
-
72
- Every graph node retains source URI, original-byte digest, source path and start/end positions, inherited base URI and namespace scope.
73
- Source offsets and exclusive ends follow the [adapter contract](content-model-loading.md#syntax-and-provenance-contract).
74
- `GraphContext.schemaAttributes` retains schema-level defaults for downstream interpretation.
75
-
76
- Facet values, defaults/fixed values, wildcard namespace constraints and explicit QName references retain `LexicalValue {value, context}`.
77
- Lexical values are not coerced, normalized or assessed by S04.
78
- QName facets can be interpreted later using the original locally rebound namespace context.
79
-
80
- Chameleon adoption changes a no-namespace component reference's effective target namespace while preserving its original lexical context.
81
- A lexical `Node` with an empty default binding can target `urn:a:Node` under adoption and `urn:b:Node` in another interpretation.
82
- An explicit/default lexical namespace remains authoritative; it is never overwritten by adoption.
83
-
84
- Default namespaces apply to lexical QNames and XML element names, while unprefixed ordinary XML attributes remain unqualified.
85
- Local declaration names use `form` or the schema's respective element/attribute form default.
86
- These declaration rules are independent of the XML syntax name's namespace.
87
-
88
- Annotations preserve ordered element/text syntax, attributes and namespaces, including mixed appinfo text.
89
- `syntaxDetails` preserves restriction/list/union and content-wrapper syntax; facets retain their complete declaring syntax.
90
- Known element-only XSD containers reject significant text explicitly, while mixed annotation content remains ordered.
91
- Uninterpreted declarations remain `retained` or contextual `schemaRetained` for S06 assessment; preservation is not support certification.
92
- Full internal URIs and loading edges remain provenance; [format 2 persistence](content-model-catalog.md) implements #174's artifact-safe serialization and semantic fingerprints.
93
-
94
- ## Resource and validation boundaries
95
-
96
- The inclusive provisional limit is 100,000 declarations and use-site nodes together.
97
- An explicit positive safe-integer `maxNodes` overrides it; construction fails with `resource-limit` and returns no partial graph.
98
- Malformed structural shapes fail with `invalid-schema` and the declaring source.
99
-
100
- S03's loading limits and conservative cyclic-depth behavior are consumed unchanged in `graph.loading`.
101
- The builder performs structural checks only; S05 resolves/composes, S06 checks complete schema legality and reachable capabilities, and S07 matches values.
102
- UPA, scalar/facet legality, complete component-cycle rules and production codecs remain downstream gates.
103
-
104
- ## Evidence and reproduction
105
-
106
- [Graph tests](../test/unit/canonical-graph.test.ts) reuse independent S01/S02 and S03 fixtures.
107
- [Graph fixtures](../test/conformance/fixtures/xsd/graph/shared-recursive.xsd) add shared definitions, recursion, local names, anonymous types, large bounds and scalar lexical context.
108
- [Chameleon input](../test/conformance/fixtures/xsd/graph/chameleon.wsdl) proves namespace adoption without rewriting lexical bindings.
109
- [Independent schema qualification](../test/conformance/reference/graph-contract.test.ts) preserves historical xmlschema 4.2.0 acceptance of the complete graph fixture. Current primary construction of the original huge bound remains unqualified under [NT-CONT-01](reference-validation.md), with exact scoped assertions and a separately hashed small copy.
110
- Historical libxml2 rejected that fixture's huge bound; the current adapter reports unsupported capability before engine allocation. The separate variant with maximum `4` constructs successfully; exact-bound assertions and archived xmlschema acceptance remain distinct from that fresh result.
111
-
112
- ```bash
113
- npx vitest run test/unit/canonical-graph.test.ts test/unit/canonical-graph-budgets.test.ts
114
- npx tsc -p test/unit/tsconfig.json
115
- npm run ci
116
- npm run test:reference:full
117
- ```
118
-
119
- [Budget evidence](../test/unit/canonical-graph-budgets.test.ts) measures 100,000/100,001 nodes and writes ignored results to `tmp/conformance/schema-graph/measurements.json`.
120
- The #151 handoff pins exact independently reviewed heads, merged revisions, commands/results and later qualification owners.
121
- Optional IDE checks, Windows filesystem behavior, private production schemas and broad platform limits remain unqualified.
@@ -1,163 +0,0 @@
1
- # Ordered Schema Loading
2
-
3
- Internal S03 input contracts for the unreleased faithful compiler. See the root [README](../README.md).
4
-
5
- ## Ownership and compatibility
6
-
7
- [ADR-003 D01/D04/D09](decisions/003-content-model-contracts.md) owns the input, profile and budget decisions.
8
- The [decision register](content-model-decisions.md) assigns the later semantic consumers.
9
- The [ordered syntax adapter](../src/loader/orderedSyntax.ts) implements #171; [contextual traversal](../src/loader/schemaInput.ts) and [resource I/O](../src/loader/schemaResources.ts) implement #172.
10
-
11
- This internal adapter is not exported from the package entry point or activated by the CLI.
12
- The existing [WSDL loader](../src/loader/wsdlLoader.ts) remains the legacy default while #174 owns later routing.
13
- Parsing XML syntax does not certify XSD legality, resolve declarations, or establish payload validity.
14
-
15
- ## Syntax and provenance contract
16
-
17
- `parseOrderedSyntax(bytes, absoluteUri, {maxDepth})` returns an immutable `SyntaxDocument` with `root`, full `uri` and SHA-256 `digest` of original bytes.
18
- `SyntaxElement.children` retains text and element order across every compositor kind; no name-keyed grouping occurs.
19
- Annotations, occurrence strings, declaration form settings and lexical attribute values remain available for their later owners.
20
-
21
- Each element retains its expanded `name`, `lexicalName`, ordinary attributes, all in-scope `namespaces`, effective `baseUri` and `source`.
22
- Namespace declarations populate context rather than ordinary attributes.
23
- Default namespaces apply to element names; unprefixed attribute names have an empty namespace.
24
-
25
- `resolveLexicalQName(value, element)` resolves QName-valued attributes or text in the declaring element's namespace context, including the default binding.
26
- It rejects malformed lexical names and unbound prefixes, without echoing lexical values in diagnostics.
27
- `syntaxElements` filters direct element children by expanded name while retaining order; `syntaxAttribute` retrieves an expanded attribute name.
28
-
29
- `source` contains full document URI, digest, stable source-relative syntax path and start/end positions.
30
- Lines and columns are one-based; offsets are zero-based UTF-16 positions in decoded XML and end offsets are exclusive.
31
- Syntax paths distinguish local declarations in different containing types; they are not global symbol identities.
32
- S04 owns global `(namespace, local, role)` identities and containing-declaration identities for locals.
33
-
34
- `baseUri` begins at the supplied final retrieval URI and inherits each `xml:base` through URL-reference resolution.
35
- For a document at `https://example.test/contracts/root.xsd`, `xml:base="../types/"` gives `https://example.test/types/`.
36
- The syntax adapter computes this context without performing I/O; #172 must authorize each resolved fetch.
37
-
38
- ## Syntax limits and diagnostics
39
-
40
- The default nesting budget is 256 elements, inclusive, checked before accepting the next element.
41
- `SchemaLoadingError` distinguishes `invalid-schema`, `unsupported-capability`, `resource-limit` and `transport`; syntax errors carry source context.
42
- The adapter rejects DTDs, entity declarations and unresolved entity references, while accepting XML's predefined and numeric character references.
43
-
44
- UTF-8 and BOM-marked UTF-16 are decoded strictly; unsupported declared encodings fail explicitly.
45
- Comments and processing instructions are outside XML-value fidelity and omitted; CDATA retains its text.
46
- The parser dependency is confined to this module; consumers receive repository-owned types.
47
-
48
- ## Controlled resolution contract
49
-
50
- `loadSchemaInput(source, {policy, limits, offlineResources})` creates one compilation-scoped snapshot.
51
- It accepts local paths, absolute file/HTTP(S) URIs, XSD roots and WSDL 1.1 definitions, including WSDL imports and inline schemas.
52
- It returns immutable documents, contextual schemas, resource metadata, explicit resolution edges, limits and I/O metrics.
53
-
54
- Traversal uses only expanded XSD include/import children and WSDL imports in their declaring syntax context.
55
- Payload roots fail with `unsupported-capability`; `xsi:schemaLocation` and annotation content never initiate resolution.
56
- Includes adopt the containing namespace only when the included schema has no target namespace; explicit namespace mismatches fail.
57
- Imports preserve their declared namespace and check it against the retrieved schema.
58
-
59
- An import without a schema location remains an unresolved edge for S05; it never guesses a network endpoint from its namespace.
60
- Include without a location fails as invalid input.
61
- Cycle edges remain in the result and stop active expansion; unresolved declaration diagnostics belong to S05 after traversal.
62
-
63
- Cached depth checks include inline schemas at zero edge cost and count the cycle-closing edge against current active ancestry.
64
- The [depth helper](../src/loader/resolutionDepth.ts) collapses strongly connected components and computes a polynomial upper bound on the condensed graph.
65
- Acyclic chains and closed simple cycles retain exact boundaries; cyclic components with branches or exits may exhaust this conservative budget earlier.
66
- An explicit caller depth override can admit them; no cycle edges or schema declarations disappear from the result.
67
-
68
- `SchemaInterpretation` exposes `syntax`, `documentUri`, `digest`, `baseUri`, `targetNamespace`, `context` and `key`.
69
- The context records root/inline/include/import kind and the namespace requested by that relationship.
70
- Its key is a deterministic tuple of digest, final document URI, effective base URI, effective target namespace, context kind/namespace and syntax path.
71
- The path distinguishes multiple inline schemas in the same document even when they share a namespace.
72
-
73
- For example, `common.xsd` without a target namespace included from `urn:a` and `urn:b` has one fetched resource and two interpretations.
74
- Both interpretations share immutable syntax; S04 reads their effective namespaces without changing lexical QName scope or mutating declarations.
75
- Identical bytes at `/base-a/common.xsd` and `/base-b/common.xsd` keep distinct interpretations because `child.xsd` resolves differently.
76
-
77
- The raw byte cache uses `(canonical final retrieval URI, SHA-256 digest)` and request/redirect aliases.
78
- Fetches and traversal are serialized within a compilation; each successful final resource is fetched once.
79
- The interpretation cache is separate and never keyed by digest alone.
80
- Previously authorized aliases reuse the compilation's pinned bytes without new filesystem or network I/O.
81
- Authorization I/O for a newly encountered file spelling still consumes the remaining deadline, even when it resolves to cached bytes.
82
-
83
- ## URI and security policy
84
-
85
- `policy.fileRoots` authorizes local roots; `policy.allowedOrigins` authorizes exact HTTP(S) origins, including scheme and port.
86
- Both lists default to empty. No input root grants implicit import permission.
87
- Every import and redirect is rechecked, including the result of inherited `xml:base`.
88
-
89
- HTTP redirects are manual and policy-checked before the next request; an HTTP redirect cannot select a file.
90
- The final checked URI becomes document identity and the initial base for syntax.
91
- Origin policy authorizes the destination explicitly, including any caller-approved private destination; it does not inherit application transport credentials.
92
-
93
- URL normalization removes fragments, resolves dot segments and normalizes host/default-port spelling while preserving queries.
94
- Local paths become absolute file URIs; filesystem identity uses `realpath`, with traversal and symlink checks against configured roots.
95
- File queries and remote file authorities, other schemes and URLs containing user/password credentials fail explicitly.
96
-
97
- Full source URIs are internal provenance, not semantic fingerprints or publishable artifact fields.
98
- Callers must use credential-free source URLs and trusted, stable authorized filesystem roots; S04/#174 owns artifact-safe provenance serialization.
99
- Transport errors omit upstream response text and credential-bearing error strings; referencing-node source locations remain available.
100
-
101
- An optional offline map contains canonical URIs and pinned `{bytes, digest}` records.
102
- Every offline resource still passes policy, size and digest checks; a missing record fails without network fallback.
103
- Resource metadata exposes full final URI, digest and decompressed byte length, with no raw bytes in the returned input snapshot.
104
-
105
- ## Loading budgets
106
-
107
- The provisional defaults from ADR-003 are implemented before downstream graph construction.
108
- Positive safe-integer overrides permit explicit caller increases or lower limits; redirects may be zero.
109
-
110
- | Budget | Inclusive default | Outcome beyond limit |
111
- |---|---|---|
112
- | Distinct final resources | 128 | `resource-limit` before new final body |
113
- | Decompressed resource bytes | 8 MiB | `resource-limit` before parse |
114
- | Aggregate decompressed bytes | 64 MiB | `resource-limit` before parse |
115
- | Resolution depth bound | 32 edges | `resource-limit`, including cached subtrees |
116
- | Redirects per fetch | 5 | `resource-limit` before sixth destination |
117
- | Resource I/O | 15,000 ms | `transport`, abort/cancel input |
118
- | Total compilation I/O | 120,000 ms | `transport`, abort/cancel input |
119
- | XML element nesting | 256 | `resource-limit` in syntax adapter |
120
-
121
- HTTP response bodies and files are read incrementally; decompressed chunks count against both byte budgets.
122
- At the resource-count limit, bounded HTTP redirect discovery may still identify a cached final resource; a new final body is cancelled.
123
- Local special files are rejected before opening; nonblocking/no-follow open flags and a descriptor check guard the final file boundary.
124
- The deadline covers fetching, redirects and body reads; parsing is outside the I/O clock.
125
- The total counts serial resource I/O, with monotonic timing and the remaining total budget constraining each fetch.
126
- No rejected load returns a partial schema model.
127
-
128
- ## Evidence and reproduction
129
-
130
- [Ordered syntax tests](../test/unit/ordered-syntax.test.ts) reuse independently qualified S01 compositor and S02 ordered SOAP inputs.
131
- [Syntax fixtures](../test/conformance/fixtures/xsd/syntax/ordered-namespaces.xsd) and their [default-namespace equivalent](../test/conformance/fixtures/xsd/syntax/default-namespaces.xsd) exercise interleaving, annotations, rebinding, lexical QNames and distinct local paths.
132
- These syntax fixtures establish input preservation; later graph/profile tasks own semantic schema assessment.
133
-
134
- ```bash
135
- npx vitest run test/unit/ordered-syntax.test.ts --reporter=verbose
136
- npx tsc -p test/unit/tsconfig.json
137
- npx vitest run test/unit/schema-input.test.ts test/unit/schema-loading-budgets.test.ts test/integration/schema-resource-http.test.ts
138
- npm run ci
139
- ```
140
-
141
- Depth 256 succeeds and depth 257 fails with `resource-limit`; lower configured limits and malformed XML fail explicitly.
142
- Tests also preserve the legacy relative-import fixture and validate source locations/digests and strict byte decoding.
143
- Exact reviewed commits, executed aggregate results and measured limits are recorded in #150's final S03 handoff.
144
-
145
- [Context fixtures](../test/conformance/fixtures/xsd/resolution/chameleon.wsdl) add chameleon/repeated includes, identical-byte bases, relative chains and cycles.
146
- [Context tests](../test/unit/schema-input.test.ts) add offline digests, namespace mismatch, URI policy, query identity, symlink/traversal rejection, WSDL imports and payload hints.
147
- [Live HTTP evidence](../test/integration/schema-resource-http.test.ts) checks final retrieval/base resolution and actual gzip decompression.
148
-
149
- [Budget tests](../test/unit/schema-loading-budgets.test.ts) run 128/129 resources, 8 MiB/8 MiB+1, 64 MiB/64 MiB+1, 32/33 edges, 5/6 redirects and 256/257 syntax depth.
150
- Per-resource 15,000/15,001 ms and total 120,000/120,001 ms use controlled monotonic clocks, with stalled-body cancellation also checked.
151
- They write observed outcomes and elapsed times to ignored `tmp/conformance/schema-loading/measurements.json`.
152
- These boundary measurements do not qualify production network latency, private vendors, Windows filesystem behavior or general supported maxima; #208 owns later qualification.
153
-
154
- ## S04 continuation inputs
155
-
156
- #171 was independently reviewed at `3bb3cd656b1c0d15906d55262a22776c78964984` and merged normally through PR #225 as `11f635072ee0999cd5f904c58cae90b476b064ff`.
157
- #172 starts from that merge and consumes its exact syntax contract.
158
- The final #150 acceptance record pins both reviewed heads, merge revisions, full repository checks and merged-main checks.
159
-
160
- S04 #173 reads `SchemaInput.schemas` and the immutable ordered syntax, deriving global identities from effective namespace, local name and role.
161
- Scoped local identities use containing declarations and source-relative paths; interpretation context remains resolution/provenance data.
162
- #174 serializes artifact-safe provenance separately from semantic fingerprints and implements catalog routing.
163
- S05 resolves declaration/reference semantics from the recorded edges; S03 does not create canonical graph nodes, projections or codecs.