<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Parity Forge</title>
    <description>The latest articles on DEV Community by Parity Forge (@parityforge).</description>
    <link>https://dev.to/parityforge</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4060649%2F9b246041-b5cc-45dc-ad46-43aa74139600.png</url>
      <title>DEV Community: Parity Forge</title>
      <link>https://dev.to/parityforge</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/parityforge"/>
    <language>en</language>
    <item>
      <title>The Port Was the Easy Part: Proving a JavaScript Query-String Codec in Go</title>
      <dc:creator>Parity Forge</dc:creator>
      <pubDate>Mon, 03 Aug 2026 12:44:55 +0000</pubDate>
      <link>https://dev.to/parityforge/the-port-was-the-easy-part-proving-a-javascript-query-string-codec-in-go-48ka</link>
      <guid>https://dev.to/parityforge/the-port-was-the-easy-part-proving-a-javascript-query-string-codec-in-go-48ka</guid>
      <description>&lt;p&gt;I picked &lt;a href="https://github.com/ljharb/qs" rel="noopener noreferrer"&gt;&lt;code&gt;ljharb/qs&lt;/code&gt;&lt;/a&gt; from the official &lt;a href="https://coderesurrection.com/2026/repo-pool/" rel="noopener noreferrer"&gt;Port Mortem 2026 Track H pool&lt;/a&gt; because its size was deceptive. Roughly a thousand lines of query-string code looked manageable in 72 hours. Its observable behavior was not.&lt;/p&gt;

&lt;p&gt;A query such as &lt;code&gt;a[0]=x&amp;amp;a[2]=y&lt;/code&gt; is not merely text becoming a map. It can encode nested objects, arrays, sparse holes, duplicate keys, prototype-sensitive names, configurable depth, and JavaScript's property-ordering rules. Moving that behavior to Go meant translating a runtime model, not syntax.&lt;/p&gt;

&lt;p&gt;The result is &lt;a href="https://github.com/agentic-build-lab/qs-go" rel="noopener noreferrer"&gt;&lt;code&gt;qs-go&lt;/code&gt;&lt;/a&gt;: a standard-library Go module, standalone CLI, and &lt;a href="https://agentic-build-lab.github.io/qs-go/" rel="noopener noreferrer"&gt;no-install Go/WebAssembly demo&lt;/a&gt;. The release path contains no Node.js, subprocess fallback, cgo, or second parser hidden in the demo.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Try it first:&lt;/strong&gt; &lt;a href="https://agentic-build-lab.github.io/qs-go/" rel="noopener noreferrer"&gt;live Go/WASM demo&lt;/a&gt; · &lt;a href="https://drive.google.com/file/d/1dL5DhhTMIiO67chlSwGq0GieninJYw9c/view?usp=sharing" rel="noopener noreferrer"&gt;4:40 evidence video&lt;/a&gt; · &lt;a href="https://github.com/agentic-build-lab/qs-go/releases/tag/port-mortem-2026-submission" rel="noopener noreferrer"&gt;submission release&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here is the result in one deliberately qualified paragraph. The frozen upstream JavaScript baseline passes &lt;strong&gt;1,045 / 1,045 Tape assertions&lt;/strong&gt;. Those assertions did &lt;strong&gt;not&lt;/strong&gt; all run directly against Go. The Go equivalence claim is supported separately by focused Go tests, a hash-verified JavaScript oracle, and a final deterministic differential record of &lt;strong&gt;672,321 comparisons in 60 seconds&lt;/strong&gt;, with zero observed mismatches and zero execution errors inside a declared dense, JSON-compatible scope.&lt;/p&gt;

&lt;p&gt;That distinction is the thesis of this project: a large number is useful only when its provenance and boundary are equally visible.&lt;/p&gt;

&lt;h2&gt;
  
  
  The evidence contract
&lt;/h2&gt;

&lt;p&gt;Before discussing implementation, this is what each headline claim does and does not prove.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Claim&lt;/th&gt;
&lt;th&gt;Published evidence&lt;/th&gt;
&lt;th&gt;Boundary&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The original snapshot is healthy&lt;/td&gt;
&lt;td&gt;Frozen JavaScript run: 1,045 / 1,045 assertions&lt;/td&gt;
&lt;td&gt;Baseline only; not 1,045 assertions executed against Go&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The port builds and runs independently&lt;/td&gt;
&lt;td&gt;One-command build, clean-archive rebuild, Linux/Windows CI, native CLI, Go/WASM demo&lt;/td&gt;
&lt;td&gt;The browser demo exposes &lt;code&gt;parse&lt;/code&gt; and &lt;code&gt;normalize&lt;/code&gt;, not every library option&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dense values matched the oracle&lt;/td&gt;
&lt;td&gt;672,321 deterministic parse/stringify comparisons; zero observed differences or errors&lt;/td&gt;
&lt;td&gt;JSON-compatible dense trees and supported serializable options, not callbacks, cycles, or sparse holes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sparse behavior exists in the Go model&lt;/td&gt;
&lt;td&gt;Explicit &lt;code&gt;Element.Present&lt;/code&gt; representation and Go regression tests&lt;/td&gt;
&lt;td&gt;Ordinary JSON cannot transport a JavaScript array hole faithfully&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance was measured comparatively&lt;/td&gt;
&lt;td&gt;Shared workloads, 40 retained raw samples, p99, startup, and externally sampled Working Set&lt;/td&gt;
&lt;td&gt;One sequential Windows session; not a universal performance claim&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This table prevented several tempting but false sentences from entering the README.&lt;/p&gt;

&lt;h2&gt;
  
  
  A query string is not &lt;code&gt;map[string]any&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The shortest Go API would have been &lt;code&gt;map[string]any&lt;/code&gt;. It also would have erased the distinctions I most needed to preserve: object versus array, a sparse hole versus explicit &lt;code&gt;undefined&lt;/code&gt;, deterministic property order, and type-specific stringify behavior.&lt;/p&gt;

&lt;p&gt;Instead, the public API uses a closed value algebra. Its state is private, and callers construct values through typed constructors:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;Member&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Key&lt;/span&gt;   &lt;span class="kt"&gt;string&lt;/span&gt;
    &lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;Element&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Present&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="c"&gt;// false means a sparse hole&lt;/span&gt;
    &lt;span class="n"&gt;Value&lt;/span&gt;   &lt;span class="n"&gt;Value&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;kind&lt;/span&gt;        &lt;span class="n"&gt;Kind&lt;/span&gt;
    &lt;span class="n"&gt;objectValue&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="n"&gt;Member&lt;/span&gt;
    &lt;span class="n"&gt;objectIndex&lt;/span&gt; &lt;span class="k"&gt;map&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;
    &lt;span class="n"&gt;arrayValue&lt;/span&gt;  &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="n"&gt;Element&lt;/span&gt;
    &lt;span class="c"&gt;// private scalar fields omitted&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is no &lt;code&gt;any&lt;/code&gt; or &lt;code&gt;interface{}&lt;/code&gt; escape hatch in the public Go value model. Ordered members provide stable enumeration while an internal index preserves efficient lookup. Sparse elements distinguish a missing slot from a present &lt;code&gt;undefined&lt;/code&gt; or &lt;code&gt;null&lt;/code&gt; value.&lt;/p&gt;

&lt;p&gt;The parser also uses a balanced bracket scanner instead of one convenient regular expression. Nested bracket segments and unclosed suffixes have observable upstream behavior; a flat split is shorter, but it is not the same parser. Compatibility thresholds such as &lt;code&gt;arrayLimit&lt;/code&gt; remain separate from resource budgets such as input bytes, nodes, and nesting depth.&lt;/p&gt;

&lt;p&gt;This design costs more code than a map. It pays that cost once, at the language boundary, instead of rediscovering ambiguity throughout the parser and stringifier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Freeze the oracle before asking it questions
&lt;/h2&gt;

&lt;p&gt;Differential testing can create false confidence when the reference moves underneath it. My oracle refuses to start unless it verifies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;upstream commit &lt;code&gt;3a890d4ecd3deb72a45d90be36f4f8c5970467c7&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;test-tree identity &lt;code&gt;bef346f180a38793ec6d47e11f25f88a7eb579ca&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;source-tree identity;&lt;/li&gt;
&lt;li&gt;four recorded original-test SHA-256 values.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The comparison path is intentionally boring:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deterministic case + supported options
                  |
          +-------+-------+
          |               |
  frozen JS oracle     Go implementation
          |               |
          +-------+-------+
                  |
       structural result comparison
                  |
       mismatch log + final report
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Node.js exists only on the left side of that development pipeline. The library, native CLI, and WebAssembly build do not invoke it.&lt;/p&gt;

&lt;p&gt;The first oracle wire uses versioned NDJSON and intentionally accepts only dense JSON-compatible trees. Plain JSON cannot preserve sparse holes, &lt;code&gt;undefined&lt;/code&gt;, negative zero, invalid UTF-16 surrogates, callbacks, cycles, or reference identity. I could have invented encodings and then advertised a larger number, but that would have mixed transport design with implementation proof. I kept the scope smaller, versioned it, and tested sparse semantics directly in Go.&lt;/p&gt;

&lt;p&gt;The scope statement is not fine print. It is part of the result.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fuzzer found a JavaScript rule I had modeled incorrectly
&lt;/h2&gt;

&lt;p&gt;The most valuable counterexample was only 23 characters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a[3]=4zf&amp;amp;a[1]=ui_ir
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"arrayLimit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because index &lt;code&gt;3&lt;/code&gt; crosses that representation threshold, &lt;code&gt;qs&lt;/code&gt; materializes object properties instead of a dense array. My first Go implementation preserved arrival order: &lt;code&gt;3&lt;/code&gt;, then &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;JavaScript exposes a different order. Under &lt;a href="https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-ordinaryownpropertykeys" rel="noopener noreferrer"&gt;&lt;code&gt;OrdinaryOwnPropertyKeys&lt;/code&gt;&lt;/a&gt;, array-index keys are returned numerically before ordinary string keys. The observable upstream result is therefore conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"ui_ir"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"3"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"4zf"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The correct fix was not "sort every key." That would destroy insertion order for ordinary properties. The Go object constructor now classifies canonical unsigned 32-bit property indices below &lt;code&gt;4294967295&lt;/code&gt;, sorts only that class numerically, and retains insertion order for everything else. Keys such as &lt;code&gt;01&lt;/code&gt; and &lt;code&gt;4294967295&lt;/code&gt; remain ordinary strings. A focused regression test locks the counterexample.&lt;/p&gt;

&lt;p&gt;This was a bug in my developing port, not a latent bug in upstream &lt;code&gt;qs&lt;/code&gt;, so I did not claim the separate Bug Catcher prize.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fagentic-build-lab%2Fqs-go%2Freleases%2Fdownload%2Fport-mortem-2026-submission%2Fport_mortem_qsgo_bug_evidence.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fagentic-build-lab%2Fqs-go%2Freleases%2Fdownload%2Fport-mortem-2026-submission%2Fport_mortem_qsgo_bug_evidence.png" alt="The integer property-ordering counterexample and regression evidence" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Then the validator failed its own test
&lt;/h2&gt;

&lt;p&gt;The quieter discovery mattered even more.&lt;/p&gt;

&lt;p&gt;The differential runner alternated parse and stringify using one global case number. Parse received global indices &lt;code&gt;0, 2, 4, ...&lt;/code&gt;; stringify received &lt;code&gt;1, 3, 5, ...&lt;/code&gt;. The generators contained 32 parse templates and 24 stringify templates.&lt;/p&gt;

&lt;p&gt;Modulo an even schedule length, repeatedly adding two can visit only half the residues:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcd(2, 32) = 2  -&amp;gt;  16 of 32 parse templates reachable
gcd(2, 24) = 2  -&amp;gt;  12 of 24 stringify templates reachable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The comparison count kept rising. The output stayed green. Half the scheduled families were still unreachable.&lt;/p&gt;

&lt;p&gt;I replaced the shared counter with operation-local indices, then added runner-level tests that enumerate the executed schedule and prove all &lt;strong&gt;32 / 32 parse&lt;/strong&gt; and &lt;strong&gt;24 / 24 stringify&lt;/strong&gt; templates are reachable and distinct. The earlier 564,651-case run was marked superseded and excluded from final evidence.&lt;/p&gt;

&lt;p&gt;The replacement run used seed &lt;code&gt;0x5153474f&lt;/code&gt; for exactly 60,000 ms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;336,161 parse comparisons;&lt;/li&gt;
&lt;li&gt;336,160 stringify comparisons;&lt;/li&gt;
&lt;li&gt;672,321 total comparisons;&lt;/li&gt;
&lt;li&gt;zero observed mismatches;&lt;/li&gt;
&lt;li&gt;zero Go errors;&lt;/li&gt;
&lt;li&gt;zero oracle errors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is why I now treat a fuzz harness as production code. A green validator can be wrong about its own coverage while being perfectly correct about every case it actually executes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The benchmark refused to become a victory slide
&lt;/h2&gt;

&lt;p&gt;The comparative benchmark runs Node and Go sequentially on the same host and shared flat and nested workloads. It retains all 40 latency samples, all 40 cold-start samples, environment metadata, source identity, and externally sampled Working Set observations. With the recorded percentile rule and 40 samples, p99 is the maximum; the report says so.&lt;/p&gt;

&lt;p&gt;The throughput story split cleanly by direction:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Workload&lt;/th&gt;
&lt;th&gt;Go median vs Node&lt;/th&gt;
&lt;th&gt;Go p99 vs Node&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Parse 100 flat pairs&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;20.0% slower&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;36.8% slower&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Parse 20 nested values&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;11.6% slower&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;61.2% slower&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stringify 100 flat pairs&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;40.3% faster&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;36.6% faster&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stringify 20 nested values&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;60.7% faster&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;56.1% faster&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Process-level measurements were also mixed:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Measurement&lt;/th&gt;
&lt;th&gt;Node&lt;/th&gt;
&lt;th&gt;Go&lt;/th&gt;
&lt;th&gt;Interpretation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Median cold start&lt;/td&gt;
&lt;td&gt;73.2933 ms&lt;/td&gt;
&lt;td&gt;14.9117 ms&lt;/td&gt;
&lt;td&gt;Go about 4.9x faster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;p99 cold start&lt;/td&gt;
&lt;td&gt;79.6998 ms&lt;/td&gt;
&lt;td&gt;384.8232 ms&lt;/td&gt;
&lt;td&gt;Go worse because one retained first-start sample is the maximum&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Polled peak Working Set&lt;/td&gt;
&lt;td&gt;65.9102 MiB&lt;/td&gt;
&lt;td&gt;35.8477 MiB&lt;/td&gt;
&lt;td&gt;Go 45.6% lower in this run&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fagentic-build-lab%2Fqs-go%2Freleases%2Fdownload%2Fport-mortem-2026-submission%2Fport_mortem_qsgo_benchmark.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fagentic-build-lab%2Fqs-go%2Freleases%2Fdownload%2Fport-mortem-2026-submission%2Fport_mortem_qsgo_benchmark.png" alt="Raw-retained comparative benchmark summary" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The 384.8232 ms Go observation was inconvenient. It would have been easy to call it warm-up noise, delete the run, and rerun until p99 looked attractive. I kept it.&lt;/p&gt;

&lt;p&gt;The defensible conclusion is narrower: this port has a strong median startup, memory, and stringify story on the recorded host; its parser requires optimization before anyone should claim general performance superiority. The &lt;a href="https://github.com/agentic-build-lab/qs-go/releases/download/port-mortem-2026-submission/qs_go_benchmark_evidence_v2.zip" rel="noopener noreferrer"&gt;complete benchmark evidence archive&lt;/a&gt; includes the raw samples, scripts, hashes, host snapshots, and correctness outputs.&lt;/p&gt;

&lt;p&gt;The live demo reports per-run browser timing for feedback. Those numbers are deliberately excluded from the cross-runtime benchmark claim.&lt;/p&gt;

&lt;h2&gt;
  
  
  The decision I would take back
&lt;/h2&gt;

&lt;p&gt;I would not let one global case index serve as both an operation selector and a generator selector. It looked deterministic and economical; mathematically, it coupled two independent schedules and hid half the corpus. Separate counters should have existed from the first version, together with reachability assertions.&lt;/p&gt;

&lt;p&gt;I would also define the cross-language value model and transport boundary before touching parser code. Once I stopped treating JSON as a transparent carrier, decisions about sparse arrays, &lt;code&gt;undefined&lt;/code&gt;, negative zero, and ordering became much easier to explain and test.&lt;/p&gt;

&lt;p&gt;Finally, I would design benchmark retention before the first benchmark. The initial generation kept aggregates but not every observation. Those samples cannot be reconstructed honestly. The v2 runner therefore writes a new immutable evidence directory instead of overwriting history.&lt;/p&gt;

&lt;h2&gt;
  
  
  A five-minute verification path
&lt;/h2&gt;

&lt;p&gt;The fastest inspection starts in the &lt;a href="https://agentic-build-lab.github.io/qs-go/" rel="noopener noreferrer"&gt;live demo&lt;/a&gt;. GitHub Actions compiles the existing &lt;code&gt;cmd/qsgo&lt;/code&gt; entry point to WebAssembly; the page does not contain an alternate JavaScript parser. Run both &lt;code&gt;parse&lt;/code&gt; and &lt;code&gt;normalize&lt;/code&gt;, then reproduce the native checks from a fresh clone:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;test&lt;/span&gt; ./... &lt;span class="nt"&gt;-count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1
go vet ./...
go build &lt;span class="nt"&gt;-trimpath&lt;/span&gt; ./...
go &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-cover&lt;/span&gt; &lt;span class="nt"&gt;-count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The expected root-package statement coverage is &lt;strong&gt;81.5%&lt;/strong&gt;. Then inspect three receipts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://github.com/agentic-build-lab/qs-go/blob/main/fuzz/report.json" rel="noopener noreferrer"&gt;&lt;code&gt;fuzz/report.json&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://github.com/agentic-build-lab/qs-go/blob/main/fuzz/log.txt" rel="noopener noreferrer"&gt;&lt;code&gt;fuzz/log.txt&lt;/code&gt;&lt;/a&gt; for the final differential record and counterexample;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/agentic-build-lab/qs-go/blob/main/testdata/oracle/oracle_manifest.json" rel="noopener noreferrer"&gt;&lt;code&gt;testdata/oracle/oracle_manifest.json&lt;/code&gt;&lt;/a&gt; for the frozen source and test identity;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/agentic-build-lab/qs-go/blob/main/DECISIONS.md" rel="noopener noreferrer"&gt;&lt;code&gt;DECISIONS.md&lt;/code&gt;&lt;/a&gt; and the &lt;a href="https://github.com/agentic-build-lab/qs-go/blob/main/EVALUATION.md" rel="noopener noreferrer"&gt;&lt;code&gt;Evaluation Guide&lt;/code&gt;&lt;/a&gt; for architectural tradeoffs and claim boundaries.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One check remains unavailable in the recorded Windows environment: the portable Go toolchain had cgo disabled, so the race detector could not run. This library is not concurrency-heavy, but unavailable is not the same word as passed.&lt;/p&gt;

&lt;p&gt;The most important artifact is not the zero in the mismatch column. It is the chain that makes the zero interpretable:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;freeze the source identity;&lt;/li&gt;
&lt;li&gt;establish the original baseline;&lt;/li&gt;
&lt;li&gt;define the equivalence boundary;&lt;/li&gt;
&lt;li&gt;test the port;&lt;/li&gt;
&lt;li&gt;test the validator;&lt;/li&gt;
&lt;li&gt;publish the counterexample and regression;&lt;/li&gt;
&lt;li&gt;retain the benchmark result that hurts the story;&lt;/li&gt;
&lt;li&gt;state what remains unproved.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AI has made cross-language ports cheap to generate. Evidence is still expensive. That is exactly why it is the part worth engineering.&lt;/p&gt;




&lt;p&gt;Built by &lt;strong&gt;Parity Forge&lt;/strong&gt; for &lt;strong&gt;Port Mortem 2026&lt;/strong&gt;, organized by &lt;a href="https://dev.to/partnerships_raptors"&gt;Hackathon Raptors&lt;/a&gt;, &lt;strong&gt;Track H — Open Pair: JavaScript to Go&lt;/strong&gt;. The official pool lists &lt;code&gt;ljharb/qs&lt;/code&gt; under both the JavaScript-runtime track and the Open Pair pool; this entry uses Track H and documents the migration rationale in its README.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/agentic-build-lab/qs-go" rel="noopener noreferrer"&gt;https://github.com/agentic-build-lab/qs-go&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Release:&lt;/strong&gt; &lt;a href="https://github.com/agentic-build-lab/qs-go/releases/tag/port-mortem-2026-submission" rel="noopener noreferrer"&gt;https://github.com/agentic-build-lab/qs-go/releases/tag/port-mortem-2026-submission&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Live demo:&lt;/strong&gt; &lt;a href="https://agentic-build-lab.github.io/qs-go/" rel="noopener noreferrer"&gt;https://agentic-build-lab.github.io/qs-go/&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Evidence video:&lt;/strong&gt; &lt;a href="https://drive.google.com/file/d/1dL5DhhTMIiO67chlSwGq0GieninJYw9c/view?usp=sharing" rel="noopener noreferrer"&gt;https://drive.google.com/file/d/1dL5DhhTMIiO67chlSwGq0GieninJYw9c/view?usp=sharing&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>javascript</category>
      <category>testing</category>
      <category>hackathon</category>
    </item>
  </channel>
</rss>
