<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Whispart Studio — Process Notes]]></title><description><![CDATA[Whispart Studio — Process Notes]]></description><link>https://whispartstudio.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 28 Oct 2026 10:05:37 GMT</lastBuildDate><atom:link href="https://whispartstudio.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Check Reviewed Artwork Files with SHA-256 Before Upload]]></title><description><![CDATA[An artwork file can keep its name while its bytes change. A new export may replace the file you reviewed yesterday, leaving the publishing form pointed at…]]></description><link>https://whispartstudio.hashnode.dev/check-reviewed-artwork-files-with-sha-256-before-upload</link><guid isPermaLink="true">https://whispartstudio.hashnode.dev/check-reviewed-artwork-files-with-sha-256-before-upload</guid><category><![CDATA[Python]]></category><category><![CDATA[automation]]></category><category><![CDATA[Data Integrity]]></category><dc:creator><![CDATA[Whispart Studio]]></dc:creator><pubDate>Thu, 22 Oct 2026 04:17:31 GMT</pubDate><content:encoded><![CDATA[<p>An artwork file can keep its name while its bytes change. A new export may replace the file you reviewed yesterday, leaving the publishing form pointed at the same path. The upload can succeed even though the review no longer applies.</p>
<p>This note builds a small Python check for that gap: record a file after visual review, then compare it with the saved baseline immediately before selecting it for upload. It uses only the standard library and never changes the image.</p>
<h2>Record the review boundary</h2>
<p>Choose one file you have actually inspected. Save the script below as <code>verify_asset.py</code> beside a copy of that file. A file called <code>artwork.png</code> is used in the commands; substitute your real filename. The manifest stores the filename for reference and a SHA-256 digest for comparison. The check uses the digest, so renaming an unchanged file remains acceptable.</p>
<p>Python's <a href="https://docs.python.org/3/library/hashlib.html">hashlib documentation</a> describes the SHA-256 constructor, incremental updates and hexadecimal digests used here. Reading in chunks avoids loading the entire artwork into memory.</p>
<pre><code class="language-python">"""Record a reviewed file once, then check its bytes before upload."""
import hashlib
import json
from pathlib import Path
import sys


def sha256(path):
    digest = hashlib.sha256()
    with path.open("rb") as source:
        for chunk in iter(lambda: source.read(1024 * 1024), b""):
            digest.update(chunk)
    return digest.hexdigest()


if __name__ == "__main__":
    if len(sys.argv) != 4 or sys.argv[1] not in {"record", "verify"}:
        raise SystemExit("Usage: python verify_asset.py record|verify FILE MANIFEST")
    mode, asset, manifest = sys.argv[1], Path(sys.argv[2]), Path(sys.argv[3])
    actual = sha256(asset)
    if mode == "record":
        with manifest.open("x", encoding="utf-8") as output:
            json.dump({"filename": asset.name, "sha256": actual}, output, indent=2)
            output.write("\n")
        print("RECORDED: keep this reviewed baseline")
    else:
        expected = json.loads(manifest.read_text(encoding="utf-8"))["sha256"]
        if actual != expected:
            raise SystemExit("STOP: file bytes differ from the reviewed baseline")
        print("MATCH: file bytes match the reviewed baseline")
</code></pre>
<p>After visually reviewing the image, run:</p>
<pre><code class="language-plaintext">python verify_asset.py record artwork.png reviewed.json
python verify_asset.py verify artwork.png reviewed.json
</code></pre>
<p>The first command prints <code>RECORDED</code>; the second prints <code>MATCH</code> when the bytes agree. Keep <code>reviewed.json</code> with the review notes. The script opens a new baseline in exclusive creation mode, so rerunning <code>record</code> cannot silently overwrite the existing review record.</p>
<h2>Exercise the failure before relying on the check</h2>
<p>Make a disposable copy for this experiment. Change that copy, then run <code>verify</code> against the original baseline. The command must exit unsuccessfully and print <code>STOP: file bytes differ from the reviewed baseline</code>. Stop the upload at this point. Inspect the changed image and make a new, separately named baseline only after a new review.</p>
<p>For this note, the script was run against a temporary copy of a supplied Whispart artwork. Recording and unchanged verification passed. Renaming the same bytes also passed. Changing the copy failed verification; trying to overwrite the baseline and checking a missing file both exited unsuccessfully. The supplied artwork itself was left untouched.</p>
<h2>What the result lets you decide</h2>
<p><code>MATCH</code> means the file still matches the bytes recorded at review. It does not decide whether the review was good. It also does not establish authorship, model history, visual fidelity to a different source, or the appearance of a physical print. Re-encoding an otherwise similar PNG can change its digest; that is a file change requiring a decision, rather than evidence that the picture looks worse.</p>
<p>Keep the reviewed file stable between verification and selection in the platform's file chooser, and select that exact file. This standalone script does not lock the file during upload or inspect the platform's converted image. The published page still needs its own visual check.</p>
<p>At Whispart, selected GAN creations are developed into physical wall art and framed artworks. File identity is one small boundary in that work: it keeps an earlier visual decision attached to the file being presented. For the creative context, <a href="https://whispart.com/">explore Whispart's artworks and studio direction</a>.</p>
<p><em>Prepared with AI assistance. The standalone example and the six outcomes described above were checked locally. This article covers file identity, not a finished print proof or a complete provenance system.</em></p>
]]></content:encoded></item></channel></rss>