Skip to content

Check this port against the compact-encoding corpus - #26

Merged
bavulapati merged 2 commits into
mainfrom
conformance-harness
Nov 20, 2026
Merged

bavulapati merged 2 commits into
mainfrom
conformance-harness

Conversation

@bavulapati

Copy link
Copy Markdown
Contributor

Adds conformance.py, a translation of the corpus's reference conformance.js, so this port can be checked against compact-encoding-test rather than only against its own tests.

The corpus arrives as an npm devDependency, resolved rather than vendored, so a case added upstream arrives through the pin. --json emits the report shape CONFORMANCE.md specifies, so ports diff line by line.

166 matched, 8 diverged, 59 unrun in 17 codecs this port does not provide

matched, diverged and unrun partition all 233 cases. The cases of a codec this port does not export are unrun rather than passing, the one way a partial port reads as complete.

The 8 divergences confirm #18, #19 and #20, and found uint-uint64-top-byte, which #20 did not name. No fixes here - each is its own PR.

Two notes for a reader of the diff. The corpus writes astral characters as UTF-16 surrogate pairs, so the notation goes through utf-16-le with surrogatepass; building them per code unit yields lone surrogates and three false divergences. And a case's value is read outside the try that catches a refusal, so a harness bug raises rather than being reported as this port refusing.

A translation of the reference conformance.js, reading the corpus from an npm
devDependency rather than vendored fixtures. The report follows the shape
CONFORMANCE.md specifies, so two ports diff rather than get read side by side.

First run: 166 matched, 8 diverged, 59 unrun across 17 codecs this port does
not provide. The divergences confirm #18, #19 and #20, and turn up one case
@bavulapati
bavulapati requested a review from a team November 20, 2026 13:16
Comment thread package.json Resolved
@bavulapati
bavulapati merged commit a74dfb2 into main Nov 20, 2026
8 checks passed
@bavulapati
bavulapati deleted the conformance-harness branch November 20, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants