Skip to content

Unify canonical conformance JSONL bytes - #76

Merged
Taz33m merged 1 commit into
mainfrom
codex/canonical-jsonl
Aug 5, 2026
Merged

Unify canonical conformance JSONL bytes#76
Taz33m merged 1 commit into
mainfrom
codex/canonical-jsonl

Conversation

@Taz33m

@Taz33m Taz33m commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • encode normalized conformance events through one canonical UTF-8 JSONL line function
  • make trace hashing, CLI reduced traces, and campaign artifact traces consume those exact bytes
  • write event artifacts in binary mode so newline and Unicode bytes are part of the explicit contract
  • add a non-ASCII regression that proves published trace SHA-256 equals the artifact bytes

Verification

  • full pytest suite passed
  • Black, Flake8, mypy, Bandit, compileall, and diff checks passed
  • fresh 1,000-trace issue-88 campaign is byte-for-byte identical to the pre-change artifact tree
  • 15,739-event Flash handoff still produces the canonical four-event fixture byte-for-byte
  • both distributions build; Twine, sdist/wheel agreement, ownership, migration, resolver, and clean-install checks pass
  • conformance-only wheel qualification passes without NumPy or psutil

Summary by cubic

Unified conformance event JSONL encoding and hashing so trace SHA-256 matches the exact artifact bytes, including non-ASCII characters. All event writers now share one canonical UTF-8 encoder and write in binary mode.

  • Bug Fixes
    • Added canonical_event_jsonl_line() to produce compact, sorted-key UTF-8 JSONL lines with a trailing newline and no ASCII escaping.
    • Updated trace hashing, CLI reduced traces, and campaign artifacts to use the same bytes; files are written in binary mode.
    • Added a regression test to verify the on-disk bytes equal the reported trace hash and that non-ASCII remain UTF-8 (not \uXXXX escaped).

Written for commit 70b0f5e. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Re-trigger cubic

@Taz33m
Taz33m merged commit 6e1f5a0 into main Aug 5, 2026
8 checks passed
@Taz33m
Taz33m deleted the codex/canonical-jsonl branch August 5, 2026 23:04
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.

1 participant