Skip to content
Topaz6.0 · Before release
Download

Search documentation

Specification 6.0 · Not released · Tested product 5.21.3

Use arrow keys to choose a result. Press Enter to open.

Type an API name, diagnostic number, rule, or project topic.

    Tools

    compiler validate

    Validates an existing compiler observation bundle.

    Invocation, options and results

    Link

    topaz compiler validate

    Synopsis
    1. topaz compiler validate <dir>

    Input

    Use topaz compiler validate <dir> with exactly one observation directory and no options.

    Reject a missing or extra operand, every compiler, root, language, terminal or format selector, equals forms and all unknown options before loading the bundle.

    Require the admitted observation bundle schema and all mandatory members. Reject malformed JSON or JSON Lines, unsupported schemas, duplicate or unsafe member paths, missing members, digest mismatches, nonregular members and symlinks.

    Options and conflicts

    OptionDefaultContractConflicts

    Output channels

    stdout

    stderr

    Exit status

    0

    The supplied complete observation bundle is valid, including a bundle that records compiler rejection.

    1

    Arguments, input access or observation bundle validation fails.

    Effects

    Read the supplied directory without modifying, repairing or regenerating any member. Reject symlinked members rather than following them outside the bundle.

    Do not allocate a compiler workspace, produce a new bundle, delete extra files or rewrite a digest.

    Perform no network access and no lookup of missing schemas or source files from remote locations.

    The same bundle bytes and member paths under the same validator schema registry produce the same validity result. Directory enumeration order does not affect it.

    Human paths and operating system error details are environmental output. A valid bundle does not depend on the original source tree still being available.

    Do not load a package from the current directory or regenerate package facts. Package and lock facts stored in the bundle are validated as evidence rather than resolved against a live registry.

    The command does not create, verify against the caller package or rewrite its topaz.lock.

    Operation

    Link

    Use validate before comparing or consuming observation files. Validation checks an existing bundle.

    Example contract

    Link
    Ruletools-commands-compiler-validate.rule.invocation

    Example contract

    The invocation topaz compiler validate main.tpz --language-version 5.21 --format json is expected to exit with 1.

    This command does not provide a JSON report format. The invocation is rejected during argument validation before processing the program.

    Why

    This command does not provide a JSON report format. Rejecting the option prevents a successful exit from silently ignoring the requested output format.

    Source evidence

    Behavior contract

    Link
    Ruletools-commands-compiler-validate.rule.behavior

    Command behavior

    Arguments and rejection

    Use topaz compiler validate <dir> with exactly one observation directory and no options.

    Reject a missing or extra operand, every compiler, root, language, terminal or format selector, equals forms and all unknown options before loading the bundle.

    Require the admitted observation bundle schema and all mandatory members. Reject malformed JSON or JSON Lines, unsupported schemas, duplicate or unsafe member paths, missing members, digest mismatches, nonregular members and symlinks.

    Output

    Write one human confirmation identifying the directory and its valid observation status to standard output only after the complete validation succeeds.

    Write the first validation or input failure to standard error and emit no success confirmation for an invalid bundle. There is no stdout JSON report and --format json is rejected.

    Validation covers the manifest, declared members, schemas and internal consistency. It does not claim the observed program compiles successfully or that two different compiler implementations agree.

    Exit status

    Exit 0 for a valid complete observation bundle, including a valid bundle that records a compiler rejection.

    Exit 1 for command misuse, unreadable input, an invalid directory or any bundle validation failure.

    Filesystem effects

    Read the supplied directory without modifying, repairing or regenerating any member. Reject symlinked members rather than following them outside the bundle.

    Do not allocate a compiler workspace, produce a new bundle, delete extra files or rewrite a digest.

    Network access

    Perform no network access and no lookup of missing schemas or source files from remote locations.

    Reproducibility

    The same bundle bytes and member paths under the same validator schema registry produce the same validity result. Directory enumeration order does not affect it.

    Human paths and operating system error details are environmental output. A valid bundle does not depend on the original source tree still being available.

    Packages and locks

    Do not load a package from the current directory or regenerate package facts. Package and lock facts stored in the bundle are validated as evidence rather than resolved against a live registry.

    The command does not create, verify against the caller package or rewrite its topaz.lock.

    Why

    Validation asks whether supplied evidence satisfies its schemas and digests. Recompiling or repairing the bundle would answer a different question and could hide corruption in the original evidence.

    Source evidence

    The linked public CLI recipe checks the exact displayed argument rejection before the requested operation. It does not execute the successful operation or verify its effects.

    The reviewed recipe tests rejection of the unsupported JSON format option. Valid and corrupt observation bundles are outside the single source file execution fixture.

    Example

    Link

    Argument-rejection example

    Link
    main.tpzArgument-rejection exampleOpen in Playground
    1. function identity<T>(value: T) -> T {
    2. value
    3. }
    target product 5.21.3
    Expected result

    Expected result

    Textual rejection details remain Pending in the reference model. The independent Tools example gate expects exit 1.

    This command does not provide a JSON report format. The invocation is rejected during argument validation before processing the program.

    Source evidence

    Verification scope

    Link

    Observed with Topaz 5.21.3 on 2026-11-06T08:36:29.642Z. This invocation passed; exit 1. 3 assertions were evaluated against the independent expected result. Execution record. This result covers the displayed invocation.

    Related references

    Link

    Compiler selection

    Packages, locks and targets

    Menu

    Download