Documentation Index
Fetch the complete documentation index at: https://mintlify.com/XxYouDeaDPunKxX/canon-boundary-guard-for-gpt-project/llms.txt
Use this file to discover all available pages before exploring further.
artifact_fingerprint.py produces a JSON array of mechanical fingerprints for
one or more files or directories. For each path it emits the path as given on
the command line, an existence flag, file/directory type, size in bytes,
last-modified time in UTC ISO-8601 format, and a SHA-256 hex digest.
Fingerprinting is the recommended first step when a bundle zip arrives in
/mnt/data — recording the hash before extraction anchors the source identity
required for treating extracted surfaces as L0. The script does not classify
provenance; it only records facts about the file system.
Usage
Arguments
One or more files or directories to fingerprint. Each path is processed
independently. Directories receive size and mtime but no SHA-256 (hashing is
file-only).
JSON indentation level for the output array. Defaults to
2. Pass 0 for
compact single-line output.Output
The script prints a single JSON array to stdout. Each element corresponds to one input path. When the path exists and is a file:path and exists: false are included:
sha256 is omitted; all other fields are
present.
Field reference
| Field | Type | Description |
|---|---|---|
path | string | The path as passed on the command line |
exists | boolean | Whether the path exists on the file system |
is_file | boolean | true when the path is a regular file |
is_dir | boolean | true when the path is a directory |
size_bytes | integer | File or directory size from stat |
mtime_utc | string | Last-modified time as UTC ISO-8601 with timezone offset |
sha256 | string | Full SHA-256 hex digest, present for files only |
How it fits the protocol
Thesha256 value serves as the source identity anchor required when
treating source-staged extractions as L0. Before a bundle zip is extracted, the
protocol requires recording the source zip path and hash — if no anchor is
available, L0 must be limited to the inspected path with a risk note. Running
artifact_fingerprint.py on the zip before extraction produces a
machine-readable record that satisfies this requirement. Store the output
alongside SESSION_STATE or include the hash in active_l0_sources when
initialising state.