Status: normative draft
Version: 1
Proof obligation: P11
Date: 2026-07-13
Define when a GLYPH evidence bundle is complete, internally consistent, portable, and independently replayable.
P11 establishes the bridge between deterministic evidence artifacts from P10 and the end-to-end verification closure required by P12.
P11 depends on P1 through P10.
In particular:
- P4 defines canonical corpus identity;
- P7 defines canonical locate coordinates;
- P8 defines binary-safe query transport;
- P9 defines document-local boundary semantics;
- P10 defines deterministic authoritative artifact identity.
A valid bundle contains every byte, schema, manifest entry, and replay component required to independently verify its authoritative evidence.
For a valid bundle B:
verify_bundle(B) == PASS
without requiring:
- the GLYPH source repository;
- an existing GLYPH build directory;
- the original absolute source path;
- network access;
- environment-specific configuration;
- hidden files outside the bundle;
- undeclared data dependencies.
A P11 bundle contains exactly one manifest and a declared set of payload files.
Required logical roles:
- evidence artifact;
- source corpus bytes;
- artifact schema;
- independent replay program.
The minimum canonical layout is:
bundle/
bundle_manifest_v1.json
artifact.json
corpus.bin
schema.json
replay.py
Additional files are allowed only when explicitly listed in the manifest.
Unlisted files are forbidden.
The manifest is:
GLYPH_BUNDLE_MANIFEST_V1
It must bind:
- bundle version;
- artifact version;
- required runtime;
- replay entrypoint;
- explicit external dependency list;
- every payload path;
- every payload role;
- every payload byte length;
- every payload SHA256;
- canonical bundle-root SHA256.
The runtime requirement must be explicit.
For the P11 reference fixture:
Python 3
Python standard library only
This is an explicit runtime dependency, not a hidden data dependency.
The bundle must not import GLYPH repository modules.
All manifest paths must be:
- relative;
- slash-separated;
- normalized;
- non-empty;
- unique;
- free of
..; - free of
.path components; - free of absolute roots;
- free of NUL bytes.
Symlinks are forbidden.
Every declared path must resolve inside the bundle root.
Manifest coverage is exact:
declared payload paths
==
actual payload paths excluding the manifest
Therefore:
- a missing declared file is invalid;
- an extra undeclared file is invalid;
- duplicate entries are invalid;
- role duplication for singleton roles is invalid.
Required singleton roles:
artifact;corpus;schema;replay.
For every declared file:
actual_size == manifest.size_bytes
and:
SHA256(actual_bytes) == manifest.sha256
The verifier must read and hash the file itself.
It must not trust hashes copied from the artifact.
The bundle-root digest is:
SHA256(canonical_json(manifest.files))
where manifest.files is canonically sorted by path.
The manifest itself is excluded from the digest preimage to avoid self-reference.
The digest proves internal manifest consistency, not publisher identity or digital signature authenticity.
The schema must explicitly bind the artifact version.
The artifact must satisfy all required fields and declared primitive types.
At minimum, schema validation must check:
- artifact version;
- corpus object;
- corpus path;
- corpus SHA256;
- corpus byte length;
- query hex;
- query byte length;
- query SHA256;
- document-boundary policy;
- exact match count;
- canonical coordinates;
- returned count;
- bounded flag;
- offsets-complete flag;
- byte-check flag.
Unknown schema versions must be rejected.
The artifact must bind the bundled corpus by:
- relative path;
- SHA256;
- byte length.
The verifier must recompute all three.
An artifact referring to an external or absolute corpus path is invalid.
query_hex is authoritative.
The verifier must:
- decode query bytes from lowercase hexadecimal;
- reject malformed or noncanonical hex;
- recompute query length;
- recompute query SHA256.
Display text is never authoritative.
Replay must execute from a directory outside the original repository and must use only bundle-local payload files plus the explicitly declared runtime.
The replay program must independently verify:
- manifest structure;
- exact manifest file coverage;
- path safety;
- file sizes;
- file SHA256 values;
- bundle-root digest;
- schema version;
- artifact-schema consistency;
- corpus identity;
- query identity;
- exact byte matches;
- canonical coordinates;
- match count;
- bounded-locate semantics;
- document-boundary policy;
- byte-check result.
A valid P11 bundle must contain no authoritative dependency on:
- source paths outside the bundle;
- URLs;
- repository-relative paths;
- temporary files;
- environment variables;
- current working directory;
- hostname;
- time;
- random state.
The replay path must not require network access.
A URL or network dependency declared inside authoritative bundle metadata is invalid.
For P11, self-contained means:
all authoritative data and replay logic are inside the bundle
except for the explicitly declared general-purpose runtime:
Python 3 standard library
It does not mean that the Python interpreter itself is embedded in the bundle.
P11 must produce a machine-readable result containing:
p12_ready = true
only if all of the following hold:
- manifest coverage is exact;
- all file hashes match;
- schema matches artifact;
- corpus identity matches;
- query identity matches;
- independent replay succeeds;
- no undeclared external data dependency exists;
- the bundle can be copied to another directory and replayed there;
- all required mutation tests fail.
P12 may consume this result as the bundle node of the end-to-end proof graph.
P11 does not by itself establish the complete P1–P12 chain.
P11 fixtures must include:
- ASCII corpus and query;
- embedded
0x00; 0xFF;- invalid UTF-8;
- zero matches;
- repeated matches;
- bounded locate;
- complete
00..ffbyte alphabet; - bundle copied to a different directory;
- replay launched with isolated Python mode;
- replay launched outside the repository;
- manifest entries presented in noncanonical source order and normalized.
The checker must reject:
- missing artifact;
- missing corpus;
- missing schema;
- missing replay program;
- altered artifact bytes;
- altered corpus bytes;
- altered schema bytes;
- altered replay bytes;
- incorrect file size;
- incorrect file SHA256;
- incorrect bundle-root digest;
- unlisted extra file;
- duplicate manifest path;
- duplicate singleton role;
- absolute path;
- parent traversal path;
- symlink payload;
- schema/artifact-version mismatch;
- missing required artifact field;
- corpus SHA256 mismatch;
- corpus size mismatch;
- malformed query hex;
- query SHA256 mismatch;
- incorrect match count;
- incorrect coordinate;
- unsorted coordinates;
- duplicate coordinates;
- false byte-check;
- wrong boundary policy;
- external corpus path;
- URL dependency;
- undeclared external dependency;
- replay entrypoint outside bundle;
- bundled replay importing repository code;
- bundle copied without one required file;
- manifest role mismatch.
For any valid bundle B:
declared_files(B)
==
actual_payload_files(B)
and for every payload file f:
SHA256(bytes(f))
==
manifest_sha256(f)
and:
independent_replay(B)
==
artifact_authoritative_result(B)
P11 does not establish:
- publisher identity;
- digital signature authenticity;
- legal admissibility;
- semantic truth of source content;
- completeness of an external real-world collection;
- end-to-end closure of every P1–P11 implementation path.
The final proof-chain closure belongs to P12.
P11 is complete only when:
- this specification exists;
- a canonical manifest format exists;
- exact file coverage is verified;
- all payload hashes are independently verified;
- schema and artifact match;
- corpus and query identity match;
- replay succeeds outside the repository;
- copied-bundle replay succeeds;
- no hidden data dependency is required;
- all mutation fixtures are rejected;
- existing
./verify.shremains green; - the checker emits
p12_ready = true.