Create a compact provenance manifest that identifies the exact weather inputs,
subsets, software, transformations, and output artifacts used by a run. Verify
the manifest before claiming that a result can be replayed or reproduced.
This skill records and checks lineage. It does not discover or download data by
itself; pair it with the appropriate model, observation, radar, or satellite
fetching skill.
deleted after processing.
Do not claim bit-for-bit reproducibility merely because a source URL and run
time were logged.
Decide which claim the workflow supports:
recorded procedure can be rerun.
a pinned environment.
same scientific conclusion within a stated tolerance.
Record the intended claim and its tolerance. Mutable remote objects, floating
software versions, lossy images, parallel reductions, and platform-dependent
code can make the stronger claims impossible.
Use a versioned JSON document. Keep request intent separate from the source that
was actually resolved.
{
"schema_version": 1,
"created_utc": "2026-09-18T09:00:00Z",
"claim": {"level": "replayable", "tolerance": null},
"request": {
"dataset": "hrrr",
"product": "prs",
"requested_valid_time": "2026-09-18T12:00:00Z",
"variables": ["temperature", "relative_humidity"]
},
"resolved": {
"initialization": "2026-09-18T06:00:00Z",
"forecast_hour": 6,
"valid_time": "2026-09-18T12:00:00Z",
"provider": "aws"
},
"inputs": [
{
"role": "pressure_fields",
"uri": "s3://bucket/exact-object-key",
"object_identity": {
"etag": "opaque-identity",
"last_modified": "2026-09-18T07:01:02Z",
"size_bytes": 987654321
},
"selection": {
"inventory_uri": "s3://bucket/exact-object-key.idx",
"inventory_sha256": "HEX_DIGEST",
"byte_ranges": [[1000, 1999], [5000, 6999]]
},
"materialized_sha256": "HEX_DIGEST"
}
],
"processing": {
"software": {"application": "1.2.3", "python": "3.13.7"},
"parameters": {"point": [35.22, -97.44], "nearest_method": "model-aware"},
"transformations": ["decode GRIB2", "convert K to degC"]
},
"artifacts": [
{
"path": "sounding.png",
"media_type": "image/png",
"size_bytes": 123456,
"sha256": "HEX_DIGEST"
}
]
}
Use null for an intentionally absent value and omit fields whose meaning is
unknown. Never fill a required-looking field with a guess.
For each remote object or API response, record as available:
Last-Modified, and content length;An S3 ETag is not always an MD5 digest, particularly for multipart or encrypted
objects. Store it for identity and compute a cryptographic content hash when
the actual bytes must be verified.
The source object alone is insufficient when only part of it was used. Record:
Preserve the order in which selected binary ranges were assembled. Hash the
materialized subset separately from the full remote object's identity.
Use explicit UTC timestamps and name their meaning:
Do not replace these with one ambiguous timestamp field. Record the calendar
and leap-second handling if the source or application requires it.
Capture only details that can change the result:
aggregation rules;
Do not dump an entire environment full of unrelated packages merely because it
is easy. Prefer a lock file plus the versions of software that actually touched
the data.
The Python standard library is sufficient for local artifact hashes and a
canonical, atomically replaced JSON manifest:
import hashlib
import json
import os
from pathlib import Path
def sha256_file(path, chunk_size=1024 * 1024):
digest = hashlib.sha256()
with Path(path).open("rb") as handle:
for chunk in iter(lambda: handle.read(chunk_size), b""):
digest.update(chunk)
return digest.hexdigest()
def write_manifest(path, manifest):
path = Path(path)
temporary = path.with_suffix(path.suffix + ".tmp")
payload = json.dumps(
manifest, ensure_ascii=False, sort_keys=True, separators=(",", ":")
) + "\n"
temporary.write_text(payload, encoding="utf-8", newline="\n")
os.replace(temporary, path)
Hash artifacts only after their writers are closed. If the manifest itself must
be signed, sign the canonical bytes using the project's established signing
workflow rather than inventing a custom scheme.
Before replay:
the reproducibility contract explicitly permits an equivalent replacement.
and tolerances for scientific claims.
original.
Report the first mismatch with its role, expected value, and actual value.
files.
finally so failures and cancellation do not leak largeGRIB2, NetCDF, radar, or observation files.
label the run traceable rather than replayable.
bytes were materialized.
recorded.
strings, private bucket names, or secret environment variables.
manifest.
.. traversal orwrites outside the intended output directory.
upload method. Store it as identity and compute a real local hash.
collapsed into valid time. Record all three.
version or checksum was pinned. Downgrade the claim or retain the input.
byte ranges were omitted.
but not bitwise, reproducible. Define and test a numerical tolerance.
the input bytes or an immutable archive were retained.
captured in a public manifest.
skill, observational truth, or scientific validity.