Skip to content

docs: define the trace export v1 contract#31

Merged
stackloomdev merged 3 commits into
mainfrom
agent/trace-export-v1
Jul 25, 2026
Merged

docs: define the trace export v1 contract#31
stackloomdev merged 3 commits into
mainfrom
agent/trace-export-v1

Conversation

@stackloomdev

Copy link
Copy Markdown
Owner

What changed

  • document the versioned Trace export v1 structure and compatibility boundary
  • expose TraceExport and TraceExportVersion from the public package entrypoint
  • publish a synthetic redacted JSON example and verify it against the TypeScript shape
  • link the contract from configuration, privacy, validation, and the docs sidebar

Why

Consumers need to determine whether exported traces are structurally compatible without reading CauseScope implementation files. The checked example also prevents the public documentation from drifting away from the package type.

Validation

  • pnpm check
  • pnpm docs:build
  • browser-visible review of /trace-export
  • opened /examples/trace-v1.json and verified version: 1 plus redacted values
  • targeted working-tree and Git-history privacy scan

The example is fully synthetic. This change adds only TypeScript type exports and documentation; it does not add production instrumentation or a network path.

Closes #24

@stackloomdev
stackloomdev marked this pull request as ready for review July 25, 2026 15:05
@stackloomdev
stackloomdev merged commit 0e11de9 into main Jul 25, 2026
10 checks passed
@stackloomdev
stackloomdev deleted the agent/trace-export-v1 branch July 25, 2026 15:05

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ec6ada7fa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

...metadata
} = expression;
return {
...metadata,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Serialize condition literals before exporting

When traceExpression receives condition metadata whose literalValue is not JSON-native—for example a bigint—this spread copies the raw condition into TraceExport; #redactConditionEvaluation likewise preserves its raw literalValue. The overlay's JSON.stringify then throws for bigint (and silently converts non-finite numbers to null), preventing the download or corrupting the recorded condition even though other captured values use tagged serialization. Recursively serialize condition literals before returning the export.

AGENTS.md reference: AGENTS.md:L9-L9

Useful? React with 👍 / 👎.

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.

docs(export): define the versioned trace JSON contract

1 participant