How it works

How DSE reaches a verdict

Every artefact goes through the same nine phases. The only domain-specific code reads bytes and turns them into facts; everything after that compares facts with a published criterion. This page describes each part and says plainly which of them run today.

  • built runs today
  • partly built some of it runs
  • designed decided and written down, not running

01 · The phases

Nine phases, one procedure

A cycle always ends in one of four verdicts. Changing the profile or re-identifying the artefact happens only between iterations.

  1. 01 · Ingestionbuilt

    Bytes cross a single boundary into memory and are hashed before parsing.

    raw bytes→AssetSnapshot
  2. 02 · Identificationbuilt (GLB/JSON)

    Read from binary magic or declaration, never file extension. Five pre-check gates refuse unmeasurable 3D containers.

    magic bytes→measured type
  3. 03 · Fact extractionbuilt (3D/fiscal)

    Domain extractor converts bytes into facts (including in-memory Draco decode). Measures only—never repairs.

    domain parser→typed facts
  4. 04 · Candidate objectivesengine built

    Facts are matched against catalogue objectives. Missing facts or mismatched units never count as satisfied.

    facts→reachable objectives
  5. 05 · Profile selectioncaller names it

    Caller names a profile (rt-01 or std-fin-es-01) or accepts the single reachable match.

    id + version→profile_hash
  6. 06 · Validationbuilt

    Profile checks run over facts. Fail-closed: blocking fail → non_conformant; unmeasured → incomplete.

    facts × rules→check outcomes
  7. 07 · Correctioninstructions only

    Declared safe repairs run on a copy; every other failure emits an actionable instruction.

    failed checks→instructions / copy
  8. 08 · Revalidationdesigned

    Corrected bytes re-enter at phase 02 as a new execution with a new hash in the same session.

    output_sha256→phase 02
  9. 09 · Verdictbuilt

    Criterion results are aggregated and sealed as canonical ASCII bytes alongside the signable envelope.

    DeterministicResult→result_sha256

02 · Facts

The common fact vocabulary built for 3D and fiscal

A fact is an objective measurement over an artefact, never a judgement. Every fact shares five fields so phases 04–09 are written once across all domains:

key

Namespaced identifier of what was measured.

geometry.triangles
value

Measured value with its declared type.

12 | "121.00"
unit

Physical or logical unit, or explicit null.

m · px · EUR · count
source

Extractor ID, version and byte span read.

dse-glb 0.1.0
confidence

Deterministic origin—never a probability.

measured | derived
Rule 01

Parser boundary

Only phase 03 opens the file; phases 04–09 read facts only.

Rule 02

Objective values

Counts, dimensions, decimals and flags—never opinions.

Rule 03

Explicit absence

Missing data is recorded as absent (→ not_evaluated), never defaulted.

Rule 04

Zero mutation

Extraction never repairs; phase 07 repairs on a copy.

03 · Catalogue

A catalogue that is versioned and frozen

partly built

Checks, objectives, profiles and safe repairs live as immutable data in the catalogue. Changing a threshold publishes a new version; missing versions fail closed rather than falling back.

Built today

Sealed bundle

Compiled from normative files with a bundle_sha256. Every verdict pins its profile ID, version and profile_hash.

spec/→bundle_sha256→profile_hash
Container delivery

Zero runtime drift

Released images embed the frozen catalogue at build time and never fetch rules over the network.

image digest→frozen rules

04 · Session

The validation session

designed

A session links iterative runs (validate → correct → revalidate) into a single append-only audit trail.

Append-only

Immutable history

Every run records its input hash, catalogue version, verdict and canonical bytes.

Standalone

Isolated replay

Each run inside a session can be recomputed standalone from its bytes and profile.

5 runs · 14d

Bounded ceiling

RT-01 allows at most 5 executions per session (14-day idle expiry).

run #1 (input_sha256) → phase 07 correction → run #2 (output_sha256) → ≤ 5 runs

The session engine is implemented and tested in the repository; HTTP session endpoints are not yet exposed.

05 · Correction

Correction produces a new artefact, or an instruction

DSE never mutates the file it was asked to judge.

Bounded safe repair

Automatic, within a declared limit

Only operations declared in the profile's safe_repairs list may run, always on a copy with a measured maximum deviation.

  • New snapshot hashinput_sha256 → output_sha256 linked in the envelope.
  • Full revalidationRepaired bytes return to phase 02 for a fresh verdict.
Instruction only

Human or upstream tool applies the fix

Default mode across profiles (safe_repairs: [] in RT-01 and std-fin-es-01): each failed check outputs what failed, by how much, and the remediation step.

  • Zero silent editsFinancial and legal documents are never rewritten.
  • Machine-readable hintsStructured repair targets per finding (designed).

06 · Reports

One canonical result, one envelope, one readable report

Each run produces two JSON objects with different jobs, and a Markdown rendering for people. Real examples are on the sample report page.

INSIDE THE HASH · DETERMINISTIC DeterministicResult asset_sha256 · profile (id, version, profile_hash) toolchain · checks[] (status, measured, findings) coverage · verdict Canonical ASCII bytes · sort_keys=True · compact SHA-256 result_sha256 64 hex chars Ed25519 sign / verify OUTSIDE THE HASH · AUDIT METADATA AuditEnvelope result_sha256 · issued_at · issuer provenance · transformations[] signature (Ed25519) · human_review One result can have multiple envelopes over time Re-issuing a signature (dse sign) or adding a human review (dse attest) creates a new envelope without moving result_sha256.

Hashed

DeterministicResult

Asset hash, profile (id, version, profile_hash), toolchain versions, one entry per criterion with status, severity, measurements and findings, coverage and the verdict. Nothing about time, host or path. Its canonical bytes (sorted keys, compact separators, ASCII) are what result_sha256 covers.

built

Not hashed

AuditEnvelope

Issue time, issuer, provenance, the ordered list of repairs with their input and output hashes, and optionally a signature and a human review. One result can have several envelopes; re-issuing one never moves the result hash.

built

For people

Readable report

What was analysed, the verdict in plain words, a table of criteria, each failure with its literal evidence and what to do next, and what the report does not claim. Informative only: the JSON is the artefact.

built

passwithin bounds

Measured, and within the threshold.

failout of bounds

Measured, and outside the threshold. The finding says by how much.

not_applicableexplicit rule

Only when the check sheet declares an explicit rule (e.g. density on an untextured mesh).

not_evaluatednever a pass

Not measured, with a public reason code (dependency_unavailable, invalid_measurement).

07 · Signature

What an Ed25519 signature proves

built in the CLI

The signature is detached: it covers the canonical bytes of the result and nothing else, and travels in the envelope. It is checked against a keyring that the person verifying supplies. A key found inside a report is never trusted.

It proves

That whoever signed held the private key matching a public key in your keyring, and that the canonical result bytes have not changed since.

It does not prove

That the artefact conforms to anything, that a person looked at it, who owns the key, or when it was signed. It is not a certification and not a statement of legal compliance.

$ dse sign report.json --private-key key.pem --out report.signed.json
$ dse verify report.signed.json --keyring keyring.json
# exit 0  verified against your keyring
# exit 65 signature present, not verified (unknown key or bad signature)
# exit 66 no signature in the envelope
# exit 64 the verification could not run
Human attestation · CLI

dse attest

Separate human review bound to one result_sha256 (role, timestamp and decision). Never alters the mathematical verdict.

result_sha256+role · decision→envelope
Per-install key · designed

Out-of-band key_id

Each self-hosted container gets its own read-only key at install; its key_id reaches the client on a separate channel.

install key→pinned keyring.json

08 · Reproducibility

What the hash promises, and what it does not

Same bytes + same catalogue version + same released container digest → identical result_sha256.

Toolchain versions (dse-validator, numpy, trimesh, Khronos validator + Node) live inside the hashed result so any dependency change is visible. Across toolchains, semantic equivalence is checked via the toolchain-free projection.

Quantisation lattice

10⁻⁶ m · half-even

Canonical units (m, px/m, B) rounded with ROUND_HALF_EVEN before comparison.

Boundary rules

Inclusive · zero magic epsilons

No hidden float tolerances in code; NaN, ±Inf or -0.0 fail closed as not_evaluated.

09 · Exit codes

The exit code is the verdict

Returned by the CLI and in the Dse-Exit-Code HTTP header so pipelines can gate without parsing JSON.

0conformant

Every applicable criterion measured and within threshold.

1with findings

All blocking criteria pass; advisory findings present.

2non_conformant

At least one blocking criterion failed.

3repair_failed

Safe-repair pipeline missed postconditions; nothing delivered.

4incomplete

At least one blocking criterion could not be measured.

64execution error

Unreadable file, unknown profile or bad CLI flags. No verdict.

65·66verify failure

65 bad/unknown signature · 66 unsigned envelope.

130interrupted

Process interrupted by signal. No verdict.

See it on real files

Four real runs across 3D and Spanish fiscal drafts, with the canonical JSON, the hash you can recompute in the browser and a signature you can check.