# Artifacts and Evidence {#sec:artifacts_evidence}

This section reports what the project has actually produced and how each quantitative claim is grounded. Every number below is substituted at render time from the deterministic producer, which reads the repository state at commit {{GNN_GIT_COMMIT}}, so each figure here is regenerated from the artifacts it describes rather than transcribed.

## Model-Family Coverage

GNN ships a curated corpus of model families that exercise the language across the difficulty gradient from minimal parser fixtures to full multi-agent and scaling studies. The manifest registers {{GNN_FAMILY_COUNT}} families ({{GNN_FAMILY_LIST}}) across {{GNN_FAMILY_TARGET_DIR_COUNT}} target directories, and `input/gnn_files` holds {{GNN_INPUT_FAMILY_DIR_COUNT}} corpus directories containing {{GNN_EXAMPLE_COUNT}} concrete example models. The three sets are not coextensive, and the manuscript does not treat them as one. Registered in no family: {{GNN_UNREGISTERED_CORPUS_DIRS}} ({{GNN_UNREGISTERED_CORPUS_DIR_COUNT}} of the {{GNN_INPUT_FAMILY_DIR_COUNT}} corpus directories), covered in [@sec:limitations_next_steps]. {{GNN_UNSCANNED_CORPUS_NOTE}} Each family declares the simulation frameworks it is meant to drive, which is what lets the same text model fan out across the executable-model leg of the Triple Play [@gnn2023]. The families and their declared frameworks are enumerated below.

The exemplar corpus partitions cleanly by model kind, and the partition is itself a token: {{GNN_DISCRETE_EXEMPLAR_COUNT}} of the {{GNN_EXAMPLE_COUNT}} example specifications are discrete-state — the discrete categorical kind and its composed variants — and {{GNN_CONTINUOUS_EXEMPLAR_COUNT}} are continuous linear-Gaussian specifications in the continuous family folder. The cold-start index `input/gnn_files/INDEX.md` catalogues every exemplar with its kind, its task folder, and a suggested reading order, and is the fastest surface for a reader who wants to move from this prose to a runnable file of a given kind.

Families that declare a capability axis (the continuous family declares the continuous-render axis) carry a backend split in [@tbl:model_families] generated directly from the registry's declared capability flags. This avoids a manually copied registry table; actual model admission still depends on the full parameter and composition checks recorded by the renderer. The generated flags describe declared capability, while current-run receipts record which selected backends were actually attempted, unsupported, skipped, or failed. The profiled cross-framework reference uses the continuous family, so it does not establish categorical coverage across the registry ([@tbl:framework_capability] is the per-kind key).

{{GNN_FAMILY_TABLE}}

The family-by-framework structure is shown in @fig:family_matrix, which renders the coverage matrix directly from the family registry rather than from a hand-maintained table.

![Model-family coverage across the registered rendering backends: one row per family from `input/model_family_manifest.json`, one column per backend from `src/gnn/render/framework_registry.py`, and a green cell wherever the family declares that backend in its `frameworks` field. The right-hand count states how many backends each family declares; the grid is deliberately sparse — most families declare a single backend, and only continuous, discrete, and gridworld declare several. Read it as declared intent, not as profiled outcomes: the gates described below supply the outcomes. The matrix is generated from the two registries at commit {{GNN_GIT_COMMIT}}.](../output/figures/gnn_family_framework_matrix.png){#fig:family_matrix width=85%}

These families are not illustrative prose: they are the inputs over which the parser, the type checker, and the cross-framework code generators are exercised, and they are the substrate for the reliability gates described next.

## Semantic-Fidelity and Cross-Framework Reliability Gates

Two command-defined gates check distinct parts of GNN's shared-source contract on selected family fixtures. Both live under `scripts/` and use the family manifest described above. Their actual source-bound command receipts determine the scope and outcome of verification; the presence of a gate is not itself a passing result.

The semantic-fidelity gate, `scripts/run_semantic_fidelity_gate.py`, checks parse–serialize–parse preservation using the versioned `gnn_semantic_contract_v2` contract. It compares model identity, variables, edges, parameter names, shapes, values and metadata, equations, timing, and ontology mappings; the default strict round trip is JSON. Parameter values and their axis order contribute to the contract hash, so changing values without changing shape changes the hash. The digest binds the represented contract; it does not prove that extraction was correct, that generated inference implements the intended mathematics [@dacosta2020], or that independent numerical executions agree. The gate reports scoped fidelity per selected model and format.

A separate numerical witness foundation independently reads a deliberately restricted source subset without importing the production parser or renderer. For a small asymmetric categorical model, exhaustive latent-path enumeration distinguishes filtering on each observation prefix from smoothing on the complete sequence; actual bnlearn filtering is compared with the former. For a passive linear-Gaussian model with rectangular observations, nonzero means and correlated covariances, an independent joint-Gaussian construction conditions each observation prefix and is compared with every posterior mean and full covariance from the generated JAX filter. The first observation uses the declared prior without an extra prediction. Exact source bytes, variable and axis identities, conditioning horizons, numerical precision and quantity-specific tolerances remain explicit. Counterexamples change source identity, orientation, transition/action timing, conditioning, initial prediction, covariance or precision. These finite, source-bound comparisons do not establish universal extraction or backend equivalence, planning correctness or a new Lean proof; formal evidence remains separately scoped.

The replayable `gnn-semantic-witness-v2` receipt retains the exact source, native result and generated-program bytes together with the independently reconstructed reference and per-quantity outcomes. The `gnn witness` interface rebuilds the entire receipt before accepting a passing numerical outcome; saved arrays or a prior verdict cannot replace this reconstruction. FEP_Formal independently replays the same restricted cases with forward Bayes and recursive Kalman/Joseph updates, using different algorithms from finite path enumeration and joint-Gaussian conditioning. Separate Lean checks establish finite-weight normalization and scalar measurement/covariance identities under their explicit assumptions. These scalar laws are a structural analogue of the multidimensional Gaussian fixture, not a proof of its parser, runner or complete translation. Numerical agreement, source custody, actual program execution and formal compilation remain separate evidence planes.

An additional `gnn-semantic-witness-v3` contract admits two independent stationary passive Gaussian agents. It reconstructs their authored source independently, builds the joint block-diagonal Gaussian model and conditions observation prefixes, while retaining complete native JAX child records and their within-agent covariance matrices. A separate FEP adapter checks those same authored inputs and native records with recursive Kalman/Joseph updates. The cross-agent zero covariance is a consequence of the declared product model, not a measured native joint covariance. Separate finite post-evidence product-weight laws and false-claim controls establish their stated algebraic premises; they do not prove Gaussian conditioning, a parser or generated execution. Coupling, shared noise, control and unsupported source or conditioning contracts refuse explicitly.

The generated website exposes reported outcomes through offline status/text filters, posterior and covariance-variance traces, and residual views, with full tables and raw receipts available alongside them. Per-agent selectors and full covariance tables expose retained component results; separate cards show the independent FEP comparisons and finite compiler controls with their stated scope. Changing a display control does not rerun a numerical reference or a proof compiler. Missing or incompatible evidence remains unavailable or refused; an informative visualization cannot strengthen its underlying scientific claim.

The cross-framework reliability gate, `scripts/run_cross_framework_reliability.py`, takes a single GNN model and renders it across multiple simulation backends, then checks that the resulting executable models agree on the structure they were generated from. The reference comparison runs on the {{GNN_CROSS_FRAMEWORK_FAMILY}} family across {{GNN_CROSS_FRAMEWORK_BACKENDS}} — {{GNN_CROSS_FRAMEWORK_BACKEND_COUNT}} independent Active Inference engines spanning the Python and Julia ecosystems [@heins2022]. The family declares {{GNN_CROSS_FRAMEWORK_DECLARED_BACKEND_COUNT}} backends ({{GNN_CROSS_FRAMEWORK_DECLARED_BACKENDS}}); {{GNN_CROSS_FRAMEWORK_UNPROFILED_BACKENDS}} is declared but not among the {{GNN_MAINTAINED_FRAMEWORK_COUNT}} frameworks the gate profiles, so it is excluded from the comparison. Because the same source model drives all {{GNN_CROSS_FRAMEWORK_BACKEND_COUNT}} renderings, source identity helps investigate disagreement. The gate compares shared matrix shapes, trace lengths, timesteps, and reported seeds, recording absent comparable fields separately. These checks do not establish numerical equivalence: a mismatch may arise from extraction, code generation, runtime or toolchain behavior, inference mode, dtype, or a backend defect. Numerical comparisons require compatible models and inference semantics, explicit tolerances, and source-bound numerical witnesses.

Both gates are stated here as commands you can run, not as asserted pass counts. The manuscript deliberately does not quote a fixed number of passing checks: an authoritative result is a retained command receipt bound to its source revision, selected corpus, environment, and artifacts, and binding a frozen count into prose would invite exactly the drift the auto-injection contract exists to prevent.

A third interchange check extends the same discipline across repositories: `scripts/run_geo_interchange_checks.py` validates the committed pin in `.github/gnn-pair.json` against a selected GEO-INFER checkout and replays exported GNN artifacts — the tracked gridworld, a compiled H3 stay/diffuse model, a rectangular Gaussian, and an explicit factored fixture — inside the GEO environment, writing its receipts even on failure. Like the gates above it is stated as a command, not as a pass count, and its pinned pair (`ActiveInferenceInstitute/GEO_INFER` at a recorded revision) is what makes "interchange" a checkable claim rather than a promise.

## Source-Preserving LLM Processing

The LLM analysis step retains exact UTF-8 source parts, task identities, native responses and resumable checkpoints. Its opt-in `joint_source` mode makes a final request containing the original source and all ordered fragment answers for each multipart task; `part_evidence` instead supplies derived answers and source identities. The latter mode does not present the original source jointly, and neither silently substitutes for the other. Every submitted source block, task and output reserve must fit the selected model's context; `joint_source` additionally requires the complete original to fit its final request. Exact source, request, response and dependency hashes bind cache and resume; incomplete or nonterminal native outputs remain unfinished.

Context admission is limited to reviewed Ollama GGUF runtime contracts. It binds the exact model digest, advertised and loaded capacity, request messages, native usage and declared output reserve, with explicit no-shortening controls and overflow refusal. This is admission under a reviewed provider contract, not an independent tokenizer or attention measurement. A retained explicit `qwen3-coder:30b` profile checks controlled cross-part fact recovery and a resume with no new generations; they do not establish general scientific interpretation, arbitrarily large source coverage or another model's completion quality. The website presents retained evidence without strengthening those claims.

## Repository Scale

The repository's scale is itself evidence of the surface that the gates and pipeline cover, and it is reported in @fig:repo_metrics directly from the tracked files at commit {{GNN_GIT_COMMIT}}.

![Repository-scale counts on a logarithmic axis: pipeline steps, model families, registered backends, render-target execution adapters, Model Context Protocol tools, source packages, test files, example models, and documentation files. Every bar is annotated with its exact value, and every value is a producer token read from `output/data/manuscript_variables.json` at commit {{GNN_GIT_COMMIT}} — the same token map that substitutes the prose counts. The figure-freshness suite binds the committed image digest and its recorded producer inputs and counts; semantic content and visual correctness require their own review. The two backend bars are deliberately distinct: *registered backends* ({{GNN_BACKEND_COUNT}}) counts render targets, *render-target adapters* ({{GNN_EXECUTABLE_BACKEND_COUNT}}) counts the render-target subset with implemented Step {{GNN_STEP_EXECUTE}} execution adapters. It excludes the separate execution-only Lean bridge and is not a count of observed native runs. Read the chart as the scale of the surface the pipeline maintains, not as a quality measure.](../output/figures/gnn_repo_metrics.png){#fig:repo_metrics width=80%}

The test suite comprises {{GNN_TEST_FILE_COUNT}} test files containing {{GNN_TEST_COUNT}} test functions, exercising a source base of {{GNN_SRC_PY_FILE_COUNT}} Python files across {{GNN_SRC_PACKAGE_COUNT}} packages ({{GNN_SRC_LOC}} lines of source). The pipeline's step modules — the thin orchestrators named in [@tbl:pipeline_steps] — number {{GNN_MODULE_COUNT}}, one per numbered step. The Model Context Protocol surface — which exposes GNN's capabilities to external agents and tools — provides {{GNN_TOOL_COUNT}} tools across {{GNN_MCP_MODULE_COUNT}} modules. The pipeline itself runs as {{GNN_STEP_COUNT}} steps ({{GNN_STEP_RANGE}}), and {{GNN_OUTPUT_FIGURE_COUNT}} figure artifacts from the rendering of figures, models, and reports are committed under `output/`, of which {{GNN_MANUSCRIPT_FIGURE_COUNT}} are the manuscript's own.

## Claim Discipline

A claim is manuscript-ready only when it is bound to a verifiable artifact. Concretely, every claim in this manuscript must rest on one of four support types:

- A retained passing test or validator command receipt, bound to the source revision, selected inputs, environment, and artifacts — for example a scoped execution of the semantic-fidelity or cross-framework gates above.
- A generated output produced by a deterministic producer, such as the figures rendered from the family and repository scans, or the token values emitted by the manuscript-variable producer that backs every number on this page.
- A source ledger, manifest, or configuration file that fixes a declared value or capability; actual execution still requires its own result receipt.
- A resolved entry in `references.bib` for any external-literature claim [@friston2010; @parr2022].

The pipeline records its own evidence trail under `output/`. The run-level summary is written to `output/PIPELINE_REPORT.md`, and the per-step execution record — including which steps ran, their status, and their artifacts — is captured in `output/00_pipeline_summary`. Readers should use those current-run records and their identity bindings to assess actual pipeline outcomes. Repository counts and declared capability tokens describe the source surface and do not by themselves establish native execution or scientific correctness. When a value would otherwise need a literal number with no producer behind it, the discipline is to omit the number rather than to hard-code it.
