Seed Diagnostics Surface
This page documents the current diagnostics contract implemented by the stage0 bootstrap seed in both forms:
- executable shell seed:
toolchain/seed/vittec0.seed - canonical readable Vitte source:
toolchain/seed/src/main.vit
Required Phases
Every seed diagnosis must declare a phase. The supported phase names are:
lexerparserast_validationmodule_resolutionsymbol_resolutionsematypeckborrowckmir_loweringmir_verificationbackendlinkerruntime_execution
Phase-less bootstrap messages are not part of the accepted diagnostics surface.
Lexer Coverage
The seed surface currently covers these lexer errors:
LEX_E_INVALID_CHARLEX_E_UNTERMINATED_STRINGLEX_E_INVALID_CHAR_LITERALLEX_E_INVALID_ESCAPELEX_E_INVALID_UNICODELEX_E_INVALID_NUMBERLEX_E_UNTERMINATED_COMMENTLEX_E_TOKEN_TOO_LARGE
Expected payload quality:
- exact failing character or token
- line and column
- byte-oriented hint when the shell surface can compute it
- direct correction help
Parser Coverage
The bootstrap subset currently reports:
PARSE_E_TOPLEVEL_DECL_EXPECTEDPARSE_E_INCOMPLETE_EXPRPARSE_E_UNCLOSED_BLOCKPARSE_E_MISSING_RPARENPARSE_E_MISSING_COMMAPARSE_E_TYPE_EXPECTEDPARSE_E_PATTERN_EXPECTEDPARSE_E_BLOCK_EXPECTED
Expected payload quality:
- expected token
- found token
- syntax context
- recovery applied or not
Module Resolution Coverage
The bootstrap subset currently reports:
MOD_E_MODULE_NOT_FOUNDMOD_E_IMPORT_NOT_FOUNDMOD_E_IMPORT_CYCLEMOD_E_SYMBOL_NOT_EXPORTEDMOD_E_PACKAGE_MISSINGMOD_E_STDLIB_MISSINGMOD_E_AMBIGUOUS_MODULE
Expected payload quality:
- import chain
- tested paths
- request module
- closest-name or closest-path hint
Symbol Resolution Coverage
The bootstrap subset currently reports:
SEMA_E_UNKNOWN_IDENTIFIERSEMA_E_AMBIGUOUS_SYMBOLSEMA_E_DUPLICATE_SYMBOLSEMA_E_SHADOWING_FORBIDDENSEMA_E_UNKNOWN_FIELDSEMA_E_UNKNOWN_VARIANTSEMA_E_UNKNOWN_FUNCTION
Expected payload quality:
- current scope
- closest symbol
- original declaration for duplicates
- active imports
Surfaces
Shell seed
toolchain/seed/vittec0.seed exposes:
- human-readable text diagnostics
- JSON diagnostics with
schema = "vitte.compiler.surface" pipeline_failed_atprimary_reportphase_reports
Vitte seed
toolchain/seed/src/main.vit exposes:
diagnostics_text_for_source(source_name, source)diagnostics_json_for_source(source_name, source)- CLI-like entry points via
run_seed_cli(args) diag <file>diag-json <file>check <file>
The Vitte surface is aligned structurally with the shell seed and is intended to converge toward identical codes and messages for every covered bootstrap case.