Skip to content

docs: Explain how canonical PIG traces store NUL characters - #1112

Open
promptless[bot] wants to merge 1 commit into
mainfrom
promptless/pig-trace-nul-normalization
Open

promptless[bot] wants to merge 1 commit into
mainfrom
promptless/pig-trace-nul-normalization

Conversation

@promptless

@promptless promptless Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

Promptless/promptless#5409 fixes trace uploads that contain escaped NUL characters (U+0000). PostgreSQL JSONB rejects those characters, so the analyzer returned a 503 and the collector kept retrying the same range. The analyzer now normalizes NUL before it hashes and stores the canonical trace. As a result, a canonical object can differ from the native record it came from.

This adds a paragraph to Stored trace records in governance/reference/trace-object-and-sources.mdx, so operators who inspect canonical objects know what to expect:

  • NUL in string values appears as U+FFFD.
  • When an object has a key that contains NUL, every key in that object has its literal backslashes doubled and each NUL written as the literal text \u0000. This keeps distinct keys distinct.
  • The same normalization applies to JSON inside tool inputs and results.
  • Raw artifacts keep the original bytes.

No changelog entry: the fix makes uploads succeed as operators already expect.

Merge timing: the fix is in analyzer 0.3.2. The public stable catalog (pig-deploy catalog/stable.json) still lists only 0.3.1, which doesn't include it. Merge this together with, or after, 0.3.2 is promoted, alongside #1039.

Checklist

  • Instructions and examples match the current product behavior.
  • Links and image references are valid.
  • Changed pages render correctly.

@promptless
promptless Bot requested a review from hawkeyexl as a code owner October 6, 2026 20:35
@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
promptless-docs Ready Ready Preview Oct 6, 2026 8:37pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — a8cafe46 Deployed Oct 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant