Guth
NewsDocs
Page actions
View as Markdown ↗
Explore MCP tools ↗

instrument implementation / implementation-contract

JSON/XML Size & Depth Analyzer implementation

A source-bound implementation contract for JSON/XML Size & Depth Analyzer; deployment and executable qualification remain separate.

Status: VERIFIED_WITH_ERRATALifecycle: implementation-contract

Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

Record owner
Guth Instruments
Lifecycle
verified-with-binding-errata
Evidence ID
t5-108
Effect
Computation or source lookup only

Input and validation requirements

Empty input produces raw size zero and makes the minification-reduction formula undefined as 0/0; the analyzer must reject it before calculation. The specification also leaves byte encoding and depth conventions unstated, which can produce different reported values for Unicode input.

Required corrections

[
  {
    "vector": 3,
    "field": "raw_bytes/minified/reduction",
    "wrong": 54,
    "correct": 56,
    "cause": "authored XML with literal backslash-n (2 bytes each) but counted them as newlines"
  }
]

Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

{
  "inputs": {
    "format": "JSON",
    "raw_text": "{\"a\": 1, \"b\": [true, null]}",
    "encoding": "UTF-8"
  },
  "expected_outputs": {
    "raw_bytes": 27,
    "minified_bytes": 23,
    "max_depth": 2,
    "key_or_element_count": 2,
    "size_reduction_percent": 14.8148148148
  },
  "working": "Raw UTF-8 text is ASCII, so bytes = characters = 27. Minified form is {\"a\":1,\"b\":[true,null]} and has 23 bytes. Depth: root object = 1; nested array = 2; maximum = 2. Key count: a and b = 2. Reduction = 27 - 23 = 4 bytes. Percentage = (4 / 27) * 100 = 14.8148148148%."
}

Other records

Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

  • VERIFIED_LEDGER.json
  • evidence-tranche5/tranche5-results.json
  • tranche errata record