The glassbox debug and glassbox trace commands include comprehensive validation and diagnostic capabilities for trace export operations. This document describes the validation checks, error handling, and troubleshooting guidance for both commands.
Trace export validation occurs at multiple stages:
- Pre-flight validation — CLI flag validation before any simulation or file load
- Pre-export validation — Trace data and configuration validation before export
- Format compatibility — Format-specific checks for data compatibility
- Export execution — File system and I/O validation during write
The debug command validates trace-related flags in PreRunE before any network or simulator operations:
Valid values: summary, normal, verbose
Validation:
- Must be one of the three supported values (case-insensitive)
- Checked at parse time before any execution
Error example:
invalid --trace-verbosity "ultra" — must be one of: summary, normal, verbose
Fix: use --trace-verbosity normal (default), summary (minimal), or verbose (detailed)
Valid values: text, json, html, markdown (or md)
Validation:
- Must be one of the supported export formats
- Checked before simulation begins
Error example:
invalid trace export format "yaml" — must be one of: text, json, html, markdown
Fix: use --format html (interactive), json (machine-readable), markdown (shareable), or text (CLI output)
Validation:
- Must be a file path, not a directory path (no trailing
/or\) - Cannot contain null bytes
- Path traversal sequences (
..) trigger a security warning - Parent directory must exist or be creatable
Error examples:
--trace-output "./traces/" looks like a directory path; provide a full file path
Fix: specify a complete file path (e.g. ./traces/trace.html or ./output/trace.json)
Example: glassbox debug --trace-output ./traces/debug-$(date +%Y%m%d).html <tx-hash>
--trace-output "../../../etc/passwd" contains directory traversal sequences (..)
Fix: use absolute paths or relative paths without '..' for security
Example: use './output/trace.html' instead of '../output/trace.html'
Before attempting to write a trace export, the system validates all export parameters using comprehensive validation functions: ValidateTraceExportParams() and ValidateTraceFormatCompatibility().
Checks:
- Trace object is not nil
- Trace contains at least one execution state
- Transaction hash is present and non-empty
- Start and end times are valid (not zero, end >= start)
- Event types are recognized (unrecognized types trigger warnings)
Error example:
trace has no execution states — empty trace cannot be exported
Fix: verify that the trace was captured correctly and contains at least one step
Tip: check that the traced transaction actually executed any code
Another example with time validation:
trace end time is before start time — invalid temporal ordering
Fix: verify the trace timestamps were recorded correctly
Start: 2026-01-02T15:04:05Z, End: 2026-01-02T15:04:00Z
Checks:
- Export format is not empty and is supported
- Output path is not empty
- Output path is not a directory
- Output path does not contain invalid characters
Error example:
export format is empty — must specify one of: html, markdown, json, text
Fix: provide --format html (default), markdown, json, or text
Checks:
- Comment count does not exceed 100
- Individual comment length does not exceed 10,000 characters
- Session metadata keys and values are valid strings
Error example:
too many comments (150) — maximum is 100 comments per trace export
Fix: reduce the number of comments or split into multiple exports
Format compatibility validation is performed by ValidateTraceFormatCompatibility() to ensure trace data is suitable for the target export format. Each format has specific requirements and constraints.
Requirements:
- All trace data must be JSON-serializable
- No circular references
- Step indices must be sequential and match array position
Error example:
trace step mismatch at position 5: expected step 5 but got 10 — trace may be corrupted
Compatibility constraints:
- Traces with >50,000 steps may cause browser rendering to be slow or unresponsive
- Individual error messages >1MB will cause rendering issues
Error example:
trace has 60000 steps — too large for HTML export (browser may become unresponsive)
Fix: use --format json for large traces or filter the trace verbosity
Alternatively: use --trace-verbosity summary to reduce output size
Compatibility constraints:
- Traces with >10,000 steps produce very large markdown files (>1MB)
- Code fence markers (```) in error messages should be reviewed for formatting
Requirements:
- Most permissive format
- No special constraints
Errors that occur during file write operations include detailed remediation:
failed to create trace export directory: permission denied
Directory: /restricted/traces
Fix: ensure you have write permissions to the parent directory
Or choose a different output path with --trace-output
failed to write trace export file: no space left on device
Path: /tmp/trace.html
Fix: ensure you have write permissions and sufficient disk space
Check: ls -la /tmp
failed to generate HTML trace: template execution error: ...
This may indicate invalid trace data or a template rendering error
Check that all trace fields are properly populated
When using --dry-run, trace output configuration is validated without executing the simulation:
glassbox debug --dry-run --trace-output ./invalid/ --network testnet <tx-hash>Output:
Additional environment checks:
[FAIL] Trace output validation failed: --trace-output "./invalid/" looks like a directory path
Fix: ensure trace output path is valid and format is correct
When multiple validation errors are detected, all failures are reported together so they can be fixed in a single pass:
3 trace input validation error(s):
1. invalid --trace-verbosity "ultra" — must be one of: summary, normal, verbose
Fix: use --trace-verbosity normal (default), summary (minimal), or verbose (detailed)
2. invalid trace export format "yaml" — must be one of: text, json, html, markdown
Fix: use --format html (interactive), json (machine-readable), markdown (shareable), or text (CLI output)
3. --trace-output "./traces/" looks like a directory path; provide a full file path
Fix: specify a complete file path (e.g. ./traces/trace.html or ./output/trace.json)
Always run with --dry-run first when setting up trace export in CI/CD:
glassbox debug --dry-run \
--network testnet \
--trace-output ./artifacts/trace.html \
--format html \
<tx-hash>- HTML: Interactive viewing in browsers, best for manual analysis
- JSON: Machine-readable, best for CI/CD and automated processing
- Markdown: Shareable in chat/issues, best for collaboration
- Text: Plain CLI output, best for simple logging
Use dated directories for trace exports:
glassbox debug \
--trace-output "./traces/$(date +%Y-%m-%d)/${TX_HASH}.html" \
--format html \
$TX_HASHFor traces with many steps, validate format compatibility first:
# Check trace size first
glassbox debug --format json $TX_HASH | jq '.States | length'
# Use JSON for very large traces (>1000 steps)
if [ $STEPS -gt 1000 ]; then
glassbox debug --format json --trace-output ./trace.json $TX_HASH
else
glassbox debug --format html --trace-output ./trace.html $TX_HASH
fiCause: The simulator did not produce any diagnostic events.
Solutions:
- Verify the transaction hash is correct
- Run
glassbox doctorto check simulator compatibility - Check that the transaction actually executed on the network
- Ensure the simulator binary is up-to-date
Cause: The trace data structure is corrupted.
Solutions:
- Re-run the debug command to regenerate the trace
- Check for filesystem corruption if using
--save-snapshots - Verify the simulator version matches the CLI version
Cause: Contract arguments exceed browser rendering limits for HTML export.
Solutions:
- Use JSON format instead:
--format json - Filter the trace to specific event types
- Use
--trace-verbosity summaryfor less detail
Cause: Insufficient write permissions to the output directory.
Solutions:
- Choose a different output path with write permissions
- Create the output directory manually with correct permissions
- Check filesystem mount options (read-only mounts)
The glassbox trace command validates its export-related flags in PreRunE before loading or processing any trace file.
Valid values: html, markdown (or md), json, text
Validation:
- Only checked when
--exportis also provided - Must be one of the four supported values (case-insensitive)
- Empty/default value (
html) is always accepted
Error example:
invalid --export-format "yaml" — must be one of: html, markdown, json, text
Fix: use --export-format html (interactive), markdown (shareable), json (machine-readable), or text (plain)
Validation:
- Path must not end with
/or\(directory path guard) - Cannot be combined with
--print - Cannot be combined with
--export-markdown
Error example:
--export "./traces/" looks like a directory path; provide a full file path
Fix: specify a filename (e.g. --export ./traces/output.html)
Example: glassbox trace --export ./traces/report.html execution.json
cannot specify both --export and --print
Fix: use --export to write to a file, or --print to output to stdout — not both
Validation:
- Path must not end with
/or\ - Cannot be combined with
--export
Error example:
--export-markdown "./reports/" looks like a directory path; provide a full file path
Fix: specify a filename (e.g. --export-markdown ./traces/report.md)
Validation:
- Path must not end with
/or\ - Produces a deterministic JSON envelope with
schema_version,generated_at, and a nestedtraceobject
Schema version:
The output envelope always embeds the current schema_version (e.g. "1.0"). The version is defined by the CurrentJSONSchemaVersion constant in the trace package — it is never hardcoded at call sites, so all paths stay in sync automatically when the schema evolves.
Loading files back:
glassbox trace <file> can load files written by --output-json. The loader detects the schema_version string envelope and validates it before parsing:
unsupported schema_version "99.0" in trace file "trace.json"
This binary supports schema versions: "1.0"
Fix: re-export the trace with the current CLI version, or upgrade Glassbox
Files written by a slightly older minor version produce a deprecation warning but load successfully:
Warning: trace file "old-trace.json" uses schema_version "0.9"; current is "1.0"
Consider re-exporting with the current CLI for full compatibility
Validation:
- Path must not end with
/or\ - The trace must contain diagnostic events (error if empty, with remediation)
Error example:
no diagnostic events found in trace — call graph cannot be generated
Possible causes:
- The trace was captured without diagnostic events
- The transaction did not call any contracts
Fix: re-run with a transaction that includes contract calls
Tip: use --trace-verbosity verbose when capturing the trace for maximum detail
Valid values: summary, normal, verbose
Validation:
- Must be one of the three supported values
Error example:
invalid --trace-verbosity "extreme" — must be one of: summary, normal, verbose
Fix: use --trace-verbosity normal (default), summary (minimal), or verbose (detailed)
Validation:
- File must exist on disk
Error example:
--annotations: file not found: "/path/to/annotations.json"
Fix: provide a valid path to an annotations JSON file
Validation:
- File must exist on disk
Error example:
--gas-model: file not found: "/path/to/gas.json"
Fix: provide a valid path to a gas model JSON file
Validation:
- Every value must be in
key=valueformat - Key must not be empty
Error example:
--meta value "no-equals-sign" is not in key=value format
Fix: supply metadata as key=value pairs, e.g. --meta env=testnet --meta version=1.2
Verifies the integrity of an existing trace export file and exits. No trace
file argument is required — the command only reads the export artifact and its
companion .meta.json file.
glassbox trace --verify-export ./artifacts/trace.jsonChecks performed (in order):
- Metadata file exists (
.meta.jsonalongside the export) - Metadata is valid JSON
versionfield in metadata is a recognized schema version- File checksum matches the SHA-256 digest recorded at export time
- Step count in the trace file matches the count recorded in metadata (JSON format only)
- File extension matches the declared format
Success output:
✓ Export integrity verified: ./artifacts/trace.json
Failure output examples:
export integrity check failed for "trace.json":
checksum mismatch
Expected: 3b4c5d...
Actual: 9f2c41...
The trace file may have been modified or corrupted
Fix: re-export the trace with 'glassbox trace --export <file> --format <fmt> <trace>'
export integrity check failed for "trace.json":
metadata file records unsupported schema_version "99.0"
Supported versions: "1.0"
Fix: re-export the trace with the current CLI version, or upgrade Glassbox
--verify-export exits with a non-zero code on any failure, making it suitable
for CI gates:
glassbox trace --verify-export ./artifacts/trace.json && echo "artifact OK"Validation: The path must exist and be readable. A missing file is caught
in PreRunE alongside other flag errors.
All failures are collected and reported together:
2 trace command validation error(s):
1. invalid --export-format "yaml" — must be one of: html, markdown, json, text
Fix: use --export-format html (interactive), markdown (shareable), json (machine-readable), or text (plain)
2. --export "./traces/" looks like a directory path; provide a full file path
Fix: specify a filename (e.g. --export ./traces/output.html)
When the trace file argument does not exist:
trace file not found: "execution.json"
Fix: verify the path is correct and the file exists
Tip: trace files are produced by 'glassbox debug --trace-output <file>'
trace file is required
Usage: glassbox trace <trace-file>
Or: glassbox trace --file <trace-file>
Run 'glassbox trace --help' for all available options
The --output-json flag produces a structured envelope with an explicit schema_version field. This section explains how Glassbox handles schema versioning, loading older files, and detecting incompatible versions.
Schema versions use MAJOR.MINOR notation (e.g. "1.0"):
- MAJOR changes indicate breaking structural changes to the envelope or field layouts. Files from a different major version cannot be loaded.
- MINOR changes add new optional fields. Files from older minor versions load with a deprecation warning. Files from newer minor versions that are explicitly listed in
SupportedJSONSchemaVersionsalso load successfully.
The current schema version constant is CurrentJSONSchemaVersion = "1.0".
Glassbox uses two different JSON shapes depending on the export path:
| Flag | Envelope shape | Version field |
|---|---|---|
--output-json |
{"schema_version":"1.0","generated_at":"...","trace":{...}} |
String: "1.0" |
--export --format json |
{"version":{"major":1,"minor":0,"patch":0},"trace":{...}} |
Semver object |
glassbox trace detects and handles both shapes automatically. The detection is done by probing for the schema_version string key (ExportJSON shape) versus the version object key (VersionedTrace shape).
unsupported schema_version "99.0" in trace file "trace.json"
This binary supports schema versions: "1.0"
Fix: re-export the trace with the current CLI version, or upgrade Glassbox
Warning: trace file "old-trace.json" uses schema_version "0.9"; current is "1.0"
Consider re-exporting with the current CLI for full compatibility
Files produced before the schema envelope was introduced load with a warning:
Warning: loaded legacy trace format (no version info)
Consider re-exporting with current version for full compatibility
ValidateJSONSchemaVersion(version string) error can be called independently to validate any schema version string before file I/O. It rejects:
- Empty or whitespace-only strings
- Strings not in
MAJOR.MINORformat - Non-numeric components
- Version strings not present in
SupportedJSONSchemaVersions
All errors include a Fix: hint and reference the current expected version.
All trace export output paths go through a security-aware validation layer before any file I/O begins. This section describes what is checked, what errors are produced, and how the checks differ from a simple trailing-slash guard.
Every output path flag (--export, --output-json, --export-svg, --export-markdown, --snapshot) and every input path flag (--annotations, --gas-model) is now processed through:
- Null-byte rejection — paths containing
\x00are rejected immediately (shell injection risk) filepath.Clean+filepath.Abs— resolves.and..components to their absolute form before any existence check- Symlink resolution —
filepath.EvalSymlinksis called so that a symlink pointing outside an allowed root is caught, not just the raw string - Existing-directory guard — if the path already refers to a directory on disk, the write is rejected with a message that includes the flag name and a suggested filename
For input paths the validator additionally checks that the file exists and is not a directory.
All path errors include the flag name (--export, --output-json, etc.) so the failing flag is unambiguous:
Null byte:
--export: path contains null bytes and cannot be used: "/path/to/trace\x00.html"
Existing directory:
--output-json: "/traces" is a directory; provide a full file path (e.g. "/traces/output.json")
Missing input file:
--annotations: file not found: "/path/to/annotations.json"
Check that the path is correct and the file exists
Path traversal (--trace-output via ValidateTraceInputs):
--trace-output "../../../etc/passwd" contains directory traversal sequences (..)
Fix: use absolute paths or relative paths without '..' for security
Example: use './output/trace.html' instead of '../output/trace.html'
The old traversal check used strings.Contains(path, "..") which produced false positives for filenames that legitimately contain double dots (e.g. my..trace.html) and could miss Windows-style traversal paths.
The new check uses filepath.Clean first:
cleaned := filepath.Clean(outputPath)
if cleaned == ".." || strings.HasPrefix(cleaned, ".."+string(filepath.Separator)) {
// traversal detected
}This correctly:
- Accepts
my..trace.html(double dot in filename, not a traversal component) - Rejects
../trace.htmland../../etc/passwdafter cleaning - Handles both POSIX (
/) and Windows (\) separators
| Flag | Command | Validator |
|---|---|---|
--export |
trace |
ValidateOutputPath → NormalizePath |
--output-json |
trace |
ValidateOutputPath → NormalizePath |
--export-svg |
trace |
ValidateOutputPath → NormalizePath |
--export-markdown |
trace |
ValidateOutputPath → NormalizePath |
--annotations |
trace |
ValidateInputPath → NormalizePath |
--gas-model |
trace |
ValidateInputPath → NormalizePath |
| trace file argument | trace |
ValidateInputPath → NormalizePath |
--snapshot (export) |
export |
ValidateOutputPath → NormalizePath |
--audit-log |
all | ValidateOutputPath → NormalizePath |
--trace-output |
debug |
ValidateTraceInputs + ValidateDebugOutputPaths |
--save-snapshots, --export-svg |
debug |
ValidateDebugOutputPaths → NormalizePath |
Before exporting traces that depend on snapshot data (sandboxed replay, step
navigation), Glassbox validates snapshot coverage using
ValidateSnapshotForExport. This surfaces snapshot problems early — before
the expensive export operation begins — so users get a clear, actionable error
rather than a partial or silently broken export.
| Condition | Error produced |
|---|---|
| Simulation hit an OOM condition | Snapshot capture failed due to memory pressure |
| Steps executed but zero snapshots captured | No snapshots were captured |
| Snapshot count far below expected coverage | Sparse snapshot coverage warning |
snapshot capture failed due to memory pressure (OOM) — trace export may be incomplete
The simulation ran out of memory before all snapshots could be saved.
Fix: re-run with a smaller transaction or increase the simulator memory limit
Tip: use --trace-verbosity summary to reduce memory usage during capture
no snapshots were captured during simulation (250 steps executed, 0 snapshots) —
sandboxed replay and step-navigation will be unavailable
Possible causes:
- Snapshot interval is set too high (no step hit the interval)
- Simulator version does not support snapshot capture
Fix: lower --snapshot-interval or re-run with a simulator that supports snapshots
Tip: run 'glassbox doctor' to check simulator snapshot support
sparse snapshot coverage: 2 snapshot(s) for 1000 steps (expected at least 5) —
step-navigation may jump large gaps
Fix: lower --snapshot-interval to capture more frequent snapshots
Current coverage: 1 snapshot per ~500 steps
The validator expects at minimum 1 snapshot per 200 steps. This matches the
default snapshot interval. If you use a higher --snapshot-interval, the sparse
coverage warning may trigger for long-running transactions — lower the interval
or acknowledge the reduced navigation granularity.
When a trace is exported with resilience options enabled (ExportWithResilience), a companion .meta.json file is written alongside the trace. This file records:
version— the schema version of the export envelopeformat— the export format (html,json,markdown,text)transaction_hash— the transaction the trace belongs toexported_at— wall-clock time of the exportstep_count— number of execution steps in the trace at export timechecksum— SHA-256 hex digest of the trace file contentcli_version— Glassbox CLI version that produced the exporthostname— machine that produced the export (omitted if unavailable)
Use VerifyExport(tracePath) (or the equivalent API call) to verify a previously exported trace:
if err := trace.VerifyExport("./output/trace.json"); err != nil {
fmt.Fprintf(os.Stderr, "Trace integrity check failed: %v\n", err)
}Checks performed:
| Check | Error produced |
|---|---|
| Metadata file missing | Descriptive note that the file can still be used but integrity cannot be verified |
| Metadata file corrupt | failed to parse metadata file with corruption hint |
Metadata version field unsupported |
metadata file records unsupported schema_version with supported list and upgrade hint |
| Checksum mismatch | checksum mismatch with expected/actual values and re-export hint |
| Step count mismatch (JSON only) | step count mismatch with recorded vs actual count and truncation hint |
| Format/extension mismatch | format mismatch with re-export hint |
Metadata version error example:
metadata file records unsupported schema_version "99.0"
Supported versions: "1.0"
Fix: re-export the trace with the current CLI version, or upgrade Glassbox
Metadata files produced before schema versioning was introduced carry an empty
version field. These are accepted without error — the integrity checks
(checksum, step count, format) still apply.
Step count mismatch error example:
step count mismatch
Metadata records 50 steps, trace file contains 12 steps
The trace file may have been truncated, appended to, or partially overwritten
Fix: re-export the trace with glassbox debug --trace-output
RecoverTrace(tracePath) performs best-effort recovery of a JSON trace export that may be partially corrupted or have mismatched metadata. It:
- Runs
VerifyExportfirst — surfaces any checksum or step-count mismatch as a warning before attempting content recovery. Missing metadata is silently accepted. - Parses the JSON with progressive tolerance (strict → lenient → unknown-fields allowed).
- Sanitizes the recovered trace — fixes zero timestamps, step index mismatches, missing transaction hashes, and truncates excessively long error strings.
- Validates the sanitized trace for structural correctness.
All warnings and repairs are returned as a slice of errors alongside the recovered trace object, so callers can surface the information at the appropriate severity level.
recovered, warnings := trace.RecoverTrace("./corrupted/trace.json")
if recovered == nil {
log.Fatalf("unrecoverable: %v", warnings)
}
for _, w := range warnings {
fmt.Fprintf(os.Stderr, "Warning: %v\n", w)
}
// use recovered trace...Only JSON format exports can be recovered. HTML, Markdown, and Text are presentation-only formats and cannot be parsed back to an ExecutionTrace. Always export in JSON format when recovery capability is required.
Glassbox provides a first-class versioned JSON envelope for trace exports that embeds schema version and generation metadata. Use this format when you need reliable round-trip loading, schema compatibility checking, or audit trails.
(*ExecutionTrace).ExportJSON(schemaVersion string, generatedAt time.Time) ([]byte, error)
Produces a JSON envelope of the form:
{
"schema_version": "1.0",
"generated_at": "2026-06-01T12:00:00Z",
"trace": {
"transaction_hash": "sha256:3b4c5d...",
"start_time": "2026-06-01T11:59:55Z",
"end_time": "2026-06-01T12:00:00Z",
"states": [ ... ],
...
}
}Key properties:
| Property | Detail |
|---|---|
schema_version |
Must be a MAJOR.MINOR string (e.g. "1.0"). Use CurrentJSONSchemaVersion in production code. Validated before writing — an invalid or unsupported version is rejected immediately. |
generated_at |
Truncated to second precision in UTC for deterministic output. |
trace.transaction_hash |
SHA-256 fingerprinted ("sha256:<64 hex chars>") — the raw hash never appears in the file. |
| Determinism | Calling ExportJSON twice with identical inputs produces identical bytes. |
| Write-side validation | schemaVersion is validated with ValidateJSONSchemaVersion before any bytes are written, so callers learn about unsupported versions immediately. |
Example (Go):
data, err := trace.ExportJSON(CurrentJSONSchemaVersion, time.Now())
if err != nil {
return err
}
if err := os.WriteFile("trace.json", data, 0o644); err != nil {
return err
}Write-side validation error example:
ExportJSON called with invalid schema_version "99.0": schema_version "99.0" is not supported
Supported versions: "1.0"
Fix: use trace.CurrentJSONSchemaVersion as the schemaVersion argument
Note for tests: If you need to deliberately produce a file with an unsupported schema version (e.g. to exercise error-handling paths in
LoadVersionedTrace), use(*ExecutionTrace).ExportJSONUncheckedinstead. This variant skips the write-side validation and is only intended for test code.
The raw transaction hash is replaced with its SHA-256 digest prefixed by
"sha256:" before writing. This ensures:
- Sensitive or private transaction identifiers do not leak through shared export files.
- The fingerprint is a stable, collision-resistant reference.
An empty transaction hash produces the sentinel value "sha256:(empty)" rather
than the digest of an empty string, making empty-hash conditions unambiguous.
(*ExecutionTrace).SaveToFile(path string) error
Writes the trace as a plain ExecutionTrace JSON object (no envelope, no
schema version field). Use this only for simple persistence or when
interfacing with older tooling that expects the legacy format.
if err := trace.SaveToFile("./trace-plain.json"); err != nil {
log.Fatal(err)
}Note: Files written by
SaveToFilecarry no version information. When loaded byLoadExecutionTrace, a deprecation warning is printed to stderr advising the operator to re-export with the current CLI.
LoadExecutionTrace(path string) (*ExecutionTrace, error)
Single entry-point that loads a trace file regardless of its envelope shape:
| File shape | Detected by |
|---|---|
| ExportJSON envelope | Top-level "schema_version" string key |
| VersionedTrace envelope | Top-level "version" object key |
| Plain ExecutionTrace JSON | Fallback — neither key present |
trace, err := LoadExecutionTrace("./trace.json")
if err != nil {
// Error includes the file path and references glassbox commands:
// failed to load execution trace from "./trace.json": ...
// Verify the file was produced by a glassbox command such as:
// glassbox debug <tx-hash> --trace-output trace.json
log.Fatal(err)
}Internally, LoadExecutionTrace delegates to LoadVersionedTrace with
DefaultCompatibilityOptions(). Schema version validation, version migration,
and deprecation warnings are all handled by that function.
| Constant | Value | Purpose |
|---|---|---|
CurrentJSONSchemaVersion |
"1.0" |
Version embedded by ExportJSON in production |
SupportedJSONSchemaVersions |
["1.0"] |
Versions LoadVersionedTrace accepts without error |
When the schema evolves:
- Patch change (documentation only) — no code change required; the
MAJOR.MINORpair is unchanged. - Minor change (new optional fields) — append the new version string to
SupportedJSONSchemaVersions; files produced by older CLIs continue to load with a deprecation warning. - Major change (breaking) — bump
CurrentJSONSchemaVersionmajor component and add migration logic tomigrateTrace.
Error example for unsupported version:
unsupported schema_version "99.0" in trace file "./old-trace.json"
This binary supports schema versions: "1.0"
Fix: re-export the trace with the current CLI version, or upgrade Glassbox