Skip to content

Debug Trace Schema

Status: first CLI artifact phase implemented.

The supported release no longer includes legacy text-log debugging through logs.txt. The replacement surface is an opt-in versioned JSON trace emitted by wistc run --trace.

Current Status

wistc run --trace trace.json ... writes a redacted JSON artifact for the run. Version wist-debug-trace/2 records source summary, dialect/backend selection, coarse runtime stages and result/error summary with bounded metadata. It is intentionally not a full viewer and does not dump raw AST, bytecode, AIR or SSA yet.

Current debugging and validation tools are:

  • wistc run --trace trace.json;
  • normal CLI diagnostics;
  • tests around interpreter/compiler parity;
  • verifier diagnostics;
  • dialect and runtime component inspection commands;
  • architecture documentation for pipeline boundaries.

Top-Level Shape

The future JSON document should contain:

FieldPurpose
schemaVersionversion the trace format; currently wist-debug-trace/2
createdAtUtcrecord trace creation time
stagesordered list of compilation stages
metadataimplementation and environment metadata safe to disclose
sourceredacted source summary, including length and SHA-256
resultsuccess/error summary

Stage Shape

Each stage should contain:

FieldPurpose
idstable stage instance id within the trace
kindstage kind such as TextInput, RuntimeSelection, BackendExecution
ownermodule, pass, backend or framework component that owns the stage
statussuccess, failed or skipped
metadatasmall backend-neutral metadata

Current Stage Catalog

The CLI writer emits these stage ids in order:

idkindowner
inputTextInputWistc
dialect-compositionDialectCompositionUniversalToolchain.Dialects
runtime-selectionRuntimeSelectionUniversalToolchain.Dialects
bytecode-translationBytecodeTranslationBasicCore
backend-artifactBackendArtifactUniversalToolchain.Runtime
backend-executionBackendExecutionUniversalToolchain.Runtime

Supported status values are success, failed and skipped.

Privacy Defaults

The default trace does not include full source text, runtime parameter values, private method arguments or secrets. Source is represented by length and SHA-256. Full source capture is not implemented.

Viewer Policy

A future viewer must read real structured traces. It must not recreate or depend on the removed logs.txt format, and it must not invent CIL listings unless a backend emits a stable listing artifact.

Built for developers who want to use, extend, or understand UniversalToolchain.