Skip to content

Write product comparison reports as UTF-8 - #712

Merged
willhea merged 4 commits into
civictechdc:developfrom
Nitjsefnie-OSC:issue-627-utf8-report-output
Aug 26, 2026
Merged

willhea merged 4 commits into
civictechdc:developfrom
Nitjsefnie-OSC:issue-627-utf8-report-output

Conversation

@Nitjsefnie

Copy link
Copy Markdown
Contributor

Related issue

Refs #627

What does this change?

Makes the XML and PDF product report writers use explicit UTF-8 so comparison output containing Unicode markers can be saved independently of the host's default text encoding.

  • Adds route-level subprocess coverage under a verified non-UTF-8 default and requires exact UTF-8 bytes, including and .
  • Covers the two product report writers only. Developer and demo writers remain follow-up scope in issue 627.
  • Integration note: draft PR feat(cli)!: return the canonical diff document from --format json (#693) #702 overlaps both product writer functions; if it lands first, its resulting writers must preserve the explicit UTF-8 arguments.

How to test

  • Targeted candidate run 32806936742, job 97678782199: both product-route tests passed on 0f94e3aba052d0ed4976da0767475d2a16742e8f.
  • Four single-writer mutation runs reintroduced encoding-less XML/PDF descriptor writers after closefd=False lifecycles and through byte-spelled paths. Each failed only its corresponding behavior assertion under ANSI_X3.4-1968; the sibling route passed: 32807070688, 32807148081, 32807219847, 32807291945.
  • Two behaviorally equivalent explicit-UTF-8 descriptor controls both passed: 32807369943 and 32807441424.
  • Full fork CI 32808250584: all 27 jobs passed; every checkout-bearing job logged candidate SHA 0f94e3aba052d0ed4976da0767475d2a16742e8f.
  • Independent adversarial review: SHIP 0f94e3aba052d0ed4976da0767475d2a16742e8f.

Checklist

  • Linked the issue above (Closes #...)
  • Ran the CI gates locally and they pass (see What CI checks)
  • New or changed behavior has tests
  • For a bug fix: the test fails without the fix, and I ran it both ways to check
  • Disclosed AI assistance below, if any

AI assistance

GPT-5.6 Luna implemented and tested the change. GPT-5.6 Sol independently reviewed and verified it.

Generated by GPT-5.6 Luna (implementation, testing), GPT-5.6 Sol (brief, review, verification)

Nitjsefnie and others added 4 commits August 25, 2026 04:14
Use explicit UTF-8 at both product report output boundaries.

Refs civictechdc#627

Co-Authored-By: GPT-5.6 Luna <noreply@openai.com>
Cover both builtins.open and io.open while preserving unrelated writes.

Co-Authored-By: GPT-5.6 Luna <noreply@openai.com>
Associate only exact-output descriptors with the simulated default encoding and verify unrelated descriptors stay untouched.

Co-Authored-By: GPT-5.6 Luna <noreply@openai.com>
Replace stateful descriptor simulation with a verified locale boundary that runs each real CLI route and reports setup, encoding, and byte outcomes distinctly.

Co-Authored-By: GPT-5.6 Luna <noreply@openai.com>
@willhea
willhea added this pull request to the merge queue Aug 26, 2026
@willhea

willhea commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Looks great, thanks @Nitjsefnie!

Merged via the queue into civictechdc:develop with commit 2bc5563 Aug 26, 2026
27 checks passed
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