Глава V.16
Diagnostics
Diagnostic phases, stable codes, condition data, and failure reports.
Непереведённый текст показан на английском языке
Scope
Use a diagnostic phase and stable code to identify a failure. Canonical condition data carries its meaning. Source paths, translated messages, and stack displays help locate and explain it.
The reader and evaluation cases have distinct phase identities. Their 2.0 expectations follow exact number semantics. Conditions defines guest recovery and terminal failure.
Phase and code
A diagnostic identity combines its phase and stable code. Its data follows the closed catalog. Reading and resolving belong to preparation. Guest Conditions use phase evaluate. Resource exhaustion, admission refusal, profile work, host interruption, and engine defects retain separate identities.
16.1 Identify a failure by phase and code
A diagnostic has a phase, a stable code, and typed canonical parameters. A code alone does not identify the failure. Reader failures and evaluation failures have distinct phase identities. Translated messages and file names do not replace those fields.
Why
The same short code can otherwise describe unrelated failures. Phase and structured data let callers identify the error without parsing human wording.
Identify the evaluation phase
lispex.example.v2.cli-and-diagnostics.domain-identity · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(car input)))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient to complete preparation checks",
"evaluate": "finite values sufficient for the stated finite calculation"
},
"requests": [
{
"input": {
"kind": "empty-list"
}
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"diagnostic": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
}
}
}Вызов продукта
Ожидаемый результат
The failure of car has an evaluation phase and typed domain parameters. Product invocation awaits its 2.0 adapter.
The source and request files express the 2.0 case. The request file is documentation notation. It does not define command options, codec bytes, artifact fields, diagnostic codes or numeric exit values. Each product plan compares the complete authored expectation. Product execution awaits the 2.0 observation adapter.
Report an incomplete source form
lispex.example.v2.cli-and-diagnostics.reader-phase · ред. 4
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
input)
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient to complete preparation checks",
"evaluate": "finite values sufficient for the stated finite calculation"
},
"requests": [
{
"input": {
"kind": "integer",
"value": "0"
}
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
[]Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"prepareReport": {
"kind": "source-bound-failure",
"phase": "read",
"sourceIdentityAvailable": true,
"programIdentityAvailable": false,
"canonicalEvaluationSiteAvailable": false,
"entryEvaluated": false,
"diagnostic": {
"phase": "read",
"code": "source.delimiter",
"data": {
"reason": "unexpected-end"
}
}
},
"diagnostic": {
"phase": "read",
"code": "source.delimiter",
"data": {
"reason": "unexpected-end"
}
},
"exitStatuses": [
10
]
}Вызов продукта
Ожидаемый результат
The reader reports an incomplete form against the exact source. No entry evaluation occurs. Product invocation awaits its 2.0 adapter.
The source and request files express the 2.0 case. The request file is documentation notation. It does not define command options, codec bytes, artifact fields, diagnostic codes or numeric exit values. Each product plan compares the complete authored expectation. Product execution awaits the 2.0 observation adapter.
16.2 Identify every diagnostic by phase and code
A diagnostic identity is the pair of its phase and code. Every identity uses exactly one schema below. A code alone is insufficient.
| Phase | Meaning |
|---|---|
invocation | Command arguments are being checked. |
ingestion | The product is reading an explicitly supplied host operand. |
decode | Preparation is decoding source text. |
read | Preparation is reading source forms. |
normalize | Preparation is checking and normalizing forms. |
resolve | Preparation is resolving lexical and module names. |
prepare | Preparation is completing entry or resource checks. |
admission | The product is checking a request before an admitted evaluation exists. |
evaluate | An admitted request is decoding values, executing, or checking and encoding its result. |
qualification | The selected profile is checking a completed language result. |
evidence | The selected profile is producing or checking required evidence. |
verify | The product is checking supplied verification operands under its finite host budget. |
replay | A rerun differs from its required replay operand. |
render | The product is writing a command result or another requested output. |
host | An operational interruption or engine defect ended the attempt. |
Source and binding failures follow their source, binding, and preparation rules. This table classifies those failures. It adds no source syntax or module loading behavior.
| Phase | Code | Exact data fields |
|---|---|---|
decode | source.encoding | reason uses SourceEncodingReason |
read | source.token | reason uses SourceTokenReason |
read | source.delimiter | reason uses SourceDelimiterReason |
read | source.number | reason uses SourceNumberReason |
normalize | syntax.form | form uses Text, reason uses SyntaxReason |
normalize | binding.initializer | form uses InitializerForm, name uses Text, expected uses InitializerExpectation |
normalize | binding.immutable | name uses Text |
normalize, resolve | binding.duplicate | name uses Text, scope uses BindingScope |
resolve | binding.unresolved | name uses Text |
resolve | module.reference | module uses Text, name uses TextOrFalse, reason uses ModuleReason |
resolve | library.reference | name uses Text, reason uses LibraryReason |
prepare | entry.declaration | reason uses EntryReason |
The condition catalog defines every guest Condition code and its exact semantic field schema. Each becomes a diagnostic with phase evaluate. This chapter imports those codes and schemas without adding members or fields. The typed field rule defines their wire projection.
| Condition field type | Diagnostic field type |
|---|---|
String | Text |
StringOrFalse | TextOrFalse |
Datum | DatumBytes |
| Every other catalog type | The same named type with the serialized form below |
Entry result checks and terminal resource failures have separate identities. They have no guest Condition constructor.
| Phase | Code | Exact data fields |
|---|---|---|
evaluate | value.boundary | reason uses BoundaryReason, count uses Nat, path uses DataPath, actual uses TypeTagOrFalse |
prepare, evaluate | resource.exhausted | stage uses ResourceStage, axis uses ResourceAxis, event uses EventIdentity |
A preparation limit failure uses phase prepare. Its stage records the interrupted preparation step. An evaluation limit failure uses phase evaluate. Its stage records the interrupted evaluation step.
Before a canonical input has been accepted, malformed input uses admission and input.codec. Invalid UTF-8 inside a canonical input packet uses reason invalid-utf8. Source UTF-8 failures use decode and source.encoding. Guest bytevector text conversion uses domain.range with reason invalid-utf8. Input decoding still spends EvaluationLimits. Exhaustion before request identity exists uses admission and input.resource. The charged account does not select the diagnostic phase.
| Phase | Code | Exact data fields |
|---|---|---|
admission | input.codec | reason uses InputCodecReason |
admission | input.resource | axis uses InputResourceAxis |
admission | request.invalid | field uses Text, reason uses RequestReason |
admission | product.unsupported | subject uses ProductSubject, requested uses ContractIdentity |
admission | artifact.invalid | kind uses ArtifactKind, reason uses ArtifactReason |
admission | input.arity | expected uses Nat, actual uses Nat |
admission | input.value | actual uses HostTypeTag, path uses DataPath |
admission | host.envelope | contract uses ContractIdentity, reason uses EnvelopeReason |
admission, qualification | record.key | entry uses Nat, actual uses HostTypeTag |
admission, qualification | record.duplicate | key uses Text, first uses Nat, second uses Nat |
admission, qualification | record.missing | key uses Text |
Record identities describe host record mapping. They do not create a guest record value kind. A missing field is reported only when the selected mapping requires that field.
| Phase | Code | Exact data fields |
|---|---|---|
admission | profile.admission | profile uses Identity, rule uses Identity, reason uses ProfileAdmissionReason |
qualification | profile.qualification | profile uses Identity, rule uses Identity, reason uses QualificationReason |
evidence | profile.evidence | profile uses Identity, requirement uses Identity, reason uses EvidenceReason |
admission, qualification, evidence | profile.budget | profile uses Identity, budget uses HostBudgetFieldName |
Admission produces no canonical evaluation outcome or evaluation receipt. Qualification and evidence reports preserve the completed language outcome and its receipt eligibility. Profile budget failure uses the phase of the interrupted profile work.
| Phase | Code | Exact data fields |
|---|---|---|
verify | verification.failed | check uses VerificationCheck |
verify | verification.budget | budget uses HostBudgetFieldName |
replay | replay.mismatch | component uses ReplayComponent |
invocation | command.invalid | argument uses Nat, reason uses CommandReason |
ingestion | transport.input | operand uses InputOperand, reason uses TransportInputReason |
render | transport.output | channel uses OutputChannel, reason uses TransportOutputReason |
host | host.interrupted | stage uses PhaseTag, reason uses HostReason |
host | engine.defect | stage uses PhaseTag, reason uses DefectReason |
The command argument position starts at zero after the executable token. A missing option value names its introducing option. A missing required option names the end of the argument vector. Input and output transport failures belong to host activity. They do not become guest conditions.
For value.boundary, a count failure has count other than 1, an empty path, and false actual. A non-Datum result uses count 1, its first invalid path, and its type tag. Result checks run after the entry and its guards have returned.
Rows sharing a code have the same field schema. Their phases still distinguish their identities. Unknown pairs are rejected. No historical code is silently renamed.
The typed field rule defines serialized values. Exit mapping maps these phases and failure classes to command status.
Standalone verification uses verify and verification.budget when its finite host budget is exhausted. It preserves recorded outcomes and receipts. It creates no new evaluation receipt.
Evidence bound to another receipt uses verification.failed with evidence-binding. Replay operands bound to different requests use artifact.invalid with identity-mismatch before entry.
The source and preparation mapping assigns these identities to each failed source or prepared artifact check.
Identity work uses the diagnostic of the operation that owns its finite account. A refused host work reservation during profile admission uses admission/profile.budget; during qualification or evidence it uses that phase and profile.budget. The required profile field is the already selected builtin ProfileContractIdentity, and budget is work. Standalone verification work uses verify/verification.budget with budget = work. These closed catalog pairs also apply when hashing, rather than another host check, is the rejected work. Identity helpers do not reclassify such refusals as input.resource or spend EvaluationLimits. Physical host failures retain the host rows. Preparation and evaluation account refusals retain their own resource rows. This mapping selects no new hash event, coefficient, budget default, or check order.
Why
The phase distinguishes failures that have different request and receipt boundaries. Stable codes and typed fields make product behavior comparable. Keeping host admission and profile work separate preserves the result already computed by the language.
Identity hashing uses the host work account of the operation that requests it. The complete event schedule and effective profile host budget remain in Profiles, while the diagnostic catalog fixes their wire observations.
Distinguish source decoding and form failures
lispex.example.v2.cli-and-diagnostics.diagnostics.source-phases · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) input))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) input))
)
#lang lispex
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) input))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) input)
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (guard (condition (else 0) (#t 1)) input)))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) missing))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient through the stated preparation check",
"evaluate": "finite values sufficient through the stated evaluation and reporting checks"
},
"sourceByteNotation": "sourceBytesHex supplies exact source bytes for that case. It does not define a public bundle encoding.",
"requests": [
{
"sourceBytesHex": "ff",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"sourceBytesHex": "ff"
}
]
},
{
"source": "bom.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "bom.scm"
}
]
},
{
"source": "directive.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "directive.scm"
}
]
},
{
"source": "unclosed.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "unclosed.scm"
}
]
},
{
"source": "guard.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "guard.scm"
}
]
},
{
"source": "unresolved.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "unresolved.scm"
}
]
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
source.encodingПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "decode",
"code": "source.encoding",
"data": {
"reason": "invalid-utf8"
}
},
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}source.tokenПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "read",
"code": "source.token",
"data": {
"reason": "unexpected-source-scalar"
}
},
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}source.tokenПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "read",
"code": "source.token",
"data": {
"reason": "unsupported-reader-prefix"
}
},
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}source.delimiterПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "read",
"code": "source.delimiter",
"data": {
"reason": "unexpected-end"
}
},
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}syntax.formПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "normalize",
"code": "syntax.form",
"data": {
"form": "guard",
"reason": "else-position"
}
},
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}binding.unresolvedПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "resolve",
"code": "binding.unresolved",
"data": {
"name": "missing"
}
},
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"reports": {
"sourceBound": true,
"programIdentityAvailable": false,
"canonicalEvaluationSiteAvailable": false,
"guestControlEntered": false
}
}Вызов продукта
Ожидаемый результат
Invalid bytes fail decoding. A leading mark and directive fail reading. Form and binding failures retain their own phases. Product execution awaits its 2.0 adapter.
The request uses documentation notation. A fixtureIdentity, fixtureEvent, or fixtureBudgetField stands for the owning contract value. These markers are not serialized field values. Product execution remains not-run.
Distinguish static bindings from runtime calls
lispex.example.v2.cli-and-diagnostics.diagnostics.bindings-and-calls · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (set! input 1)))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (let ((x 1) (x 2)) x)))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (letrec ((x 1)) x)))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (0 1)))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) ((lambda (a b) a) 1)))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (+ (values 1 2) 3)))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient through the stated preparation check",
"evaluate": "finite values sufficient through the stated evaluation and reporting checks"
},
"requests": [
{
"source": "source.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
},
{
"source": "duplicate.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "duplicate.scm"
}
]
},
{
"source": "initializer.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "initializer.scm"
}
]
},
{
"source": "not-callable.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "not-callable.scm"
}
]
},
{
"source": "arity.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "arity.scm"
}
]
},
{
"source": "values.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "values.scm"
}
]
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
binding.immutableПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "normalize",
"code": "binding.immutable",
"data": {
"name": "input"
}
},
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}binding.duplicateПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "normalize",
"code": "binding.duplicate",
"data": {
"name": "x",
"scope": "let"
}
},
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}binding.initializerПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "normalize",
"code": "binding.initializer",
"data": {
"form": "letrec",
"name": "x",
"expected": "lambda"
}
},
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}runtime.not-callableПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"diagnostic": {
"phase": "evaluate",
"code": "runtime.not-callable",
"data": {
"actual": "integer"
}
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}runtime.arityПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"diagnostic": {
"phase": "evaluate",
"code": "runtime.arity",
"data": {
"minimum": "2",
"maximum": "2",
"actual": "1"
}
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}runtime.value-countПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"diagnostic": {
"phase": "evaluate",
"code": "runtime.value-count",
"data": {
"expected": "1",
"actual": "2"
}
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"conditions": {
"onlyEvaluateRowsHaveGuestConditions": true,
"procedureAddressReported": false,
"countsUseExactDecimalStrings": true
}
}Вызов продукта
Ожидаемый результат
Static binding failures stop preparation. Runtime call failures use the same Condition identities on every product. Product execution awaits its 2.0 adapter.
The request uses documentation notation. A fixtureIdentity, fixtureEvent, or fixtureBudgetField stands for the owning contract value. These markers are not serialized field values. Product execution remains not-run.
Locate value boundaries and equality failures
lispex.example.v2.cli-and-diagnostics.diagnostics.values-and-equality · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (lambda () 7)))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (values 1 2)))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (eq? (vector 1) #f)))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (equal? (list 1 (lambda () 0)) '(1 2))))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient through the stated preparation check",
"evaluate": "finite values sufficient through the stated evaluation and reporting checks"
},
"requests": [
{
"source": "source.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
},
{
"source": "count.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "count.scm"
}
]
},
{
"source": "scalar.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "scalar.scm"
}
]
},
{
"source": "nested.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "nested.scm"
}
]
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
value.boundaryПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"diagnostic": {
"phase": "evaluate",
"code": "value.boundary",
"data": {
"reason": "non-datum",
"count": "1",
"path": [],
"actual": "procedure"
}
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}value.boundaryПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"diagnostic": {
"phase": "evaluate",
"code": "value.boundary",
"data": {
"reason": "count",
"count": "2",
"path": [],
"actual": false
}
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}domain.equalityПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"diagnostic": {
"phase": "evaluate",
"code": "domain.equality",
"data": {
"operation": "eq?",
"operand": "0",
"path": [],
"actual": "vector"
}
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}domain.equalityПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"diagnostic": {
"phase": "evaluate",
"code": "domain.equality",
"data": {
"operation": "equal?",
"operand": "0",
"path": [
{
"kind": "cdr"
},
{
"kind": "car"
}
],
"actual": "procedure"
}
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"recovery": {
"boundaryHasGuestCondition": false,
"equalityHasGuestCondition": true,
"pathStartsAtNamedOperand": true,
"sourceCoordinatesInData": false
}
}Вызов продукта
Ожидаемый результат
Entry boundaries distinguish result counts from invalid nested values. Equality failures retain the first invalid operand path. Product execution awaits its 2.0 adapter.
The request uses documentation notation. A fixtureIdentity, fixtureEvent, or fixtureBudgetField stands for the owning contract value. These markers are not serialized field values. Product execution remains not-run.
Separate host record mapping from numeric conditions
lispex.example.v2.cli-and-diagnostics.diagnostics.records-and-numbers · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) input))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (/ 1 0)))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (raise (make-condition "domain.numeric" '(("operation" . "quantize") ("argument" . 0) ("reason" . "rounding-required"))))))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient through the stated preparation check",
"evaluate": "finite values sufficient through the stated evaluation and reporting checks"
},
"recordMapping": {
"datumRepresentation": "immutable association list of string-keyed pairs",
"keyOrder": "unsigned UTF-8 bytes",
"duplicates": "reject",
"requiredFields": "only those explicitly named by the selected mapping"
},
"requests": [
{
"input": {
"kind": "host-record",
"fields": [
{
"key": {
"kind": "integer",
"value": "7"
},
"value": {
"kind": "integer",
"value": "1"
}
}
]
}
},
{
"input": {
"kind": "host-record",
"fields": [
{
"key": "a",
"value": {
"kind": "integer",
"value": "1"
}
},
{
"key": "a",
"value": {
"kind": "integer",
"value": "2"
}
}
]
}
},
{
"input": {
"kind": "host-record",
"fields": []
},
"requiredRecordFields": [
"name"
]
},
{
"source": "divide.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "divide.scm"
}
]
},
{
"source": "numeric.scm",
"input": {
"kind": "integer",
"value": "0"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "numeric.scm"
}
]
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
record.keyПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "record.key",
"data": {
"entry": "0",
"actual": "integer"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}record.duplicateПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "record.duplicate",
"data": {
"key": "a",
"first": "0",
"second": "1"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}record.missingПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "record.missing",
"data": {
"key": "name"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}domain.division-by-zeroПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"diagnostic": {
"phase": "evaluate",
"code": "domain.division-by-zero",
"data": {
"operation": "/",
"argument": "1"
}
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}domain.numericПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"diagnostic": {
"phase": "evaluate",
"code": "domain.numeric",
"data": {
"operation": "quantize",
"argument": "0",
"reason": "rounding-required"
}
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"mapping": {
"hostRecordHasGuestValueKind": false,
"recordFailuresEnterGuest": false,
"numericFailuresHaveGuestConditions": true,
"constructedNumericConditionExecutesNamedOperation": false
}
}Вызов продукта
Ожидаемый результат
Host record mapping refuses invalid keys and required fields before entry. Numeric failures retain exact typed arguments and reasons. Product execution awaits its 2.0 adapter.
The request uses documentation notation. A fixtureIdentity, fixtureEvent, or fixtureBudgetField stands for the owning contract value. These markers are not serialized field values. Product execution remains not-run.
Preserve phase and first cause at resource limits
lispex.example.v2.cli-and-diagnostics.diagnostics.resource-phases · ред. 3
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (let loop () (loop))))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (car '())))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient through the stated preparation check",
"evaluate": "finite values sufficient through the stated evaluation and reporting checks"
},
"requests": [
{
"input": {
"kind": "integer",
"value": "0"
},
"limits": {
"prepare": "the next source decoding work reservation fails, while every prior reservation and other axis succeeds"
}
},
{
"input": {
"kind": "integer",
"value": "0"
},
"inputDecode": "the work account exhausts before canonical input validation completes"
},
{
"input": {
"kind": "integer",
"value": "0"
},
"limits": {
"evaluate": "work stops the recursion while every other axis remains sufficient through the terminal report"
}
},
{
"source": "car.scm",
"input": {
"kind": "integer",
"value": "0"
},
"outputDelivery": "stdout transport fails after the car condition and canonical outcome are committed",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "car.scm"
}
]
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
{"kind":"prepare-failure","valueCount":0,"canonicalOutcomeProduced":false,"evaluationReceiptEligible":false,"diagnosticIdentity":{"phase":"prepare","code":"resource.exhausted"},"resource":{"stage":"decode","axis":"work","fixtureEvent":"first denied source decoding event"}}Подробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false,
"diagnosticIdentity": {
"phase": "prepare",
"code": "resource.exhausted"
},
"resource": {
"stage": "decode",
"axis": "work",
"fixtureEvent": "first denied source decoding event"
}
}input.resourceПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "input.resource",
"data": {
"axis": "work"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}resource-stopПодробности результата
{
"kind": "resource-stop",
"valueCount": 0,
"terminal": true,
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true,
"diagnosticIdentity": {
"phase": "evaluate",
"code": "resource.exhausted"
},
"resource": {
"stage": "entry",
"axis": "work",
"fixtureEvent": "first denied evaluation work event"
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"diagnostic": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
}
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"accounting": {
"sourceLimitAccount": "PrepareLimits",
"preidentityInputAccount": "EvaluationLimits",
"chargedAccountIsNotDiagnosticPhase": true,
"numericLimitsSelected": false
},
"presentation": {
"committedFailurePreserved": true,
"secondaryHostDiagnostic": {
"phase": "render",
"code": "transport.output",
"data": {
"channel": "stdout",
"reason": "unwritable"
}
},
"workUsageInDiagnosticData": false
}
}Вызов продукта
Ожидаемый результат
Source limits, preidentity input limits, and admitted execution limits have distinct identities. A later output failure preserves the committed car condition. Product execution awaits its 2.0 adapter.
The request and resource fields use documentation notation. diagnosticIdentity selects only the catalog phase and code. For resource exhaustion, resource.stage, resource.axis, and resource.fixtureEvent constrain the interrupted event without supplying serialized Diagnostic.data. The selected finite model supplies the event identity for the complete typed diagnostic. These selectors are not canonical diagnostic bytes. Product execution remains not-run.
Refuse artifacts and requests before guest entry
lispex.example.v2.cli-and-diagnostics.diagnostics.artifact-admission · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) input))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient through the stated preparation check",
"evaluate": "finite values sufficient through the stated evaluation and reporting checks"
},
"requests": [
{
"input": {
"kind": "integer",
"value": "42"
},
"artifactCandidate": {
"kind": "evaluator-artifact-description",
"hostImports": [
"file-read"
],
"otherAdmissionChecks": "satisfied"
}
},
{
"input": {
"kind": "integer",
"value": "42"
},
"artifactCandidate": {
"kind": "prepared-artifact-description",
"verification": "missing required verification",
"otherAdmissionChecks": "satisfied"
}
},
{
"input": {
"kind": "integer",
"value": "42"
},
"limitsSubmission": {
"defect": "one required field is missing",
"field": "work"
}
},
{
"input": {
"kind": "integer",
"value": "42"
},
"productSupport": {
"requestedResourceModel": {
"fixtureIdentity": "unsupported requested model"
},
"otherAdmissionChecks": "satisfied"
}
},
{
"input": {
"kind": "integer",
"value": "42"
},
"hostCapacity": {
"contract": {
"fixtureIdentity": "requested physical envelope"
},
"requiredPhysicalCapacityAvailable": false
}
},
{
"input": {
"kind": "host-capability",
"description": "a callable supplied by the host"
}
},
{
"inputCodec": {
"validation": "noncanonical submitted input",
"otherAdmissionChecks": "satisfied"
}
},
{
"inputCodec": {
"validation": "invalid UTF-8 inside a canonical text field",
"otherAdmissionChecks": "satisfied"
}
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
artifact.invalidПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "evaluator",
"reason": "host-import"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}artifact.invalidПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "prepared",
"reason": "unverified-content"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}request.invalidПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "request.invalid",
"data": {
"field": "work",
"reason": "missing-field"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}product.unsupportedПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "product.unsupported",
"data": {
"subject": "resource-model",
"requested": {
"fixtureIdentity": "unsupported requested model"
}
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}host.envelopeПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "host.envelope",
"data": {
"contract": {
"fixtureIdentity": "requested physical envelope"
},
"reason": "physical-capacity"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}input.valueПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "input.value",
"data": {
"actual": "host-capability",
"path": []
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}input.codecПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "input.codec",
"data": {
"reason": "noncanonical"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}input.codecПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "input.codec",
"data": {
"reason": "invalid-utf8"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"admission": {
"guestControlEntered": false,
"fallbackAuthorized": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false,
"artifactBytesSpecified": false
}
}Вызов продукта
Ожидаемый результат
Each request has one stated admission defect. The product reports that defect without entering guest code or changing the requested contract. Product execution awaits its 2.0 adapter.
The request uses documentation notation. A fixtureIdentity, fixtureEvent, or fixtureBudgetField stands for the owning contract value. These markers are not serialized field values. Product execution remains not-run.
Preserve language results through profile refusal
lispex.example.v2.cli-and-diagnostics.diagnostics.profile-boundaries · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) 7))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (car '())))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient through the stated preparation check",
"evaluate": "finite values sufficient through the stated evaluation and reporting checks"
},
"importedValues": {
"profile": {
"fixtureIdentity": "selected profile contract"
},
"rule": {
"fixtureIdentity": "selected profile rule"
},
"evidenceRequirement": {
"fixtureIdentity": "required evidence contract"
},
"hostBudgetField": {
"fixtureBudgetField": "the first exhausted selected profile host budget field"
}
},
"requests": [
{
"input": {
"kind": "integer",
"value": "0"
},
"profileWork": "input schema refuses admission"
},
{
"input": {
"kind": "integer",
"value": "0"
},
"profileWork": "output schema refuses the completed integer result"
},
{
"input": {
"kind": "integer",
"value": "0"
},
"profileWork": "required evidence is unavailable after evaluation"
},
{
"input": {
"kind": "integer",
"value": "0"
},
"profileWork": "profile host budget exhausts before admission"
},
{
"input": {
"kind": "integer",
"value": "0"
},
"profileWork": "profile host budget exhausts during qualification"
},
{
"input": {
"kind": "integer",
"value": "0"
},
"profileWork": "profile host budget exhausts during required evidence work"
},
{
"source": "car.scm",
"input": {
"kind": "integer",
"value": "0"
},
"profileWork": "required evidence validation refuses after the recorded evaluation failure",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "car.scm"
}
]
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
profile.admissionПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "profile.admission",
"data": {
"profile": {
"fixtureIdentity": "selected profile contract"
},
"rule": {
"fixtureIdentity": "selected profile rule"
},
"reason": "input-schema"
}
},
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}7Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "7"
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}7Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "7"
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}profile.budgetПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "profile.budget",
"data": {
"profile": {
"fixtureIdentity": "selected profile contract"
},
"budget": {
"fixtureBudgetField": "the first exhausted selected profile host budget field"
}
}
},
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}7Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "7"
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}7Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "7"
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"diagnostic": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
}
},
"canonicalOutcomeProduced": true,
"evaluationReceiptEligible": true
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"profileReports": [
{
"phase": "admission",
"code": "profile.admission",
"data": {
"profile": {
"fixtureIdentity": "selected profile contract"
},
"rule": {
"fixtureIdentity": "selected profile rule"
},
"reason": "input-schema"
}
},
{
"phase": "qualification",
"code": "profile.qualification",
"data": {
"profile": {
"fixtureIdentity": "selected profile contract"
},
"rule": {
"fixtureIdentity": "selected profile rule"
},
"reason": "output-schema"
}
},
{
"phase": "evidence",
"code": "profile.evidence",
"data": {
"profile": {
"fixtureIdentity": "selected profile contract"
},
"requirement": {
"fixtureIdentity": "required evidence contract"
},
"reason": "unavailable-evidence"
}
},
{
"phase": "admission",
"code": "profile.budget",
"data": {
"profile": {
"fixtureIdentity": "selected profile contract"
},
"budget": {
"fixtureBudgetField": "the first exhausted selected profile host budget field"
}
}
},
{
"phase": "qualification",
"code": "profile.budget",
"data": {
"profile": {
"fixtureIdentity": "selected profile contract"
},
"budget": {
"fixtureBudgetField": "the first exhausted selected profile host budget field"
}
}
},
{
"phase": "evidence",
"code": "profile.budget",
"data": {
"profile": {
"fixtureIdentity": "selected profile contract"
},
"budget": {
"fixtureBudgetField": "the first exhausted selected profile host budget field"
}
}
},
{
"phase": "evidence",
"code": "profile.evidence",
"data": {
"profile": {
"fixtureIdentity": "selected profile contract"
},
"requirement": {
"fixtureIdentity": "required evidence contract"
},
"reason": "invalid-evidence"
}
}
],
"preservation": {
"languageOutcomesRewritten": false,
"evaluationFailureOverwrittenByEvidenceRefusal": false,
"profileBudgetAddedToLanguageRequest": false,
"guestRecoveryEntered": false
}
}Вызов продукта
Ожидаемый результат
Admission has no evaluation outcome. Later qualification and evidence refusals preserve completed values and failures. Product execution awaits its 2.0 adapter.
The request uses documentation notation. A fixtureIdentity, fixtureEvent, or fixtureBudgetField stands for the owning contract value. These markers are not serialized field values. Product execution remains not-run.
Hash refusal keeps its host operation phase
lispex.example.v2.cli-and-diagnostics.diagnostics.identity-hash-owner · ред. 1
{
"notation": "documentation-request",
"operation": "identity-host-reservation",
"scope": "Four independent component boundaries with an already selected work owner. These cases do not run qualification after an ineligible outcome or invent a profile event schedule.",
"profileContractInput": {
"kind": "profile",
"name": "base/2",
"definition": {
"format": "lispex.profile-contract/2",
"profile": "base",
"declaration_format": "lispex.profile/2",
"schema_format": "lispex.schema/2",
"work_contract": "lispex.profile-work/2"
}
},
"profileContractIdentityCalculation": {
"preimageHex": "6c69737065782e646174756d2f3200a50208080606646f6d61696e06116c69737065782e636f6e74726163742f3208080606666f726d617406176c69737065782e6964656e746974792d696e7075742f32080806077061796c6f61640808060a646566696e6974696f6e080806126465636c61726174696f6e5f666f726d617406106c69737065782e70726f66696c652f3208080606666f726d617406196c69737065782e70726f66696c652d636f6e74726163742f320808060770726f66696c650604626173650808060d736368656d615f666f726d6174060f6c69737065782e736368656d612f320808060d776f726b5f636f6e747261637406156c69737065782e70726f66696c652d776f726b2f3200080806046b696e64060770726f66696c65080806046e616d650606626173652f320000",
"digestHex": "ee922f05c6247a298f4dcabadaf65f819ee3f3f3a9d15abeda3c9ff704056ab1",
"identityBytesHex": "6c69737065782e646174756d2f320067080806066469676573740a20ee922f05c6247a298f4dcabadaf65f819ee3f3f3a9d15abeda3c9ff704056ab108080606646f6d61696e06116c69737065782e636f6e74726163742f3208080606666f726d617406116c69737065782e6964656e746974792f3200"
},
"remainingWork": "0",
"requiredHashWork": "1",
"reservationEffect": "No hash starts because 1 exceeds 0.",
"cases": [
{
"owner": "profile-work",
"phase": "admission",
"diagnostic": {
"phase": "admission",
"code": "profile.budget",
"data": {
"profile": {
"format": "lispex.identity/2",
"domain": "lispex.contract/2",
"digest": {
"bytevectorHex": "ee922f05c6247a298f4dcabadaf65f819ee3f3f3a9d15abeda3c9ff704056ab1"
}
},
"budget": "work"
}
},
"diagnosticPayloadBytesHex": "6c69737065782e646174756d2f3200b80108080604636f6465060e70726f66696c652e6275646765740808060464617461080806066275646765740604776f726b0808060770726f66696c65080806066469676573740a20ee922f05c6247a298f4dcabadaf65f819ee3f3f3a9d15abeda3c9ff704056ab108080606646f6d61696e06116c69737065782e636f6e74726163742f3208080606666f726d617406116c69737065782e6964656e746974792f320000080806057068617365060961646d697373696f6e00"
},
{
"owner": "profile-work",
"phase": "qualification",
"diagnostic": {
"phase": "qualification",
"code": "profile.budget",
"data": {
"profile": {
"format": "lispex.identity/2",
"domain": "lispex.contract/2",
"digest": {
"bytevectorHex": "ee922f05c6247a298f4dcabadaf65f819ee3f3f3a9d15abeda3c9ff704056ab1"
}
},
"budget": "work"
}
},
"diagnosticPayloadBytesHex": "6c69737065782e646174756d2f3200bc0108080604636f6465060e70726f66696c652e6275646765740808060464617461080806066275646765740604776f726b0808060770726f66696c65080806066469676573740a20ee922f05c6247a298f4dcabadaf65f819ee3f3f3a9d15abeda3c9ff704056ab108080606646f6d61696e06116c69737065782e636f6e74726163742f3208080606666f726d617406116c69737065782e6964656e746974792f320000080806057068617365060d7175616c696669636174696f6e00"
},
{
"owner": "profile-work",
"phase": "evidence",
"diagnostic": {
"phase": "evidence",
"code": "profile.budget",
"data": {
"profile": {
"format": "lispex.identity/2",
"domain": "lispex.contract/2",
"digest": {
"bytevectorHex": "ee922f05c6247a298f4dcabadaf65f819ee3f3f3a9d15abeda3c9ff704056ab1"
}
},
"budget": "work"
}
},
"diagnosticPayloadBytesHex": "6c69737065782e646174756d2f3200b70108080604636f6465060e70726f66696c652e6275646765740808060464617461080806066275646765740604776f726b0808060770726f66696c65080806066469676573740a20ee922f05c6247a298f4dcabadaf65f819ee3f3f3a9d15abeda3c9ff704056ab108080606646f6d61696e06116c69737065782e636f6e74726163742f3208080606666f726d617406116c69737065782e6964656e746974792f320000080806057068617365060865766964656e636500"
},
{
"owner": "standalone-verification",
"phase": "verify",
"diagnostic": {
"phase": "verify",
"code": "verification.budget",
"data": {
"budget": "work"
}
},
"diagnosticPayloadBytesHex": "6c69737065782e646174756d2f32004808080604636f64650613766572696669636174696f6e2e6275646765740808060464617461080806066275646765740604776f726b00080806057068617365060676657269667900"
}
],
"transportNotation": "bytevectorHex denotes the exact bytevector value inside a record. Every diagnosticPayloadBytesHex is a complete D(Diagnostic) packet."
}
Подробности семантикиРезультат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"diagnosticIdentities": [
{
"phase": "admission",
"code": "profile.budget"
},
{
"phase": "qualification",
"code": "profile.budget"
},
{
"phase": "evidence",
"code": "profile.budget"
},
{
"phase": "verify",
"code": "verification.budget"
}
],
"diagnosticPayloadBytesHex": [
"6c69737065782e646174756d2f3200b80108080604636f6465060e70726f66696c652e6275646765740808060464617461080806066275646765740604776f726b0808060770726f66696c65080806066469676573740a20ee922f05c6247a298f4dcabadaf65f819ee3f3f3a9d15abeda3c9ff704056ab108080606646f6d61696e06116c69737065782e636f6e74726163742f3208080606666f726d617406116c69737065782e6964656e746974792f320000080806057068617365060961646d697373696f6e00",
"6c69737065782e646174756d2f3200bc0108080604636f6465060e70726f66696c652e6275646765740808060464617461080806066275646765740604776f726b0808060770726f66696c65080806066469676573740a20ee922f05c6247a298f4dcabadaf65f819ee3f3f3a9d15abeda3c9ff704056ab108080606646f6d61696e06116c69737065782e636f6e74726163742f3208080606666f726d617406116c69737065782e6964656e746974792f320000080806057068617365060d7175616c696669636174696f6e00",
"6c69737065782e646174756d2f3200b70108080604636f6465060e70726f66696c652e6275646765740808060464617461080806066275646765740604776f726b0808060770726f66696c65080806066469676573740a20ee922f05c6247a298f4dcabadaf65f819ee3f3f3a9d15abeda3c9ff704056ab108080606646f6d61696e06116c69737065782e636f6e74726163742f3208080606666f726d617406116c69737065782e6964656e746974792f320000080806057068617365060865766964656e636500",
"6c69737065782e646174756d2f32004808080604636f64650613766572696669636174696f6e2e6275646765740808060464617461080806066275646765740604776f726b00080806057068617365060676657269667900"
],
"deniedBudgetField": "work",
"newIdentityAfterRefusal": false,
"guestEvaluationAccountDebited": false,
"profileContractIdentityBytesHex": "6c69737065782e646174756d2f320067080806066469676573740a20ee922f05c6247a298f4dcabadaf65f819ee3f3f3a9d15abeda3c9ff704056ab108080606646f6d61696e06116c69737065782e636f6e74726163742f3208080606666f726d617406116c69737065782e6964656e746974792f3200"
}Вызов продукта
Ожидаемый результат
The operation owning a failed host hash reservation fixes its diagnostic. Product invocation awaits its 2.0 adapter.
Profile admission, qualification, and evidence share profile.budget but keep their own phase. Standalone verification uses verification.budget in verify. The complete bytes were calculated from the closed Diagnostic catalog, canonical D/R/U/Z, and the exact builtin base/2 contract. The next hash requirement of 1 and remaining work of 0 are explicit component inputs, not a product tariff. No failed case publishes an identity or debits a guest result account.
Typed field spellings
nat = "0" | nonzero digit*
integer = nat | "-" nonzero digit*
hexBytes = hexPair*
hexPair = hexDigit hexDigit
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
nonzero = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
hexDigit = digit | "a" | "b" | "c" | "d" | "e" | "f"
These productions describe string contents. The report contract supplies their surrounding serialization. A hexadecimal string must also decode as the selected canonical Datum codec when used as DatumBytes.
Condition data
Present condition data through the exact phase, code, and typed data fields defined here. Human messages, locale, paths, and stack displays belong to presentation. The source map connects canonical sites to the supplied source.
16.3 Keep condition meaning separate from display
Evaluation reports preserve the canonical failure site and structured condition meaning. Changing a source map, message locale, host path or stack display leaves the canonical outcome unchanged. Guest recovery uses condition data under the Conditions contract.
Why
Callers can replay a failure even when their source layout and diagnostic language differ. A host path or translated sentence should not change a rule decision.
Present the same condition twice
lispex.example.v2.cli-and-diagnostics.condition-display · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(car input)))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient to complete preparation checks",
"evaluate": "finite values sufficient for the stated finite calculation"
},
"requests": [
{
"input": {
"kind": "empty-list"
},
"display": {
"locale": "en",
"sourceLabel": "first.scm",
"stack": "shown"
}
},
{
"input": {
"kind": "empty-list"
},
"display": {
"locale": "ko",
"sourceLabel": "another.scm",
"stack": "hidden"
}
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"comparison": {
"canonicalOutcomeEqual": true,
"canonicalFailureSiteEqual": true,
"typedConditionDataEqual": true
},
"presentation": {
"localeAffectsMeaning": false,
"pathAffectsMeaning": false,
"stackAffectsMeaning": false
}
}Вызов продукта
Ожидаемый результат
Both requests report the same car domain failure despite different presentation settings. Product invocation awaits its 2.0 adapter.
The source and request files express the 2.0 case. The request file is documentation notation. It does not define command options, codec bytes, artifact fields, diagnostic codes or numeric exit values. Each product plan compares the complete authored expectation. Product execution awaits the 2.0 observation adapter.
16.4 Serialize typed diagnostic fields without coercion
A diagnostic field record has exactly the fields below. The data object has exactly the keys in its catalog schema. Every key is required.
| Field | Serialized value |
|---|---|
phase | A string from PhaseTag |
code | The exact string from the selected catalog schema |
data | The typed object declared by that schema |
Field keys use unsigned UTF-8 byte order. DiagnosticPayloadBytes names the encoding of this field record. The same contract defines the surrounding command envelope. This rule fixes the wire projection of semantic field values.
| Type | Serialized form |
|---|---|
Text | A Unicode scalar string with exact case and no normalization |
Operation | Text with the meaning given by the condition catalog |
Nat | A string matching nat in the field grammar |
Integer | A string matching integer |
NatOrFalse | A Nat string or the Boolean false |
TextOrFalse | A Text string or the Boolean false |
TypeTagOrFalse | A TypeTag string or the Boolean false |
Operand | The string 0 or 1 |
DatumBytes | Lowercase hexadecimal bytes from the request's selected canonical Datum codec. Each byte has two digits. There is no prefix. |
Identity | The named identity form from identity encoding |
ContractIdentity | The identity of the selected versioned contract under the same identity encoding |
EventIdentity | The event identifier from the resource event catalog |
HostBudgetFieldName | The exact field name from the profile host work contract |
DataPath | An array of the exact tagged objects below |
The canonical codec defines the complete CanonicalDatumBytes packet nested inside DatumBytes. Diagnostic serialization encodes those bytes as lowercase hexadecimal. It performs no decimal display rounding or alternate value conversion.
| Path segment | Exact object fields |
|---|---|
| Pair car | kind equals car |
| Pair cdr | kind equals cdr |
| Vector index | kind equals index, index uses Nat |
| Record key | kind equals key, key uses Text |
An empty path selects the whole value. Paths retain segment order. The condition catalog gives the ordinary list representation of these segments inside guest data.
| Enum | Exact string members |
|---|---|
PhaseTag | invocation, ingestion, decode, read, normalize, resolve, prepare, admission, evaluate, qualification, evidence, verify, replay, render, host |
TypeTag | The exact members of TypeTag in the condition catalog |
HostTypeTag | Every imported TypeTag, host-record, inexact-number, host-capability, foreign-value |
TypeRequirement | The exact members of TypeRequirement in the condition catalog |
EqualityOperation | The exact members of EqualityOperation in the condition catalog |
RangeReason | The exact members of RangeReason in the condition catalog |
NumericReason | The exact members of NumericReason in the condition catalog |
ConditionReason | The exact members of ConditionReason in the condition catalog |
SourceEncodingReason | invalid-utf8 |
SourceTokenReason | invalid-token, invalid-escape, invalid-scalar, unterminated-string, unsupported-literal, unexpected-source-scalar, unsupported-reader-prefix |
SourceDelimiterReason | unexpected-end, unexpected-close, mismatched-close, improper-form |
SourceNumberReason | invalid-number, zero-denominator, inexact-number |
SyntaxReason | expected-shape, unsupported-form, missing-body, invalid-binding, invalid-formals, invalid-entry, unexpected-definition, guard-variable, guard-body, clause-shape, else-position, else-body, arrow-shape |
InitializerForm | letrec, internal-definition |
InitializerExpectation | lambda |
BindingScope | parameters, let, letrec, body, module, imports, exports |
ModuleReason | missing-module, missing-export, ambiguous-import, duplicate-module, invalid-import |
LibraryReason | unknown-binding, removed-operation |
EntryReason | missing-entry, duplicate-entry, unknown-entry, non-procedure, arity, invalid-initializer |
ResourceStage | decode, read, normalize, resolve, prepare, input-decode, entry, result-check, result-encode |
ResourceAxis | work, allocation, frames, input, result, diagnostic |
InputResourceAxis | work, allocation, input, diagnostic |
InputCodecReason | malformed, noncanonical, trailing-bytes, inexact-value, non-datum, invalid-utf8 |
RequestReason | missing-field, unknown-field, invalid-value, overflow, unlimited |
ProductSubject | language, engine, library, unicode, resource-model, codec, profile, interface |
ArtifactKind | evaluator, prepared, graph, receipt, evidence, request |
ArtifactReason | invalid-format, invalid-integrity, unsupported-contract, missing-dependency, host-import, unverified-content, unknown-diagnostic, identity-mismatch |
EnvelopeReason | unsupported-limits, physical-capacity, unavailable-product |
ProfileAdmissionReason | input-schema, library-exclusion, engine-feature, evidence-prerequisite |
QualificationReason | output-schema, qualification-contract |
EvidenceReason | unavailable-evidence, invalid-evidence, evidence-mismatch |
VerificationCheck | request-identity, program-identity, source-identity, artifact-identity, outcome, evidence, evidence-binding, signature, trust |
ReplayComponent | program, request, outcome |
CommandReason | unknown-command, unknown-option, duplicate-option, missing-operand, unexpected-operand, conflicting-options, invalid-selector, invalid-value |
InputOperand | bundle, artifact, input, limits, profile, receipt, evidence, trust, graph, request |
TransportInputReason | not-found, not-readable, incomplete, invalid-text |
OutputChannel | stdout, stderr, artifact, receipt, graph, report, trace |
TransportOutputReason | unwritable, interrupted |
HostReason | cancelled, physical-exhaustion, unavailable-transport |
DefectReason | invariant-failure, invalid-product-observation |
BoundaryReason | count, non-datum |
Unknown phases, codes, fields, enum strings, and mistyped values are rejected. Extra fields and missing fields are rejected. Products reject numbers where exact integer strings are required. They do not normalize text or repair malformed paths.
An unknown diagnostic identity in a submitted artifact uses artifact.invalid with unknown-diagnostic. Other malformed diagnostic fields use artifact.invalid with invalid-format. A product that emits an invalid diagnostic has an engine.defect with invalid-product-observation.
Source coordinates and canonical sites belong to their source report and outcome envelopes. They are not data fields. Message text, locale, host paths, stacks, elapsed time, and work usage counters stay outside this field record.
The failing event reserves its required diagnostic payload under the resource event order. The failure is committed only after that reservation succeeds. Once committed, its first cause remains fixed. Emergency reporting and human formatting cannot replace it with another semantic failure.
Payload limits use the named resource model limits. No field is silently truncated. Product rendering failure remains a separate host report.
Why
Exact field types prevent host numeric widths and message formats from changing a failure. Explicit paths preserve the first invalid component. The selected canonical codec keeps application data portable while report envelopes remain separately versioned.
Reject coercion and preserve exact field strings
lispex.example.v2.cli-and-diagnostics.diagnostics.typed-diagnostic-fields · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) input))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient through the stated preparation check",
"evaluate": "finite values sufficient through the stated evaluation and reporting checks"
},
"reportCandidates": "Each candidate explicitly names its intended report envelope. The fixture tests diagnostic field schemas. It does not treat an admission report as an evaluation receipt. Report bytes use the owning format contract.",
"requests": [
{
"input": {
"kind": "integer",
"value": "0"
},
"operation": "validate submitted diagnostic field records in receipt descriptions"
}
],
"diagnosticCandidates": [
{
"case": "accepted-arity",
"envelope": "evaluation-receipt-description",
"diagnostic": {
"phase": "evaluate",
"code": "runtime.arity",
"data": {
"minimum": "1",
"maximum": false,
"actual": "0"
}
}
},
{
"case": "accepted-negative-index",
"envelope": "evaluation-receipt-description",
"diagnostic": {
"phase": "evaluate",
"code": "domain.index",
"data": {
"operation": "vector-ref",
"argument": "1",
"index": "-1",
"length": "3"
}
}
},
{
"case": "accepted-raw-key",
"envelope": "admission-report-description",
"diagnostic": {
"phase": "admission",
"code": "record.missing",
"data": {
"key": "é"
}
}
},
{
"case": "unknown-phase",
"envelope": "evaluation-receipt-description",
"diagnostic": {
"phase": "runtime",
"code": "runtime.arity",
"data": {
"minimum": "1",
"maximum": false,
"actual": "0"
}
}
},
{
"case": "code-case",
"envelope": "evaluation-receipt-description",
"diagnostic": {
"phase": "evaluate",
"code": "Domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
}
}
},
{
"case": "numeric-coercion",
"envelope": "evaluation-receipt-description",
"diagnostic": {
"phase": "evaluate",
"code": "runtime.value-count",
"data": {
"expected": 1,
"actual": "2"
}
}
},
{
"case": "leading-zero",
"envelope": "evaluation-receipt-description",
"diagnostic": {
"phase": "evaluate",
"code": "runtime.value-count",
"data": {
"expected": "01",
"actual": "2"
}
}
},
{
"case": "negative-zero",
"envelope": "evaluation-receipt-description",
"diagnostic": {
"phase": "evaluate",
"code": "domain.index",
"data": {
"operation": "vector-ref",
"argument": "1",
"index": "-0",
"length": "3"
}
}
},
{
"case": "extra-message",
"envelope": "evaluation-receipt-description",
"diagnostic": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
},
"message": "pair required"
}
},
{
"case": "extra-path-field",
"envelope": "evaluation-receipt-description",
"diagnostic": {
"phase": "evaluate",
"code": "domain.equality",
"data": {
"operation": "equal?",
"operand": "0",
"path": [
{
"kind": "car",
"index": "0"
}
],
"actual": "procedure"
}
}
}
],
"hexFieldCandidates": [
"00",
"0a",
"ff",
"0A",
"0x0a",
"a"
],
"invalidProductObservation": {
"stage": "evaluate",
"fault": "the product reports a diagnostic with fields outside its declared schema"
},
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
[]Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"acceptedRecords": [
{
"phase": "evaluate",
"code": "runtime.arity",
"data": {
"minimum": "1",
"maximum": false,
"actual": "0"
}
},
{
"phase": "evaluate",
"code": "domain.index",
"data": {
"operation": "vector-ref",
"argument": "1",
"index": "-1",
"length": "3"
}
},
{
"phase": "admission",
"code": "record.missing",
"data": {
"key": "é"
}
}
],
"rejectedRecords": [
{
"defect": "unknown phase",
"diagnostic": {
"phase": "runtime",
"code": "runtime.arity",
"data": {
"minimum": "1",
"maximum": false,
"actual": "0"
}
},
"rejection": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "receipt",
"reason": "unknown-diagnostic"
}
}
},
{
"defect": "code case changed",
"diagnostic": {
"phase": "evaluate",
"code": "Domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
}
},
"rejection": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "receipt",
"reason": "unknown-diagnostic"
}
}
},
{
"defect": "JSON number instead of Nat string",
"diagnostic": {
"phase": "evaluate",
"code": "runtime.value-count",
"data": {
"expected": 1,
"actual": "2"
}
},
"rejection": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "receipt",
"reason": "invalid-format"
}
}
},
{
"defect": "leading zero in Nat string",
"diagnostic": {
"phase": "evaluate",
"code": "runtime.value-count",
"data": {
"expected": "01",
"actual": "2"
}
},
"rejection": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "receipt",
"reason": "invalid-format"
}
}
},
{
"defect": "negative zero in Integer string",
"diagnostic": {
"phase": "evaluate",
"code": "domain.index",
"data": {
"operation": "vector-ref",
"argument": "1",
"index": "-0",
"length": "3"
}
},
"rejection": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "receipt",
"reason": "invalid-format"
}
}
},
{
"defect": "extra presentation field",
"diagnostic": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
},
"message": "pair required"
},
"rejection": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "receipt",
"reason": "invalid-format"
}
}
},
{
"defect": "extra path field",
"diagnostic": {
"phase": "evaluate",
"code": "domain.equality",
"data": {
"operation": "equal?",
"operand": "0",
"path": [
{
"kind": "car",
"index": "0"
}
],
"actual": "procedure"
}
},
"rejection": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "receipt",
"reason": "invalid-format"
}
}
}
],
"lexicalFields": {
"hexAcceptedByGrammar": [
"00",
"0a",
"ff"
],
"hexRejectedByGrammar": [
"0A",
"0x0a",
"a"
],
"hexAcceptanceProvesCanonicalDatum": false,
"datumBytesUseSelectedCanonicalCodec": true,
"unicodeStringPreserved": "é",
"fieldKeysUseUnsignedUtf8Order": true
},
"invalidProductObservation": {
"phase": "host",
"code": "engine.defect",
"data": {
"stage": "evaluate",
"reason": "invalid-product-observation"
}
}
}Вызов продукта
Ожидаемый результат
Field parsing rejects unknown identities, extra keys, numeric coercion, and noncanonical spellings. Lowercase hexadecimal describes codec bytes without selecting a codec. Product execution awaits its 2.0 adapter.
The request uses documentation notation. A fixtureIdentity, fixtureEvent, or fixtureBudgetField stands for the owning contract value. These markers are not serialized field values. Product execution remains not-run.
Preparation reports
A read or normalization failure can occur before any valid canonical program exists. Its preparation report is bound to the exact submitted source. Such a report carries the source location needed for repair. Evaluation locations use canonical sites after preparation succeeds. The identity chapter defines the separate records.
16.5 Bind an early report to source
A read or normalization failure produces a source bound preparation report. It identifies the exact submitted source and stops before entry evaluation. It does not invent a canonical program identity or canonical evaluation site for that failed source.
Why
A malformed source still needs a useful report. Binding the report to submitted bytes preserves its meaning without pretending that program resolution succeeded.
16.6 Source and preparation diagnostic mapping
Source and preparation failures use the catalog identities below. The owning Rules still determine the first failed check. Mapping a failure adds no check and changes no reservation order.
The source order and module order remain authoritative. A diagnostic phase identifies its catalog family. It does not move a check to another step.
| Reader check | Phase | Code | Exact data |
|---|---|---|---|
| Invalid source UTF-8 | decode | source.encoding | reason = invalid-utf8 |
| Invalid bare identifier, character token, token boundary, Boolean token, bracket, or quotation prefix | read | source.token | reason = invalid-token |
| Unknown string or identifier escape | read | source.token | reason = invalid-escape |
| Invalid scalar escape or literal control scalar | read | source.token | reason = invalid-scalar |
| Unterminated string or barred identifier | read | source.token | reason = unterminated-string |
| Unexpected source scalar, including a byte order mark | read | source.token | reason = unexpected-source-scalar |
| Unsupported reader prefix or directive | read | source.token | reason = unsupported-reader-prefix |
| Invalid bytevector element or unsupported unit imaginary literal | read | source.token | reason = unsupported-literal |
| Unfinished list or block comment, or missing quoted or commented datum | read | source.delimiter | reason = unexpected-end |
| Unmatched closing parenthesis | read | source.delimiter | reason = unexpected-close |
| Invalid dotted tail or vector element shape | read | source.delimiter | reason = improper-form |
| Invalid numeric spelling | read | source.number | reason = invalid-number |
| Zero literal denominator | read | source.number | reason = zero-denominator |
| Infinity or NaN spelling | read | source.number | reason = inexact-number |
Numeric token classification follows the reader grammar. A token that enters numeric scanning keeps that classification. An unsupported exactness prefix uses the reader prefix row.
| Binding or form check | Phase | Code | Exact data |
|---|---|---|---|
| Malformed parameter group or parameter identifier | normalize | syntax.form | form = lambda or the written procedure shorthand head define. reason = invalid-formals |
| Malformed binding group, member, or binding identifier | normalize | syntax.form | form is the written owning form head. reason = invalid-binding |
| Missing procedure body | normalize | syntax.form | form = lambda or define. reason = missing-body |
| Definition after an expression outside a guard body | normalize | syntax.form | form = define. reason = unexpected-definition |
| Assignment to an immutable binding | normalize | binding.immutable | name is the assigned identifier |
| Duplicate parameter | normalize | binding.duplicate | name is the repeated identifier. scope = parameters |
| Duplicate parallel let binding | normalize | binding.duplicate | name is the repeated identifier. scope = let |
| Duplicate recursive binding | normalize | binding.duplicate | name is the repeated identifier. scope = letrec |
| Duplicate internal definition | normalize | binding.duplicate | name is the repeated identifier. scope = body |
| Duplicate module definition or import and definition collision | normalize | binding.duplicate | name is the repeated identifier. scope = module |
| Duplicate import local name | normalize | binding.duplicate | name is the repeated local identifier. scope = imports |
| Duplicate export public name | normalize | binding.duplicate | name is the repeated public identifier. scope = exports |
| Non-lambda recursive initializer | normalize | binding.initializer | form = letrec or internal-definition. name is the binding. expected = lambda |
| Unresolved lexical name | resolve | binding.unresolved | name is the unresolved identifier |
| Removed library operation | resolve | library.reference | name is the removed public binding. reason = removed-operation |
For syntax.form, form is the decoded source keyword. Procedure shorthand uses define. Guard clauses and bodies keep the reasons from the guard grammar.
All names preserve their decoded scalar values. Sequential let shadowing remains valid. Its repeated names do not enter a duplicate row.
| Module check | Phase | Code | Exact data |
|---|---|---|---|
| Missing selected root or import target | resolve | module.reference | module is the absent module. name = false. reason = missing-module |
| Duplicate source module name | resolve | module.reference | module is the least duplicated name. name = false. reason = duplicate-module |
| Declared module name differs from the submitted name | normalize | syntax.form | form = module. reason = invalid-binding |
| Repeated module in one import clause | normalize | syntax.form | form = import. reason = invalid-binding |
| Invalid wrapper or clause order | normalize | syntax.form | form = module. reason = expected-shape |
| Invalid module name, import or export binding, or rename member | normalize | syntax.form | form = module, import, or export. reason = invalid-binding |
| Malformed import or export clause | normalize | syntax.form | form = import or export. reason = expected-shape |
| Imported public name is absent | resolve | module.reference | module is the target module. name is the requested public name. reason = missing-export |
| Export has no local binding | resolve | module.reference | module is the exporting module. name is the missing local name. reason = missing-export |
| Dependency cycle or self dependency | resolve | module.reference | module is the active ancestor reached by the first closing edge. name = false. reason = invalid-import |
Cycle selection follows the existing canonical graph traversal. The reported module is the start of that selected cycle.
| Entry check | Phase | Code | Exact data |
|---|---|---|---|
| Malformed entry clause | normalize | syntax.form | form = entry. reason = invalid-entry |
| Root has no entry declaration | prepare | entry.declaration | reason = missing-entry |
| Module repeats its entry declaration | prepare | entry.declaration | reason = duplicate-entry |
| Declared entry has no matching public export | prepare | entry.declaration | reason = unknown-entry |
| Entry initializer is a non-procedure literal | prepare | entry.declaration | reason = non-procedure |
| Entry initializer does not have the required lambda form | prepare | entry.declaration | reason = invalid-initializer |
| Entry lambda does not accept one argument | prepare | entry.declaration | reason = arity |
Entry selection follows the entry Rules. A factory call fails the initializer check without running that call.
| Prepared artifact check | Phase | Code | Exact data |
|---|---|---|---|
| Unsupported version or encoding contract | admission | artifact.invalid | kind = prepared. reason = unsupported-contract |
| Malformed framing, record, index, binding, child, site, tail flag, or event role | admission | artifact.invalid | kind = prepared. reason = invalid-format |
| Missing required submitted dependency | admission | artifact.invalid | kind = prepared. reason = missing-dependency |
| Incompatible fixed identity, dependency identity, or requested program identity | admission | artifact.invalid | kind = prepared. reason = identity-mismatch |
| Reused handle lacks its verified local issuer seal | admission | artifact.invalid | kind = prepared. reason = unverified-content |
Malformed magic uses invalid-format. An understood format with an unsupported version uses unsupported-contract. Artifact mutation labels identify test cases. They are not additional diagnostic reasons.
The validation order decides the first artifact failure. Validation still leaves dynamic call and result checks at evaluation. Preparation exhaustion uses prepare and resource.exhausted. Its data contain the interrupted stage, rejected axis, and required event from the selected resource model.
Some examples leave model fields or host fault details symbolic. Their diagnosticIdentity selects only a phase and code. A separate reason constrains that catalog reason when specified. These are documentation selectors. A product supplies every required typed field in its complete diagnostic. The selectors do not define a report encoding.
Guest failures use the Condition schema. Preparation and admission failures have no guest Condition. Generic resource cases retain their named finite limits under cost-model-freeze.
Why
One identity and one field schema let every product report the same failed check. Existing reasons cover the source and prepared artifact failures. More codes would duplicate their validation families. Product aliases would make equivalent failures differ. The mapping preserves the adopted check order and its resource boundaries.
Reader checks select existing families
lispex.example.v2.cli-and-diagnostics.diagnostics.reader-family-mapping · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) input))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) #u8(256)))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) +i))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) 1x))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) +inf.0))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient to reach the stated validation failure",
"evaluate": "finite values sufficient for the stated finite calculation"
},
"requests": [
{
"source": "bytevector.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "bytevector.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "imaginary.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "imaginary.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "number.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "number.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "inexact.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "inexact.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
source.tokenПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "read",
"code": "source.token",
"data": {
"reason": "unsupported-literal"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}source.tokenПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "read",
"code": "source.token",
"data": {
"reason": "unsupported-literal"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}source.numberПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "read",
"code": "source.number",
"data": {
"reason": "invalid-number"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}source.numberПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "read",
"code": "source.number",
"data": {
"reason": "inexact-number"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
Literal checks retain the token or numeric family selected by the reader. Product execution awaits its 2.0 adapter.
Each case uses the same fixed semantics and sufficient finite preparation limits. The first failed check selects the stated catalog identity. No entry is evaluated.
Source forms, modules, and entry checks keep their identities
lispex.example.v2.cli-and-diagnostics.diagnostics.module-entry-mapping · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) input))
)
(module main
(import (dep a) (dep b))
(export rule)
(entry rule)
(define rule (lambda (input) input))
)
(module dep
(import)
(export a b)
(define a 1)
(define b 2)
)
(module other
(import)
(export rule)
(entry rule)
(define rule (lambda (input) input))
)
(module main
(import (a value))
(export rule)
(entry rule)
(define rule (lambda (input) input))
)
(module a
(import (b (rename value other)))
(export value)
(define value (lambda (input) input))
)
(module b
(import (a (rename value other)))
(export value)
(define value (lambda (input) input))
)
(module main
(import)
(export rule)
(entry rule)
(define rule 7)
)
(module main
(import)
(export rule)
(entry rule)
(define make-rule (lambda () (lambda (input) input)))
(define rule (make-rule))
)
(module main
(import)
(export rule)
(entry rule spare)
(define rule (lambda (input) input))
)
(module main
(import)
(export rule)
(entry missing)
(define rule (lambda (input) input))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (1) 0))
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (let ((1 2)) input)))
)
(module main
(import)
(export rule)
(entry rule)
(define (rule 1) 0)
)
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input)))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient to reach the stated validation failure",
"evaluate": "finite values sufficient for the stated finite calculation"
},
"requests": [
{
"source": "repeated.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "repeated.scm"
},
{
"name": "dep",
"source": "dep.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "mismatch.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "mismatch.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "cycle-main.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "cycle-main.scm"
},
{
"name": "a",
"source": "a.scm"
},
{
"name": "b",
"source": "b.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "nonprocedure.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "nonprocedure.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "factory.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "factory.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "malformed.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "malformed.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "unknown.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "unknown.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "parameter.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "parameter.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "binding.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "binding.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "shorthand.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "shorthand.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
},
{
"source": "body.scm",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "body.scm"
}
],
"input": {
"kind": "integer",
"value": "0"
}
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
syntax.formПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "normalize",
"code": "syntax.form",
"data": {
"form": "import",
"reason": "invalid-binding"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}syntax.formПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "normalize",
"code": "syntax.form",
"data": {
"form": "module",
"reason": "invalid-binding"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}module.referenceПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "resolve",
"code": "module.reference",
"data": {
"module": "a",
"name": false,
"reason": "invalid-import"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}entry.declarationПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "prepare",
"code": "entry.declaration",
"data": {
"reason": "non-procedure"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}entry.declarationПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "prepare",
"code": "entry.declaration",
"data": {
"reason": "invalid-initializer"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}syntax.formПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "normalize",
"code": "syntax.form",
"data": {
"form": "entry",
"reason": "invalid-entry"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}entry.declarationПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "prepare",
"code": "entry.declaration",
"data": {
"reason": "unknown-entry"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}syntax.formПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "normalize",
"code": "syntax.form",
"data": {
"form": "lambda",
"reason": "invalid-formals"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}syntax.formПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "normalize",
"code": "syntax.form",
"data": {
"form": "let",
"reason": "invalid-binding"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}syntax.formПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "normalize",
"code": "syntax.form",
"data": {
"form": "define",
"reason": "invalid-formals"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}syntax.formПодробности результата
{
"kind": "prepare-failure",
"valueCount": 0,
"diagnostic": {
"phase": "normalize",
"code": "syntax.form",
"data": {
"form": "lambda",
"reason": "missing-body"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
Form, module graph, and entry checks use their existing catalog families. Product execution awaits its 2.0 adapter.
Each case uses the same fixed semantics and sufficient finite preparation limits. The first failed check selects the stated catalog identity. No entry is evaluated.
Prepared failures share the closed schema
lispex.example.v2.cli-and-diagnostics.diagnostics.prepared-family-mapping · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) input))
)
Запрос и файлы
[
{
"name": "unknown-version",
"action": "replace-header",
"hex": "4c58424302"
},
{
"name": "trailing-octet",
"action": "append-after-the-final-node",
"hex": "00"
},
{
"name": "library-identity",
"action": "replace-library-identity-with-another-valid-identity"
},
{
"name": "missing-local-issuer-seal",
"action": "submit-an-unsealed-handle-without-full-validation"
}
]
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient to reach the stated validation failure",
"evaluate": "finite values sufficient for the stated finite calculation"
},
"requests": [
{
"operation": "validate-prepared",
"preparedReference": "the canonical bytecode/1 program prepared from source.scm under the fixed semantics",
"mutation": "unknown-version",
"input": {
"kind": "integer",
"value": "0"
}
},
{
"operation": "validate-prepared",
"preparedReference": "the canonical bytecode/1 program prepared from source.scm under the fixed semantics",
"mutation": "trailing-octet",
"input": {
"kind": "integer",
"value": "0"
}
},
{
"operation": "validate-prepared",
"preparedReference": "the canonical bytecode/1 program prepared from source.scm under the fixed semantics",
"mutation": "library-identity",
"input": {
"kind": "integer",
"value": "0"
}
},
{
"operation": "present-copied-fields-as-handle",
"preparedReference": "the verified local handle prepared from source.scm under the fixed semantics",
"mutation": "missing-local-issuer-seal",
"input": {
"kind": "integer",
"value": "0"
}
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
artifact.invalidПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "prepared",
"reason": "unsupported-contract"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}artifact.invalidПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "prepared",
"reason": "invalid-format"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}artifact.invalidПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "prepared",
"reason": "identity-mismatch"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}artifact.invalidПодробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnostic": {
"phase": "admission",
"code": "artifact.invalid",
"data": {
"kind": "prepared",
"reason": "unverified-content"
}
},
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
Prepared artifacts preserve format, contract, identity, and verified-handle distinctions through existing reasons. Product execution awaits its 2.0 adapter.
Each case uses the same fixed semantics and sufficient finite preparation limits. The first failed check selects the stated catalog identity. No entry is evaluated.
Terminal failures
Apply the terminal-failure rule when presenting guest recovery and resource stops. Present earlier failures under the source-bound report rule.
The termination evidence rule separates admission reports, canonical evaluation outcomes, and operational attempts. Qualification and evidence refusal follow the profile work report contract.
16.7 Preserve the first terminal cause
Terminal diagnostic presentation follows the first-failure rule and the terminal-failure rule. Preserve the exhausted axis and canonical site under the canonical-outcome rule. Earlier failures and operational attempts follow their report and receipt boundary.
Why
A caller needs the actual cause of a stopped request. Replacing it with cleanup output or a fallback value would hide the boundary that ended execution.
Stop an unending rule
lispex.example.v2.cli-and-diagnostics.resource-stop · ред. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(let loop ()
(loop))))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient to prepare this rule",
"evaluate": "finite values sufficient to enter the recursive call. The settled event order selects the first exhausted axis."
},
"requests": [
{
"input": {
"kind": "integer",
"value": "0"
}
}
],
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
resource-stopПодробности результата
{
"kind": "resource-stop",
"valueCount": 0,
"terminal": true,
"diagnosticIdentity": {
"phase": "evaluate",
"code": "resource.exhausted"
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"firstCause": {
"preserved": true,
"exhaustedAxisPreserved": true,
"canonicalSitePreserved": true,
"convertedToSuccess": false
},
"returnedControl": true,
"exitClasses": [
"deterministic-failure"
],
"exitStatuses": [
21
]
}Вызов продукта
Ожидаемый результат
The finite request stops with its first resource cause and returns control without a success value. Product invocation awaits its 2.0 adapter.
The source and request files express the 2.0 case. The request file is documentation notation. It does not define command options, codec bytes, artifact fields, diagnostic codes or numeric exit values. Each product plan compares the complete authored expectation. Product execution awaits the 2.0 observation adapter.
Separate interrupted attempts
lispex.example.v2.cli-and-diagnostics.operational-attempts · ред. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
input))
)
Запрос и файлы
{
"notation": "documentation-request",
"source": "source.scm",
"semantics": {
"language": "Lispex 2.0",
"standardLibrary": "one fixed library identity",
"unicode": "one fixed Unicode semantics version",
"resourceModel": "one fixed finite resource model"
},
"limits": {
"prepare": "finite values sufficient to complete preparation checks",
"evaluate": "finite values sufficient for the stated finite calculation"
},
"requests": [
{
"input": {
"kind": "integer",
"value": "42"
},
"hostFault": "controlled cancellation after admission"
},
{
"input": {
"kind": "integer",
"value": "42"
},
"hostFault": "controlled evaluator invariant failure"
}
],
"operationUnderTest": "Use controlled product fault hooks after admission. A physical admission check still applies before execution.",
"rootModule": "main",
"moduleSources": [
{
"name": "main",
"source": "source.scm"
}
]
}
[]Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"attemptReports": [
{
"kind": "operational-interruption",
"semanticReceiptAvailable": false,
"successValueAvailable": false,
"diagnostic": {
"phase": "host",
"code": "host.interrupted",
"data": {
"stage": "evaluate",
"reason": "cancelled"
}
}
},
{
"kind": "engine-defect",
"semanticReceiptAvailable": false,
"successValueAvailable": false,
"diagnostic": {
"phase": "host",
"code": "engine.defect",
"data": {
"stage": "evaluate",
"reason": "invariant-failure"
}
}
}
],
"exitClasses": [
"operational-failure",
"operational-failure"
],
"exitStatuses": [
50,
51
]
}Вызов продукта
Ожидаемый результат
An interrupted attempt and an engine defect produce separate attempt reports without semantic outcomes or receipts. Product invocation awaits its 2.0 adapter.
The source and request files express the 2.0 case. The request file is documentation notation. It does not define command options, codec bytes, artifact fields, diagnostic codes or numeric exit values. Each product plan compares the complete authored expectation. Product execution awaits the 2.0 observation adapter.