lawspec 0.31.0 → 0.31.3
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.
- package/CHANGELOG.md +116 -1
- package/README.md +86 -4
- package/api.mjs +14 -9
- package/authoring.mjs +899 -0
- package/beam-coverage.mjs +190 -65
- package/beam-doctor.mjs +343 -124
- package/bin/lawspec.mjs +1955 -657
- package/build.json +135 -129
- package/component-packages.mjs +662 -176
- package/component.d.ts +82 -20
- package/component.mjs +317 -94
- package/core.wasm +2 -2
- package/core_jsffi.js +5 -5
- package/doctor.mjs +558 -299
- package/examples-command.mjs +44 -23
- package/failure-database.mjs +60 -17
- package/files.mjs +122 -62
- package/index.d.ts +585 -312
- package/input-files.mjs +90 -25
- package/launcher.mjs +72 -31
- package/learn/adapters.mjs +226 -0
- package/learn/app.mjs +1279 -0
- package/learn/assert.mjs +33 -0
- package/learn/assets.mjs +15 -0
- package/learn/browser-runtime.mjs +58 -0
- package/learn/bundle.mjs +118 -0
- package/learn/compile-worker.mjs +106 -0
- package/learn/compiler.mjs +230 -0
- package/learn/coverage.json +8259 -0
- package/learn/curriculum.json +2955 -0
- package/learn/fantomas-worker.mjs +25 -0
- package/learn/format-worker.mjs +148 -0
- package/learn/fsharp.mjs +83 -0
- package/learn/harness-host.mjs +22 -0
- package/learn/index.html +326 -0
- package/learn/lawspec-core.mjs +223 -0
- package/learn/lawspec-language.mjs +69 -0
- package/learn/node-test.mjs +11 -0
- package/learn/presentation.mjs +73 -0
- package/learn/runner.mjs +72 -0
- package/learn/sandbox-frame.html +34 -0
- package/learn/sandbox.mjs +91 -0
- package/learn/store.mjs +141 -0
- package/learn/story.mjs +42 -0
- package/learn/style-options.json +16 -0
- package/learn/style.css +1023 -0
- package/learn/theme.js +77 -0
- package/learn/typescript.mjs +53 -0
- package/learn/vendor/@fontsource-atkinson-hyperlegible-LICENSE.txt +93 -0
- package/learn/vendor/@fontsource-atkinson-hyperlegible-mono-LICENSE.txt +93 -0
- package/learn/vendor/@fontsource-overpass-LICENSE.txt +93 -0
- package/learn/vendor/assemblies.json +1 -0
- package/learn/vendor/editor-worker.js +30 -0
- package/learn/vendor/editor.css +1 -0
- package/learn/vendor/editor.mjs +931 -0
- package/learn/vendor/esbuild-wasm-LICENSE.txt +21 -0
- package/learn/vendor/esbuild.mjs +2683 -0
- package/learn/vendor/esbuild.wasm +0 -0
- package/learn/vendor/fable-library/Array.js +1347 -0
- package/learn/vendor/fable-library/Async.js +134 -0
- package/learn/vendor/fable-library/AsyncBuilder.js +183 -0
- package/learn/vendor/fable-library/BigInt.js +306 -0
- package/learn/vendor/fable-library/BitConverter.js +138 -0
- package/learn/vendor/fable-library/Boolean.js +22 -0
- package/learn/vendor/fable-library/CHANGELOG.md +242 -0
- package/learn/vendor/fable-library/Char.js +202 -0
- package/learn/vendor/fable-library/Choice.js +184 -0
- package/learn/vendor/fable-library/CollectionUtil.js +182 -0
- package/learn/vendor/fable-library/ConditionalWeakTable.js +21 -0
- package/learn/vendor/fable-library/Date.js +841 -0
- package/learn/vendor/fable-library/DateOffset.js +261 -0
- package/learn/vendor/fable-library/DateOnly.js +124 -0
- package/learn/vendor/fable-library/Decimal.js +238 -0
- package/learn/vendor/fable-library/Double.js +47 -0
- package/learn/vendor/fable-library/Encoding.js +185 -0
- package/learn/vendor/fable-library/Event.js +93 -0
- package/learn/vendor/fable-library/FSharp.Collections.js +45 -0
- package/learn/vendor/fable-library/FSharp.Core.CompilerServices.js +27 -0
- package/learn/vendor/fable-library/FSharp.Core.js +156 -0
- package/learn/vendor/fable-library/Global.js +29 -0
- package/learn/vendor/fable-library/Guid.js +161 -0
- package/learn/vendor/fable-library/Int32.js +135 -0
- package/learn/vendor/fable-library/List.js +1323 -0
- package/learn/vendor/fable-library/Long.js +47 -0
- package/learn/vendor/fable-library/MailboxProcessor.js +94 -0
- package/learn/vendor/fable-library/Map.js +1396 -0
- package/learn/vendor/fable-library/MapUtil.js +130 -0
- package/learn/vendor/fable-library/MutableMap.js +339 -0
- package/learn/vendor/fable-library/MutableSet.js +233 -0
- package/learn/vendor/fable-library/Native.js +14 -0
- package/learn/vendor/fable-library/Numeric.js +75 -0
- package/learn/vendor/fable-library/Observable.js +113 -0
- package/learn/vendor/fable-library/Option.js +104 -0
- package/learn/vendor/fable-library/README.md +3 -0
- package/learn/vendor/fable-library/Random.js +172 -0
- package/learn/vendor/fable-library/Range.js +45 -0
- package/learn/vendor/fable-library/Reflection.js +479 -0
- package/learn/vendor/fable-library/RegExp.js +141 -0
- package/learn/vendor/fable-library/Result.js +165 -0
- package/learn/vendor/fable-library/Seq.js +1417 -0
- package/learn/vendor/fable-library/Seq2.js +111 -0
- package/learn/vendor/fable-library/Set.js +1816 -0
- package/learn/vendor/fable-library/String.js +674 -0
- package/learn/vendor/fable-library/System.Collections.Generic.js +333 -0
- package/learn/vendor/fable-library/System.Text.js +200 -0
- package/learn/vendor/fable-library/System.js +289 -0
- package/learn/vendor/fable-library/TimeOnly.js +122 -0
- package/learn/vendor/fable-library/TimeSpan.js +180 -0
- package/learn/vendor/fable-library/Timer.js +67 -0
- package/learn/vendor/fable-library/Types.js +198 -0
- package/learn/vendor/fable-library/Unicode.13.0.0.js +4 -0
- package/learn/vendor/fable-library/Uri.js +165 -0
- package/learn/vendor/fable-library/Util.js +796 -0
- package/learn/vendor/fable-library/big.d.ts +338 -0
- package/learn/vendor/fable-library/lib/big.js +825 -0
- package/learn/vendor/fable-library/package.json +24 -0
- package/learn/vendor/fable-library/quotation.js +618 -0
- package/learn/vendor/fable.js +430 -0
- package/learn/vendor/fantomas/FSharp.Core.uawo19tl4c.wasm +0 -0
- package/learn/vendor/fantomas/Fantomas.Core.stnanlnpyw.wasm +0 -0
- package/learn/vendor/fantomas/Fantomas.FCS.lqohfu5o9y.wasm +0 -0
- package/learn/vendor/fantomas/LawSpec.Learn.Formatter.poiijdbsl9.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.CSharp.mp8lhr6rez.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.VisualBasic.0e5fchkecn.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.VisualBasic.Core.17wn27qal2.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.Win32.Primitives.9d566sle9e.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.Win32.Registry.52dy96yk8i.wasm +0 -0
- package/learn/vendor/fantomas/System.AppContext.jwujeh069z.wasm +0 -0
- package/learn/vendor/fantomas/System.Buffers.y0isk1x97h.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.Concurrent.x5koi7bzem.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.Immutable.diwg7advch.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.NonGeneric.4089xs440e.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.Specialized.hj81u7zblb.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.nvrdeoknr1.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.Annotations.yatcnfjeuk.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.DataAnnotations.led9l5awu3.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.EventBasedAsync.hpvp6cf4de.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.Primitives.v7cajwpaqo.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.TypeConverter.xk1hnyt762.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.rrnda1lucx.wasm +0 -0
- package/learn/vendor/fantomas/System.Configuration.bn9vghjcq8.wasm +0 -0
- package/learn/vendor/fantomas/System.Console.09ajpiafhz.wasm +0 -0
- package/learn/vendor/fantomas/System.Core.wc649o5mw9.wasm +0 -0
- package/learn/vendor/fantomas/System.Data.Common.s4cowzd9a9.wasm +0 -0
- package/learn/vendor/fantomas/System.Data.DataSetExtensions.5fm360ikxl.wasm +0 -0
- package/learn/vendor/fantomas/System.Data.fsu4j4t4jw.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Contracts.p74re5oxzn.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Debug.622sixg49n.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.DiagnosticSource.2j35bc2g2b.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.FileVersionInfo.7n0wdvltaa.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Process.8iffh49mew.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.StackTrace.1yz88vico8.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.TextWriterTraceListener.ua8iuh2vhj.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Tools.roy5445ugj.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.TraceSource.6qx1ldzz7g.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Tracing.b4799zpaas.wasm +0 -0
- package/learn/vendor/fantomas/System.Drawing.8gcjjqj0pu.wasm +0 -0
- package/learn/vendor/fantomas/System.Drawing.Primitives.y2uveru2yk.wasm +0 -0
- package/learn/vendor/fantomas/System.Dynamic.Runtime.023zrvzh9x.wasm +0 -0
- package/learn/vendor/fantomas/System.Formats.Asn1.znpklkbgqv.wasm +0 -0
- package/learn/vendor/fantomas/System.Formats.Tar.5yybjepfi2.wasm +0 -0
- package/learn/vendor/fantomas/System.Globalization.Calendars.10g6hyjy3k.wasm +0 -0
- package/learn/vendor/fantomas/System.Globalization.Extensions.hrinfrismg.wasm +0 -0
- package/learn/vendor/fantomas/System.Globalization.uvs4rah8fk.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.4j645gw40d.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Compression.2z7vdt6tfb.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Compression.Brotli.fv80xs79j3.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Compression.FileSystem.88jdddz3sw.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Compression.ZipFile.jkn9avr4vo.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.AccessControl.yme0uhbu37.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.DriveInfo.qas7wf73rs.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.Primitives.d1jmhkzu0e.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.Watcher.z570derp0d.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.o6jtz51fup.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.IsolatedStorage.hqyeyb5ipe.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.MemoryMappedFiles.zhamjnusxd.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Pipelines.wrmw5vws31.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Pipes.AccessControl.qcancj8gj2.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Pipes.zhcyguvwkr.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.UnmanagedMemoryStream.o8cpjnlard.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.AsyncEnumerable.hyc0b7okjw.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.Expressions.ldibvm0efj.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.Parallel.2buevezvch.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.Queryable.cvq43g1awj.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.lz6mvi0hm2.wasm +0 -0
- package/learn/vendor/fantomas/System.Memory.3jekerw0ga.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Http.Json.8k237kkwec.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Http.cityx2bvcl.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.HttpListener.s1jreclykx.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Mail.cmlj4c0gto.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.NameResolution.q3gf18q13l.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.NetworkInformation.xaz5tjw7d0.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Ping.a40atim1h0.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Primitives.i88i20r8sr.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Quic.hx06eo5xkj.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Requests.hkjxlfe5f5.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Security.ch34yya69o.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.ServerSentEvents.0u7o0jk3p1.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.ServicePoint.xbhxnytx4l.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Sockets.hzgzlvkc9l.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebClient.84i8nwzbgu.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebHeaderCollection.326nl7s9g3.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebProxy.oq3mgkkqef.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebSockets.2cx1v74vg8.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebSockets.Client.rafzkktw8j.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.w1hpj3bo6r.wasm +0 -0
- package/learn/vendor/fantomas/System.Numerics.Vectors.oyv7biw9ux.wasm +0 -0
- package/learn/vendor/fantomas/System.Numerics.lyu36wqn19.wasm +0 -0
- package/learn/vendor/fantomas/System.ObjectModel.kxu80demuu.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.CoreLib.1vy46s12u6.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.DataContractSerialization.ao8k9iu77a.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.Uri.itn0n2zjd0.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.Xml.19nzpxrx8w.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.Xml.Linq.tw5eq1hjvo.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.DispatchProxy.7lajnj8s8c.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Emit.7liz9zln06.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Emit.ILGeneration.1ut3qgacw8.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Emit.Lightweight.d0gvllb1jj.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Extensions.zr5bhwfczd.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Metadata.ff6np6mz2j.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Primitives.igpmvwv78c.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.TypeExtensions.qouojzlnp9.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.mk3jyxvh13.wasm +0 -0
- package/learn/vendor/fantomas/System.Resources.Reader.41ppfyz2vc.wasm +0 -0
- package/learn/vendor/fantomas/System.Resources.ResourceManager.sfwvfmw1ea.wasm +0 -0
- package/learn/vendor/fantomas/System.Resources.Writer.3uvs9tp38z.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.CompilerServices.Unsafe.puz1xm53oc.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.CompilerServices.VisualC.9qdau315py.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Extensions.i7gntui96b.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Handles.00oxj4o6ov.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.InteropServices.JavaScript.9kq1vofond.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.InteropServices.RuntimeInformation.my7qeqbhfh.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.InteropServices.vqp80tnwc7.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Intrinsics.u0samjybfo.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Loader.n6zxw1b98a.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Numerics.o40sjhz59x.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.Formatters.1esvva4te3.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.Json.4n7u09advh.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.Primitives.xs2bo91wvk.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.Xml.ny21jmziti.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.qcxaur5wqs.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.odq454d6j9.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.AccessControl.8yfnzmqzaq.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Claims.8ogy0860de.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Algorithms.8zijp1svfw.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Cng.yxagtt77no.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Csp.uhfbvvau84.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Encoding.2ywrusvy8q.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.OpenSsl.oa268u7i92.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Primitives.5uhvqe8puk.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.X509Certificates.6i7pxilopt.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.d0quqk1iyr.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Principal.Windows.gpqua4rz29.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Principal.i20kfklf3g.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.SecureString.x2y8tzci3c.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.e83vvh6sl2.wasm +0 -0
- package/learn/vendor/fantomas/System.ServiceModel.Web.poglliv2no.wasm +0 -0
- package/learn/vendor/fantomas/System.ServiceProcess.yro5uj2opo.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Encoding.CodePages.2wchx40i7z.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Encoding.Extensions.8utaw61kn5.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Encoding.cxdyfepnpj.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Encodings.Web.37ehbi7cye.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Json.ixiaa8hd3h.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.RegularExpressions.2fhfmkk6vf.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.6pry74a050.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.AccessControl.76zfdfy8go.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Channels.gpxnr01lmp.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Overlapped.aqpl8tzdyc.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Tasks.Dataflow.ytwttt7fzh.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Tasks.Extensions.0deavcb00v.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Tasks.Parallel.tjwtxugso0.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Tasks.fu4qd5h3qy.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Thread.klaua2by9m.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.ThreadPool.mkzm212njz.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Timer.yp49llu5h2.wasm +0 -0
- package/learn/vendor/fantomas/System.Transactions.Local.vz6cgeh4w7.wasm +0 -0
- package/learn/vendor/fantomas/System.Transactions.ipwm3rsy66.wasm +0 -0
- package/learn/vendor/fantomas/System.ValueTuple.7ol6ljuhx8.wasm +0 -0
- package/learn/vendor/fantomas/System.Web.HttpUtility.itlvncjd96.wasm +0 -0
- package/learn/vendor/fantomas/System.Web.np8uzzakvl.wasm +0 -0
- package/learn/vendor/fantomas/System.Windows.18nzio44t3.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.45jprtg1pa.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.Linq.v9v8udncm1.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.ReaderWriter.a9mr08uzci.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.Serialization.03juoguwgc.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XDocument.c9dhjnzqjb.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XPath.XDocument.138b12i1pm.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XPath.pvxm9341ce.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XmlDocument.450wsyxvl0.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XmlSerializer.y3t2n0tce7.wasm +0 -0
- package/learn/vendor/fantomas/System.gjriafnqmz.wasm +0 -0
- package/learn/vendor/fantomas/WindowsBase.8zsce9qxfb.wasm +0 -0
- package/learn/vendor/fantomas/cs/FSharp.Core.resources.9ehmavdel7.wasm +0 -0
- package/learn/vendor/fantomas/de/FSharp.Core.resources.2ofmxloa01.wasm +0 -0
- package/learn/vendor/fantomas/dotnet.js +1233 -0
- package/learn/vendor/fantomas/dotnet.native.b6l13xorvf.js +16 -0
- package/learn/vendor/fantomas/dotnet.native.rw4kynp763.wasm +0 -0
- package/learn/vendor/fantomas/dotnet.runtime.v06hirbjsv.js +4 -0
- package/learn/vendor/fantomas/es/FSharp.Core.resources.hkr5ggb4tr.wasm +0 -0
- package/learn/vendor/fantomas/fr/FSharp.Core.resources.43soen28ow.wasm +0 -0
- package/learn/vendor/fantomas/icudt_CJK.tjcz0u77k5.dat +0 -0
- package/learn/vendor/fantomas/icudt_EFIGS.tptq2av103.dat +0 -0
- package/learn/vendor/fantomas/icudt_no_CJK.lfu7j35m59.dat +0 -0
- package/learn/vendor/fantomas/it/FSharp.Core.resources.m60n5ls7oq.wasm +0 -0
- package/learn/vendor/fantomas/ja/FSharp.Core.resources.o6oof69v14.wasm +0 -0
- package/learn/vendor/fantomas/ko/FSharp.Core.resources.q6l4snlu9o.wasm +0 -0
- package/learn/vendor/fantomas/mscorlib.8ptuc08eli.wasm +0 -0
- package/learn/vendor/fantomas/netstandard.eymp85mooh.wasm +0 -0
- package/learn/vendor/fantomas/pl/FSharp.Core.resources.8bni0w6j8b.wasm +0 -0
- package/learn/vendor/fantomas/pt-BR/FSharp.Core.resources.k849vqm41u.wasm +0 -0
- package/learn/vendor/fantomas/ru/FSharp.Core.resources.jz9rhhtsla.wasm +0 -0
- package/learn/vendor/fantomas/tr/FSharp.Core.resources.wn6vbvjm1u.wasm +0 -0
- package/learn/vendor/fantomas/zh-Hans/FSharp.Core.resources.z7zzbso094.wasm +0 -0
- package/learn/vendor/fantomas/zh-Hant/FSharp.Core.resources.iammfsi7ls.wasm +0 -0
- package/learn/vendor/fast-check-LICENSE.txt +21 -0
- package/learn/vendor/fast-check.mjs +37 -0
- package/learn/vendor/fonts/atkinson-hyperlegible-latin-400-normal.woff2 +0 -0
- package/learn/vendor/fonts/atkinson-hyperlegible-latin-700-normal.woff2 +0 -0
- package/learn/vendor/fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2 +0 -0
- package/learn/vendor/fonts/overpass-latin-600-normal.woff2 +0 -0
- package/learn/vendor/fonts/overpass-latin-700-normal.woff2 +0 -0
- package/learn/vendor/formatter-licenses/DotNet-LICENSE.txt +23 -0
- package/learn/vendor/formatter-licenses/DotNet-THIRD-PARTY-NOTICES.txt +1418 -0
- package/learn/vendor/formatter-licenses/FSharp-LICENSE.txt +23 -0
- package/learn/vendor/formatter-licenses/Fantomas-LICENSE.txt +202 -0
- package/learn/vendor/formatter-licenses/README.md +12 -0
- package/learn/vendor/manifest.json +1354 -0
- package/learn/vendor/metadata/Browser.Blob.dll +0 -0
- package/learn/vendor/metadata/Browser.Dom.dll +0 -0
- package/learn/vendor/metadata/Browser.Event.dll +0 -0
- package/learn/vendor/metadata/Browser.Gamepad.dll +0 -0
- package/learn/vendor/metadata/Browser.WebGL.dll +0 -0
- package/learn/vendor/metadata/Browser.WebStorage.dll +0 -0
- package/learn/vendor/metadata/FSharp.Core.dll +0 -0
- package/learn/vendor/metadata/Fable.Core.dll +0 -0
- package/learn/vendor/metadata/Fable.Repl.Lib.dll +0 -0
- package/learn/vendor/metadata/System.Collections.Concurrent.dll +0 -0
- package/learn/vendor/metadata/System.Collections.dll +0 -0
- package/learn/vendor/metadata/System.ComponentModel.Primitives.dll +0 -0
- package/learn/vendor/metadata/System.ComponentModel.TypeConverter.dll +0 -0
- package/learn/vendor/metadata/System.ComponentModel.dll +0 -0
- package/learn/vendor/metadata/System.Console.dll +0 -0
- package/learn/vendor/metadata/System.Core.dll +0 -0
- package/learn/vendor/metadata/System.Diagnostics.Debug.dll +0 -0
- package/learn/vendor/metadata/System.Diagnostics.Tools.dll +0 -0
- package/learn/vendor/metadata/System.Diagnostics.Tracing.dll +0 -0
- package/learn/vendor/metadata/System.Globalization.dll +0 -0
- package/learn/vendor/metadata/System.IO.dll +0 -0
- package/learn/vendor/metadata/System.Net.Requests.dll +0 -0
- package/learn/vendor/metadata/System.Net.WebClient.dll +0 -0
- package/learn/vendor/metadata/System.Numerics.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.Extensions.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.Metadata.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.Primitives.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.TypeExtensions.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.dll +0 -0
- package/learn/vendor/metadata/System.Runtime.Extensions.dll +0 -0
- package/learn/vendor/metadata/System.Runtime.InteropServices.dll +0 -0
- package/learn/vendor/metadata/System.Runtime.Numerics.dll +0 -0
- package/learn/vendor/metadata/System.Runtime.dll +0 -0
- package/learn/vendor/metadata/System.Text.Encoding.Extensions.dll +0 -0
- package/learn/vendor/metadata/System.Text.Encoding.dll +0 -0
- package/learn/vendor/metadata/System.Text.RegularExpressions.dll +0 -0
- package/learn/vendor/metadata/System.Threading.Tasks.dll +0 -0
- package/learn/vendor/metadata/System.Threading.Thread.dll +0 -0
- package/learn/vendor/metadata/System.Threading.dll +0 -0
- package/learn/vendor/metadata/System.ValueTuple.dll +0 -0
- package/learn/vendor/metadata/System.dll +0 -0
- package/learn/vendor/metadata/mscorlib.dll +0 -0
- package/learn/vendor/metadata/netstandard.dll +0 -0
- package/learn/vendor/monaco-editor-LICENSE.txt +21 -0
- package/learn/vendor/prettier/babel.mjs +16 -0
- package/learn/vendor/prettier/brace-style.mjs +376 -0
- package/learn/vendor/prettier/estree.mjs +44 -0
- package/learn/vendor/prettier/standalone.mjs +29 -0
- package/learn/vendor/prettier/typescript.mjs +22 -0
- package/learn/vendor/prettier-LICENSE.txt +7 -0
- package/learn/vendor/prettier-plugin-brace-style-LICENSE.txt +21 -0
- package/learn/vendor/typescript-LICENSE.txt +55 -0
- package/learn/vendor/typescript-libs.json +1 -0
- package/learn/vendor/typescript.mjs +451 -0
- package/learn/vendor/zod-LICENSE.txt +21 -0
- package/learn/web-format.mjs +8 -0
- package/learn.mjs +126 -0
- package/lsp.mjs +444 -133
- package/mcp.mjs +250 -0
- package/native-evidence.mjs +668 -182
- package/native-examples.mjs +56 -19
- package/native-host.mjs +136 -42
- package/native-parsers/clojure.LICENSE +121 -0
- package/native-parsers/clojure.wasm +0 -0
- package/native-parsers/csharp.LICENSE +21 -0
- package/native-parsers/csharp.wasm +0 -0
- package/native-parsers/elixir.LICENSE +176 -0
- package/native-parsers/elixir.wasm +0 -0
- package/native-parsers/erlang.LICENSE +201 -0
- package/native-parsers/erlang.wasm +0 -0
- package/native-parsers/fsharp.LICENSE +21 -0
- package/native-parsers/fsharp.wasm +0 -0
- package/native-parsers/gleam.LICENSE +202 -0
- package/native-parsers/gleam.wasm +0 -0
- package/native-parsers/go.LICENSE +21 -0
- package/native-parsers/go.wasm +0 -0
- package/native-parsers/groovy.LICENSE +21 -0
- package/native-parsers/groovy.wasm +0 -0
- package/native-parsers/haskell.LICENSE +21 -0
- package/native-parsers/haskell.wasm +0 -0
- package/native-parsers/java.LICENSE +21 -0
- package/native-parsers/java.wasm +0 -0
- package/native-parsers/javascript.LICENSE +21 -0
- package/native-parsers/javascript.wasm +0 -0
- package/native-parsers/kotlin.LICENSE +9 -0
- package/native-parsers/kotlin.wasm +0 -0
- package/native-parsers/lock.json +114 -0
- package/native-parsers/prolog.LICENSE +21 -0
- package/native-parsers/prolog.wasm +0 -0
- package/native-parsers/python.LICENSE +21 -0
- package/native-parsers/python.wasm +0 -0
- package/native-parsers/rust.LICENSE +21 -0
- package/native-parsers/rust.wasm +0 -0
- package/native-parsers/scala.LICENSE +21 -0
- package/native-parsers/scala.wasm +0 -0
- package/native-parsers/swift.LICENSE +21 -0
- package/native-parsers/swift.wasm +0 -0
- package/native-parsers/typescript.LICENSE +21 -0
- package/native-parsers/typescript.wasm +0 -0
- package/node-events-reporter.mjs +41 -17
- package/package.json +5 -3
- package/project.mjs +338 -0
- package/proof.d.ts +93 -19
- package/proof.mjs +1538 -447
- package/read-only-hpack.mjs +6 -5
- package/scala-build-state.mjs +131 -41
- package/scala-coverage.mjs +57 -34
- package/scalars.mjs +23 -8
- package/templates.mjs +566 -617
- package/test-command.mjs +1671 -521
package/native-evidence.mjs
CHANGED
|
@@ -5,235 +5,721 @@ import path from 'node:path';
|
|
|
5
5
|
import {doctor} from './doctor.mjs';
|
|
6
6
|
import {planWrites} from './files.mjs';
|
|
7
7
|
import {projectKey} from './failure-database.mjs';
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
lawKeys,
|
|
10
|
+
presentationDigest,
|
|
11
|
+
environmentDigest,
|
|
12
|
+
recordedDigest,
|
|
13
|
+
projectDigest,
|
|
14
|
+
invocations,
|
|
15
|
+
} from './test-command.mjs';
|
|
9
16
|
|
|
10
17
|
// Native execution observations are scoped to actual completed test slots.
|
|
11
18
|
// They never establish a universal model proof or a witness-search completeness claim.
|
|
12
|
-
export const obligationTargets = entry =>
|
|
19
|
+
export const obligationTargets = entry =>
|
|
20
|
+
entry.obligations ?? [{declaration: entry.law, stage: 'law'}];
|
|
13
21
|
|
|
14
|
-
export function nativeSeed(value)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
export function nativeSeed(value)
|
|
23
|
+
{
|
|
24
|
+
const text = String(value),
|
|
25
|
+
number = Number(text);
|
|
26
|
+
if (!/^[0-9]+$/.test(text))
|
|
27
|
+
throw new Error('A native seed must be a whole number');
|
|
28
|
+
if (typeof value === 'number' && !Number.isSafeInteger(value))
|
|
29
|
+
throw new Error(
|
|
30
|
+
'The recorded numeric seed lost precision; rerun with an explicit exact seed',
|
|
31
|
+
);
|
|
32
|
+
return Number.isSafeInteger(number) ? number : text;
|
|
20
33
|
}
|
|
21
34
|
|
|
22
|
-
export function recordNativeAttempts(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
export function recordNativeAttempts(
|
|
36
|
+
run,
|
|
37
|
+
tests,
|
|
38
|
+
{
|
|
39
|
+
keys,
|
|
40
|
+
seed,
|
|
41
|
+
ok,
|
|
42
|
+
profile,
|
|
43
|
+
output,
|
|
44
|
+
allEntries = run.laws,
|
|
45
|
+
at = new Date().toISOString(),
|
|
46
|
+
},
|
|
47
|
+
)
|
|
48
|
+
{
|
|
49
|
+
return Object.fromEntries(
|
|
50
|
+
(run.laws ?? []).map(entry =>
|
|
51
|
+
{
|
|
52
|
+
const matched = tests.filter(test =>
|
|
53
|
+
(run.matches?.(test) ?? []).includes(entry),
|
|
54
|
+
);
|
|
55
|
+
const model = (entry.obligations?.length ?? 0) > 0;
|
|
56
|
+
const complete =
|
|
57
|
+
matched.length > 0 &&
|
|
58
|
+
matched.every(test => test.status === 'passed') &&
|
|
59
|
+
(ok || model);
|
|
60
|
+
const outcome = matched.some(test => test.status === 'failed')
|
|
61
|
+
? 'failed'
|
|
62
|
+
: matched.some(test => test.status === 'incomplete')
|
|
63
|
+
? 'incomplete'
|
|
64
|
+
: entry.skip
|
|
65
|
+
? 'skipped'
|
|
66
|
+
: complete
|
|
67
|
+
? entry.knownDiscrepancy
|
|
68
|
+
? 'known-discrepancy'
|
|
69
|
+
: 'passed'
|
|
70
|
+
: matched.length &&
|
|
71
|
+
matched.every(test => test.status === 'skipped')
|
|
72
|
+
? 'skipped'
|
|
73
|
+
: 'incomplete';
|
|
74
|
+
return [
|
|
75
|
+
entry.law,
|
|
76
|
+
{
|
|
77
|
+
key: keys.get(entry.law),
|
|
78
|
+
planKey: entry.key,
|
|
79
|
+
seed: nativeSeed(seed),
|
|
80
|
+
at,
|
|
81
|
+
outcome,
|
|
82
|
+
profile,
|
|
83
|
+
coverage: entry.coverage ?? {
|
|
84
|
+
kind: 'sampled',
|
|
85
|
+
scopedQuantifiers: true,
|
|
86
|
+
},
|
|
87
|
+
check: {
|
|
88
|
+
id: entry.law,
|
|
89
|
+
unit: entry.unit,
|
|
90
|
+
file: entry.file,
|
|
91
|
+
name: entry.name,
|
|
92
|
+
label: entry.label,
|
|
93
|
+
...(entry.scope ? {scope: entry.scope} : {}),
|
|
94
|
+
obligations: obligationTargets(entry),
|
|
95
|
+
nativeGroup: (allEntries ?? [])
|
|
96
|
+
.filter(
|
|
97
|
+
other =>
|
|
98
|
+
other.file === entry.file &&
|
|
99
|
+
other.name === entry.name &&
|
|
100
|
+
other.scope === entry.scope,
|
|
101
|
+
)
|
|
102
|
+
.map(other => other.law),
|
|
103
|
+
},
|
|
104
|
+
// A passed combined method covers all its logical model aliases. A failed
|
|
105
|
+
// combined method completes none successfully, even if another method passed.
|
|
106
|
+
tests: matched,
|
|
107
|
+
invocation: {
|
|
108
|
+
ok,
|
|
109
|
+
command: run.command,
|
|
110
|
+
...(!ok &&
|
|
111
|
+
['failed', 'incomplete'].includes(outcome) &&
|
|
112
|
+
output &&
|
|
113
|
+
!matched.some(
|
|
114
|
+
test =>
|
|
115
|
+
test.status === 'failed' &&
|
|
116
|
+
(test.failure || test.reason || test.message),
|
|
117
|
+
)
|
|
118
|
+
? {output}
|
|
119
|
+
: {}),
|
|
120
|
+
},
|
|
121
|
+
verification: 'native-execution',
|
|
122
|
+
searchCompleteness: 'not-established',
|
|
123
|
+
},
|
|
124
|
+
];
|
|
125
|
+
}),
|
|
126
|
+
);
|
|
43
127
|
}
|
|
44
128
|
|
|
45
129
|
// A law an attestation touches is keyed by how its dependencies were wired:
|
|
46
130
|
// endpoint, kind, and a stand-in's product, version and conformance. What the
|
|
47
131
|
// run observed (reached, history digests, completion) and the identities
|
|
48
132
|
// reported beside it are not inputs, so they change no key.
|
|
49
|
-
export function attestedKeys(result)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
133
|
+
export function attestedKeys(result)
|
|
134
|
+
{
|
|
135
|
+
const wiring = d => [
|
|
136
|
+
d.dependency,
|
|
137
|
+
d.endpoint,
|
|
138
|
+
d.kind,
|
|
139
|
+
...(d.implementation
|
|
140
|
+
? [
|
|
141
|
+
[
|
|
142
|
+
d.implementation.kind,
|
|
143
|
+
d.implementation.product,
|
|
144
|
+
d.implementation.version,
|
|
145
|
+
d.implementation.commit ?? null,
|
|
146
|
+
d.implementation.digest ?? null,
|
|
147
|
+
],
|
|
148
|
+
]
|
|
149
|
+
: []),
|
|
150
|
+
...(d.standIn
|
|
151
|
+
? [d.standIn.identity, d.standIn.version, d.standIn.conformance]
|
|
152
|
+
: []),
|
|
153
|
+
];
|
|
154
|
+
return new Map(
|
|
155
|
+
(result.evidence ?? [])
|
|
156
|
+
.filter(item => item.against || item.plannedAgainst)
|
|
157
|
+
.map(item => [
|
|
158
|
+
item.declaration,
|
|
159
|
+
JSON.stringify([
|
|
160
|
+
item.environment ?? item.plannedEnvironment,
|
|
161
|
+
(item.against ?? item.plannedAgainst).map(wiring),
|
|
162
|
+
]),
|
|
163
|
+
]),
|
|
164
|
+
);
|
|
57
165
|
}
|
|
58
166
|
|
|
59
|
-
const subject = (entry,item) =>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
167
|
+
const subject = (entry, item) =>
|
|
168
|
+
obligationTargets(entry).some(
|
|
169
|
+
target =>
|
|
170
|
+
target.declaration === item.declaration && target.stage === item.stage,
|
|
171
|
+
);
|
|
172
|
+
const runtimeStages = new Set([
|
|
173
|
+
'law',
|
|
174
|
+
'model',
|
|
175
|
+
'linearizable',
|
|
176
|
+
'sequentially consistent',
|
|
177
|
+
'causally consistent',
|
|
178
|
+
'eventually consistent',
|
|
179
|
+
'restart',
|
|
180
|
+
'scenario',
|
|
181
|
+
'supervision',
|
|
182
|
+
]);
|
|
63
183
|
|
|
64
184
|
// Display archived observations in the current vocabulary; retain their raw
|
|
65
185
|
// attempts and use those original values for freshness and completion checks.
|
|
66
|
-
const observationOutcome=outcome=>
|
|
186
|
+
const observationOutcome = outcome =>
|
|
187
|
+
outcome === 'known-failing' ? 'known-discrepancy' : outcome;
|
|
67
188
|
|
|
68
189
|
// Only observations with matching current compiler/configuration/source/native
|
|
69
190
|
// inputs are eligible for completed evidence. A stored timestamp alone is not.
|
|
70
|
-
export async function readNativeObservations({
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
191
|
+
export async function readNativeObservations({
|
|
192
|
+
compiler,
|
|
193
|
+
input,
|
|
194
|
+
selected,
|
|
195
|
+
roots,
|
|
196
|
+
configRoot,
|
|
197
|
+
config = {},
|
|
198
|
+
build,
|
|
199
|
+
evidence,
|
|
200
|
+
attestation,
|
|
201
|
+
})
|
|
202
|
+
{
|
|
203
|
+
const records = await Promise.all(
|
|
204
|
+
selected.map(async (target, index) =>
|
|
205
|
+
{
|
|
206
|
+
const root = roots[index],
|
|
207
|
+
file = path.join(
|
|
208
|
+
configRoot,
|
|
209
|
+
'.lawspec/results',
|
|
210
|
+
`${target.language}-${projectKey(root)}.json`,
|
|
211
|
+
);
|
|
212
|
+
const record = JSON.parse(
|
|
213
|
+
await readFile(file, 'utf8').catch(error =>
|
|
214
|
+
{
|
|
215
|
+
if (error.code === 'ENOENT') return '{}';
|
|
216
|
+
throw error;
|
|
217
|
+
}),
|
|
218
|
+
);
|
|
219
|
+
return {
|
|
220
|
+
target,
|
|
221
|
+
root,
|
|
222
|
+
attempts: record.attempts ?? {},
|
|
223
|
+
runs: record.laws ?? {},
|
|
224
|
+
presentation: record.presentation,
|
|
225
|
+
attestations: record.attestations ?? {},
|
|
226
|
+
};
|
|
227
|
+
}),
|
|
228
|
+
);
|
|
229
|
+
if (!records.some(record => Object.keys(record.attempts).length)) return [];
|
|
230
|
+
const observations = [];
|
|
231
|
+
for (const {
|
|
232
|
+
target,
|
|
233
|
+
root,
|
|
234
|
+
attempts,
|
|
235
|
+
runs,
|
|
236
|
+
presentation,
|
|
237
|
+
attestations,
|
|
238
|
+
} of records)
|
|
239
|
+
{
|
|
240
|
+
const plans = new Map(),
|
|
241
|
+
contexts = new Map();
|
|
82
242
|
// An attempt is keyed by the wiring of the attestation it ran under: the
|
|
83
243
|
// one named now, or else the one lawspec test stored for its run.
|
|
84
|
-
const wiredBy=attempt=>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
244
|
+
const wiredBy = attempt =>
|
|
245
|
+
attestation ??
|
|
246
|
+
(attempt?.environment ? attestations[attempt.environment] : undefined);
|
|
247
|
+
const slot = (minify, wired) => `${minify}\0${wired?.run?.id ?? ''}`;
|
|
248
|
+
async function plan(minify, wired = attestation)
|
|
249
|
+
{
|
|
250
|
+
const key = slot(minify, wired);
|
|
251
|
+
if (!plans.has(key))
|
|
252
|
+
plans.set(
|
|
253
|
+
key,
|
|
254
|
+
await compiler.planGeneration({
|
|
255
|
+
...input,
|
|
256
|
+
target: target.language,
|
|
257
|
+
sourceDir: target.sourceDir,
|
|
258
|
+
testDir: target.testDir,
|
|
259
|
+
nativeBindings: target.nativeBindings,
|
|
260
|
+
minify,
|
|
261
|
+
...(wired ? {attestation: wired} : {}),
|
|
262
|
+
}),
|
|
263
|
+
);
|
|
91
264
|
return plans.get(key);
|
|
92
265
|
}
|
|
93
|
-
const modes=[
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
266
|
+
const modes = [
|
|
267
|
+
...new Set(
|
|
268
|
+
Object.values(attempts)
|
|
269
|
+
.map(attempt => attempt.profile?.minify)
|
|
270
|
+
.filter(mode => typeof mode === 'boolean'),
|
|
271
|
+
),
|
|
272
|
+
];
|
|
273
|
+
if (!modes.length) modes.push(false);
|
|
274
|
+
const base = await plan(modes[0]);
|
|
275
|
+
if (base.diagnostics.length)
|
|
276
|
+
{
|
|
277
|
+
observations.push({
|
|
278
|
+
target: target.language,
|
|
279
|
+
root,
|
|
280
|
+
freshness: 'unavailable',
|
|
281
|
+
outcome: 'incomplete',
|
|
282
|
+
obligations: evidence
|
|
283
|
+
.filter(item => runtimeStages.has(item.stage))
|
|
284
|
+
.map(({declaration, stage}) => ({declaration, stage})),
|
|
285
|
+
reason:
|
|
286
|
+
'Native generation is unavailable: ' +
|
|
287
|
+
base.diagnostics.map(diagnostic => diagnostic.message).join('; '),
|
|
288
|
+
});
|
|
101
289
|
continue;
|
|
102
290
|
}
|
|
103
|
-
const expected=new Map(base.tests.map(entry=>[entry.law,entry]));
|
|
104
|
-
async function context(minify,wired)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
291
|
+
const expected = new Map(base.tests.map(entry => [entry.law, entry]));
|
|
292
|
+
async function context(minify, wired)
|
|
293
|
+
{
|
|
294
|
+
const key = slot(minify, wired);
|
|
295
|
+
if (contexts.has(key)) return contexts.get(key);
|
|
296
|
+
const generated = await plan(minify, wired);
|
|
108
297
|
let result;
|
|
109
|
-
if(generated.diagnostics.length)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
298
|
+
if (generated.diagnostics.length)
|
|
299
|
+
result = {
|
|
300
|
+
reason: 'Native generation is unavailable for the recorded layout',
|
|
301
|
+
};
|
|
302
|
+
else
|
|
303
|
+
{
|
|
304
|
+
const pending = await planWrites(root, generated.files);
|
|
305
|
+
if (pending.changes.length)
|
|
306
|
+
result = {
|
|
307
|
+
stale: true,
|
|
308
|
+
reason: 'Generated files differ from the recorded/current plan',
|
|
309
|
+
};
|
|
310
|
+
else
|
|
311
|
+
{
|
|
312
|
+
const report = await doctor(target, root, generated.files);
|
|
313
|
+
if (!report.ok)
|
|
314
|
+
result = {
|
|
315
|
+
reason:
|
|
316
|
+
'The current native environment could not be checked: ' +
|
|
317
|
+
report.message,
|
|
318
|
+
};
|
|
319
|
+
else
|
|
320
|
+
{
|
|
321
|
+
const environment = await environmentDigest(
|
|
322
|
+
root,
|
|
323
|
+
report,
|
|
324
|
+
target.language,
|
|
325
|
+
);
|
|
326
|
+
if (
|
|
327
|
+
presentation !== presentationDigest(generated.files, environment)
|
|
328
|
+
)
|
|
329
|
+
{
|
|
330
|
+
result = {
|
|
331
|
+
reason:
|
|
332
|
+
'Current generated presentation has not passed native validation; run lawspec test',
|
|
333
|
+
};
|
|
334
|
+
contexts.set(key, result);
|
|
335
|
+
return result;
|
|
121
336
|
}
|
|
122
|
-
const owned=new Set(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
337
|
+
const owned = new Set(
|
|
338
|
+
generated.files
|
|
339
|
+
.filter(file => file.ownership === 'generated')
|
|
340
|
+
.map(file => file.path),
|
|
341
|
+
);
|
|
342
|
+
const keys = lawKeys({
|
|
343
|
+
build,
|
|
344
|
+
target,
|
|
345
|
+
machineBits: input.machineBits,
|
|
346
|
+
minify,
|
|
347
|
+
tests: generated.tests,
|
|
348
|
+
files: generated.files,
|
|
349
|
+
environment,
|
|
350
|
+
recorded: await recordedDigest(path.join(configRoot, 'recorded')),
|
|
351
|
+
project: await projectDigest(root, owned, target.language, {
|
|
352
|
+
inputRoot: configRoot,
|
|
353
|
+
inputs: config.inputs ?? [],
|
|
354
|
+
}),
|
|
355
|
+
attested: attestedKeys(generated),
|
|
356
|
+
});
|
|
357
|
+
result = {generated, keys};
|
|
127
358
|
}
|
|
128
359
|
}
|
|
129
360
|
}
|
|
130
|
-
contexts.set(key,result);
|
|
361
|
+
contexts.set(key, result);
|
|
362
|
+
return result;
|
|
131
363
|
}
|
|
132
|
-
for(const [id,baseline]of expected)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
364
|
+
for (const [id, baseline] of expected)
|
|
365
|
+
{
|
|
366
|
+
let attempt = attempts[id],
|
|
367
|
+
reuse;
|
|
368
|
+
if (!attempt)
|
|
369
|
+
for (const original of Object.values(attempts))
|
|
370
|
+
{
|
|
371
|
+
// Only a single ordinary-law observation can be re-associated here.
|
|
372
|
+
// Combined model methods keep their exact group identities.
|
|
373
|
+
if (
|
|
374
|
+
original.outcome !== 'passed' ||
|
|
375
|
+
original.check?.nativeGroup?.length !== 1 ||
|
|
376
|
+
!isDeepStrictEqual(original.check.obligations, [
|
|
377
|
+
{declaration: original.check.id, stage: 'law'},
|
|
378
|
+
]) ||
|
|
379
|
+
!isDeepStrictEqual(obligationTargets(baseline), [
|
|
380
|
+
{declaration: id, stage: 'law'},
|
|
381
|
+
])
|
|
382
|
+
)
|
|
383
|
+
continue;
|
|
384
|
+
let candidate = await context(
|
|
385
|
+
original.profile?.minify ?? false,
|
|
386
|
+
wiredBy(original),
|
|
387
|
+
);
|
|
388
|
+
if (candidate.reason && candidate.stale)
|
|
389
|
+
candidate = await context(
|
|
390
|
+
!original.profile?.minify,
|
|
391
|
+
wiredBy(original),
|
|
392
|
+
);
|
|
393
|
+
if (
|
|
394
|
+
!candidate.reason &&
|
|
395
|
+
candidate.keys.get(id) === original.key &&
|
|
396
|
+
baseline.key === original.planKey
|
|
397
|
+
)
|
|
398
|
+
{
|
|
399
|
+
attempt = original;
|
|
400
|
+
reuse = {
|
|
401
|
+
check: original.check.id,
|
|
402
|
+
key: original.key,
|
|
403
|
+
at: original.at,
|
|
404
|
+
};
|
|
405
|
+
break;
|
|
406
|
+
}
|
|
144
407
|
}
|
|
408
|
+
const row = {
|
|
409
|
+
target: target.language,
|
|
410
|
+
root,
|
|
411
|
+
check: {id, obligations: obligationTargets(baseline)},
|
|
412
|
+
outcome: observationOutcome(attempt?.outcome ?? 'not-run'),
|
|
413
|
+
coverage: baseline.coverage,
|
|
414
|
+
attempt,
|
|
415
|
+
};
|
|
416
|
+
if (!attempt)
|
|
417
|
+
{
|
|
418
|
+
observations.push({
|
|
419
|
+
...row,
|
|
420
|
+
freshness: 'not-run',
|
|
421
|
+
reason: 'No completed native observation was recorded',
|
|
422
|
+
});
|
|
423
|
+
continue;
|
|
145
424
|
}
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
425
|
+
const profile = attempt.profile ?? {};
|
|
426
|
+
if (
|
|
427
|
+
profile.target !== target.language ||
|
|
428
|
+
profile.root !== root ||
|
|
429
|
+
profile.machineBits !== input.machineBits ||
|
|
430
|
+
profile.build !== build ||
|
|
431
|
+
typeof profile.minify !== 'boolean'
|
|
432
|
+
)
|
|
433
|
+
{
|
|
434
|
+
observations.push({
|
|
435
|
+
...row,
|
|
436
|
+
freshness: 'stale',
|
|
437
|
+
reason: 'Compiler, target or machine profile differs',
|
|
438
|
+
});
|
|
439
|
+
continue;
|
|
153
440
|
}
|
|
154
|
-
let current=await context(profile.minify,wiredBy(attempt));
|
|
441
|
+
let current = await context(profile.minify, wiredBy(attempt));
|
|
155
442
|
// Layout belongs to the artifact, not to the meaning of its old run.
|
|
156
443
|
// Accept the other canonical layout only when it exactly matches disk.
|
|
157
|
-
if(current.reason&¤t.stale)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
444
|
+
if (current.reason && current.stale)
|
|
445
|
+
current = await context(!profile.minify, wiredBy(attempt));
|
|
446
|
+
if (current.reason)
|
|
447
|
+
{
|
|
448
|
+
observations.push({
|
|
449
|
+
...row,
|
|
450
|
+
freshness: current.stale ? 'stale' : 'unavailable',
|
|
451
|
+
reason: current.reason,
|
|
452
|
+
});
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
const entry = current.generated.tests.find(entry => entry.law === id);
|
|
456
|
+
if (
|
|
457
|
+
!entry ||
|
|
458
|
+
attempt.key !== current.keys.get(id) ||
|
|
459
|
+
attempt.planKey !== entry.key ||
|
|
460
|
+
(!reuse &&
|
|
461
|
+
!isDeepStrictEqual(
|
|
462
|
+
attempt.check?.obligations,
|
|
463
|
+
obligationTargets(entry),
|
|
464
|
+
)) ||
|
|
465
|
+
!isDeepStrictEqual(attempt.coverage, entry.coverage)
|
|
466
|
+
)
|
|
467
|
+
{
|
|
468
|
+
observations.push({
|
|
469
|
+
...row,
|
|
470
|
+
freshness: 'stale',
|
|
471
|
+
reason:
|
|
472
|
+
'Specification, selection, bindings, native source or toolchain inputs differ',
|
|
473
|
+
});
|
|
474
|
+
continue;
|
|
164
475
|
}
|
|
165
|
-
const observedEntry=reuse
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
476
|
+
const observedEntry = reuse
|
|
477
|
+
? {
|
|
478
|
+
...entry,
|
|
479
|
+
...attempt.check,
|
|
480
|
+
law: attempt.check.id,
|
|
481
|
+
key: attempt.planKey,
|
|
482
|
+
}
|
|
483
|
+
: entry;
|
|
484
|
+
const invocation = invocations(target, [observedEntry], {root}).find(
|
|
485
|
+
run => run.laws?.includes(observedEntry),
|
|
486
|
+
);
|
|
487
|
+
const observedKeys = reuse
|
|
488
|
+
? new Map([[observedEntry.law, attempt.key]])
|
|
489
|
+
: current.keys;
|
|
490
|
+
const validSeed =
|
|
491
|
+
(typeof attempt.seed === 'number' &&
|
|
492
|
+
Number.isSafeInteger(attempt.seed) &&
|
|
493
|
+
attempt.seed >= 0) ||
|
|
494
|
+
(typeof attempt.seed === 'string' && /^[0-9]+$/.test(attempt.seed));
|
|
495
|
+
const recomputed =
|
|
496
|
+
validSeed &&
|
|
497
|
+
Number.isFinite(Date.parse(attempt.at)) &&
|
|
498
|
+
invocation &&
|
|
499
|
+
Array.isArray(attempt.tests) &&
|
|
500
|
+
recordNativeAttempts(invocation, attempt.tests, {
|
|
501
|
+
keys: observedKeys,
|
|
502
|
+
seed: attempt.seed,
|
|
503
|
+
ok: attempt.invocation?.ok === true,
|
|
504
|
+
profile,
|
|
505
|
+
at: attempt.at,
|
|
506
|
+
allEntries: reuse ? [observedEntry] : current.generated.tests,
|
|
507
|
+
})[observedEntry.law];
|
|
508
|
+
if (
|
|
509
|
+
!recomputed ||
|
|
510
|
+
recomputed.outcome !== attempt.outcome ||
|
|
511
|
+
!isDeepStrictEqual(
|
|
512
|
+
recomputed.check.nativeGroup,
|
|
513
|
+
attempt.check?.nativeGroup,
|
|
514
|
+
)
|
|
515
|
+
)
|
|
516
|
+
{
|
|
517
|
+
observations.push({
|
|
518
|
+
...row,
|
|
519
|
+
freshness: 'unavailable',
|
|
520
|
+
reason:
|
|
521
|
+
'The stored observation does not establish the current native completion',
|
|
522
|
+
});
|
|
523
|
+
continue;
|
|
176
524
|
}
|
|
177
|
-
const run=runs[id];
|
|
178
|
-
observations.push({
|
|
179
|
-
...
|
|
180
|
-
|
|
181
|
-
|
|
525
|
+
const run = runs[id];
|
|
526
|
+
observations.push({
|
|
527
|
+
...row,
|
|
528
|
+
freshness: 'matching-inputs',
|
|
529
|
+
...(reuse ? {reused: reuse} : {}),
|
|
530
|
+
...(attempt.outcome === 'passed' &&
|
|
531
|
+
run?.key === attempt.key &&
|
|
532
|
+
(run.flaky || run.adequacy)
|
|
533
|
+
? {
|
|
534
|
+
harness: {
|
|
535
|
+
...(run.flaky ? {flaky: true} : {}),
|
|
536
|
+
...(run.adequacy ? {adequacy: run.adequacy} : {}),
|
|
537
|
+
},
|
|
538
|
+
}
|
|
539
|
+
: {}),
|
|
540
|
+
reason: reuse
|
|
541
|
+
? 'Original native completion reused for the current semantic law; no fresh invocation is claimed'
|
|
542
|
+
: attempt.outcome === 'passed'
|
|
543
|
+
? 'Recorded native completion matches the current inputs'
|
|
544
|
+
: 'Recorded native attempt matches the current inputs',
|
|
545
|
+
});
|
|
182
546
|
}
|
|
183
|
-
for(const [id,attempt]of Object.entries(attempts))
|
|
184
|
-
|
|
185
|
-
|
|
547
|
+
for (const [id, attempt] of Object.entries(attempts))
|
|
548
|
+
if (!expected.has(id) && Array.isArray(attempt.check?.obligations))
|
|
549
|
+
observations.push({
|
|
550
|
+
target: target.language,
|
|
551
|
+
root,
|
|
552
|
+
check: attempt.check,
|
|
553
|
+
attempt,
|
|
554
|
+
outcome: observationOutcome(attempt.outcome),
|
|
555
|
+
coverage: attempt.coverage,
|
|
556
|
+
freshness: 'not-selected',
|
|
557
|
+
reason:
|
|
558
|
+
'This native check is not selected by the current configuration',
|
|
559
|
+
});
|
|
186
560
|
}
|
|
187
561
|
return observations;
|
|
188
562
|
}
|
|
189
563
|
|
|
190
|
-
export function attachNativeEvidence(evidence,observations)
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
const
|
|
207
|
-
row.
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
564
|
+
export function attachNativeEvidence(evidence, observations)
|
|
565
|
+
{
|
|
566
|
+
return evidence.map(item =>
|
|
567
|
+
{
|
|
568
|
+
const rows = observations.filter(row =>
|
|
569
|
+
row.check
|
|
570
|
+
? subject({obligations: row.check.obligations}, item)
|
|
571
|
+
: row.obligations?.some(
|
|
572
|
+
target =>
|
|
573
|
+
target.declaration === item.declaration &&
|
|
574
|
+
target.stage === item.stage,
|
|
575
|
+
),
|
|
576
|
+
);
|
|
577
|
+
if (!rows.length) return item;
|
|
578
|
+
const current = rows.filter(row => row.freshness === 'matching-inputs');
|
|
579
|
+
const failed = current.filter(row => row.outcome === 'failed');
|
|
580
|
+
const combinedFailure = failed.some(
|
|
581
|
+
row => (row.attempt?.check?.nativeGroup?.length ?? 0) > 1,
|
|
582
|
+
);
|
|
583
|
+
const status = failed.length
|
|
584
|
+
? combinedFailure
|
|
585
|
+
? 'incomplete'
|
|
586
|
+
: 'failed'
|
|
587
|
+
: current.length === rows.length &&
|
|
588
|
+
current.every(row => row.outcome === 'passed')
|
|
589
|
+
? 'passed'
|
|
590
|
+
: current.length === rows.length &&
|
|
591
|
+
current.every(row => row.outcome === 'skipped')
|
|
592
|
+
? 'skipped'
|
|
593
|
+
: current.length === rows.length &&
|
|
594
|
+
current.every(row => row.outcome === 'known-discrepancy')
|
|
595
|
+
? 'known-discrepancy'
|
|
596
|
+
: current.some(row => row.outcome === 'passed')
|
|
597
|
+
? 'partial'
|
|
598
|
+
: current.some(row =>
|
|
599
|
+
['incomplete', 'not-run'].includes(row.outcome),
|
|
600
|
+
)
|
|
601
|
+
? 'incomplete'
|
|
602
|
+
: rows.every(row => row.freshness === 'not-selected')
|
|
603
|
+
? 'not-selected'
|
|
604
|
+
: rows.some(row => row.freshness === 'stale')
|
|
605
|
+
? 'stale'
|
|
606
|
+
: 'unavailable';
|
|
607
|
+
const completeFinite =
|
|
608
|
+
status === 'passed' &&
|
|
609
|
+
rows.every(
|
|
610
|
+
row =>
|
|
611
|
+
row.coverage?.kind === 'finite-inputs' &&
|
|
612
|
+
row.coverage.scopedQuantifiers === false,
|
|
613
|
+
);
|
|
614
|
+
const measurements =
|
|
615
|
+
item.executionKind === 'measurement'
|
|
616
|
+
? current.flatMap(row =>
|
|
617
|
+
(row.attempt?.tests ?? []).flatMap(test =>
|
|
618
|
+
Number.isFinite(test.time) && test.time >= 0
|
|
619
|
+
? [
|
|
620
|
+
{
|
|
621
|
+
kind: 'native-check-duration',
|
|
622
|
+
target: row.target,
|
|
623
|
+
root: row.root,
|
|
624
|
+
test: test.name,
|
|
625
|
+
seconds: test.time,
|
|
626
|
+
},
|
|
627
|
+
]
|
|
628
|
+
: [],
|
|
629
|
+
),
|
|
630
|
+
)
|
|
631
|
+
: [];
|
|
632
|
+
const nativeEvidence = {
|
|
633
|
+
kind: 'native-conformance',
|
|
634
|
+
status,
|
|
635
|
+
searchCompleteness: completeFinite
|
|
636
|
+
? 'complete-finite-inputs'
|
|
637
|
+
: 'not-established',
|
|
638
|
+
observations: rows,
|
|
639
|
+
...(item.executionKind === 'measurement'
|
|
640
|
+
? {
|
|
641
|
+
measurements,
|
|
642
|
+
measurementScope:
|
|
643
|
+
'Reported durations cover the native check, including harness overhead; exact operation timings are not exported by these runners.',
|
|
644
|
+
}
|
|
645
|
+
: {}),
|
|
646
|
+
};
|
|
647
|
+
const adequacy = current.flatMap(row => row.harness?.adequacy ?? []);
|
|
648
|
+
const enriched = {
|
|
649
|
+
...item,
|
|
650
|
+
nativeEvidence,
|
|
651
|
+
...(adequacy.length ? {adequacy} : {}),
|
|
652
|
+
};
|
|
653
|
+
if (item.status !== 'planned') return enriched;
|
|
654
|
+
const flaky = current.some(row => row.harness?.flaky);
|
|
655
|
+
if (status === 'passed')
|
|
656
|
+
return {
|
|
657
|
+
...enriched,
|
|
658
|
+
plannedEvidence: {status: item.status, reason: item.reason},
|
|
659
|
+
status: flaky
|
|
660
|
+
? 'flaky'
|
|
661
|
+
: item.executionKind === 'measurement'
|
|
662
|
+
? 'measured'
|
|
663
|
+
: completeFinite
|
|
664
|
+
? 'exhaustively-checked'
|
|
665
|
+
: 'property-tested',
|
|
666
|
+
reason:
|
|
667
|
+
`Recorded native checks completed for ${new Set(rows.map(row => row.target + '\0' + row.root)).size} requested target(s); ` +
|
|
668
|
+
(item.executionKind === 'measurement'
|
|
669
|
+
? 'the performance budget was checked against the real clock. This is measurement evidence, not proof. ' +
|
|
670
|
+
nativeEvidence.measurementScope
|
|
671
|
+
: completeFinite
|
|
672
|
+
? 'every finite input was checked.'
|
|
673
|
+
: 'this is scoped native execution evidence, not a universal model or search proof.') +
|
|
674
|
+
(flaky ? ' Its last run failed, then passed on a retry.' : ''),
|
|
675
|
+
};
|
|
676
|
+
if (['failed', 'incomplete'].includes(status))
|
|
677
|
+
return {
|
|
678
|
+
...enriched,
|
|
679
|
+
plannedEvidence: {status: item.status, reason: item.reason},
|
|
680
|
+
status: 'incomplete',
|
|
681
|
+
reason: combinedFailure
|
|
682
|
+
? 'A combined native method failed; the specific included logical check is not identified, and no successful conformance result is established.'
|
|
683
|
+
: status === 'failed'
|
|
684
|
+
? 'A recorded native implementation check failed; no successful conformance result is established.'
|
|
685
|
+
: 'Native execution did not complete all selected checks; no successful conformance result is established.',
|
|
686
|
+
};
|
|
224
687
|
return enriched;
|
|
225
688
|
});
|
|
226
689
|
}
|
|
227
690
|
|
|
228
691
|
// Native conformance a law's evidence row carries, for lawspec evidence.
|
|
229
|
-
export function nativeEvidenceText(item)
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
...summary.
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
692
|
+
export function nativeEvidenceText(item)
|
|
693
|
+
{
|
|
694
|
+
if (!item.nativeEvidence) return '';
|
|
695
|
+
const summary = item.nativeEvidence;
|
|
696
|
+
return [
|
|
697
|
+
`Native conformance: ${summary.status}; search completeness: ${summary.searchCompleteness}`,
|
|
698
|
+
...(summary.measurements ?? []).map(
|
|
699
|
+
item =>
|
|
700
|
+
`Native check duration: ${item.test} [${item.target}] ${item.seconds} s`,
|
|
701
|
+
),
|
|
702
|
+
...(summary.measurementScope ? [summary.measurementScope] : []),
|
|
703
|
+
...summary.observations.map(
|
|
704
|
+
row =>
|
|
705
|
+
`${row.target} (${row.root}): ${row.outcome}; ${row.freshness}` +
|
|
706
|
+
(row.attempt ? `; seed ${row.attempt.seed}; ${row.attempt.at}` : '') +
|
|
707
|
+
`; ${row.reason}`,
|
|
708
|
+
),
|
|
709
|
+
...summary.observations.flatMap(row =>
|
|
710
|
+
(row.attempt?.tests ?? [])
|
|
711
|
+
.filter(test => test.status === 'failed')
|
|
712
|
+
.map(
|
|
713
|
+
test =>
|
|
714
|
+
`${test.name}: ${test.reason ?? test.failure ?? test.message ?? 'native test failed'}`,
|
|
715
|
+
),
|
|
716
|
+
),
|
|
717
|
+
...summary.observations
|
|
718
|
+
.filter(row => row.attempt?.invocation?.output)
|
|
719
|
+
.map(
|
|
720
|
+
row =>
|
|
721
|
+
'Native invocation output (scoped to that invocation):\n' +
|
|
722
|
+
row.attempt.invocation.output,
|
|
723
|
+
),
|
|
724
|
+
].join('\n');
|
|
239
725
|
}
|