Skip to content

Report reference

Read a key normalization report

A pattern-pin report contains two output groups, but just one new collision. Reproduce it, trace the ordered row numbers and try two inputs that deliberately stop the check.

Reproduce the accepted example

Paste sample-keys.json, choose lowercase and compare the result with key-report.example.json. Its format is yagiro-key-normalization-report-v1. The six items remain in source order.

Four rows change. Row 6 is empty before and after. Four distinct starting strings become three distinct outputs. The counts describe array elements, so a formatted JSON file's physical line numbers may differ.

Distinguish both kinds of group

preexistingGroups contains [1,2] and [4,5]. outputGroups contains [1,2,3] and [4,5]. Each list includes only groups of two or more rows, in the order of their first row.

Rows 1, 2 and 3 have distinctOriginals equal to 2 and newCollision true. Rows 4 and 5 both change from OLD to old. Their distinctOriginals is 1 and newCollision is false. Exactly one group increases newCollisionGroups.

Read the two string literals

Each entry in items has row, beforeJson, afterJson and changed. After parsing the outer report, beforeJson and afterJson each still contain a quoted JSON string literal. Decoding that literal recovers the value.

Non-ASCII UTF-16 units use lowercase hexadecimal escapes. Quotes, backslashes and control characters are escaped as needed. These fields preserve the decoded strings. The source document's spacing and the spelling of its JSON escapes are not retained.

Recognize a refused run

Try unpaired-key.json. Its decoded first key begins with an unpaired high surrogate at UTF-16 position 1. Try wrong-type.json separately. It contains a number at array row 2. Neither input produces a report.

key-report.schema.json describes the output fields for successful runs. Check row memberships by rerunning the original array and operation. The full download contains recoverable original and transformed values and needs the same access controls as the source.

Schema and examples

The report records original and transformed strings as escaped JSON literals, with their row groups. Keep the source and review the proposed change before deciding whether records belong together.

Reference sources

Continue with a check