Zach SternCommercial lawyer

Work Poiesis

Poiesis · Shared generation

Every file gets a receipt and an expiry date.

Several of my apps share one service, Poiesis, for generating text and images. Each app needs proof of exactly what came back, a clear date when the file goes away, and prompts that don't linger once the job is done.

Component study · eight tests passed on September 19, 2026, with no AI model running

A set lifetime, collected or not.

Fetching a file doesn't extend its deadline, and never fetching it doesn't keep it longer. The tests use sample files and a clock they control.

  1. CreatedThe clock starts.

    The file and its expiry time are recorded.

  2. 24 hoursThe lifetime ends.

    The file's set lifetime is over.

  3. Plus 1 secondRequests are refused.

    A request for the file gets a refusal.

  4. CleanupThe file is deleted.

    A cleanup call deletes the expired file, whether or not anyone collected it.

Follow the five steps.

The eight tests run the service's own code for jobs, images, requests and stored prompts. Each step below covers one or more of them and says what they showed. The steps come from different tests, not one recorded job.

Return the image, then fetch it.

The image engine's code runs, but its request goes to a stand-in that answers with a small PNG image made for the test. The job finishes with exactly those bytes. A second test fetches the image back through the service and checks that it carries an expiry time.

Fingerprint the returned text.

A stand-in text generator sends "Hel" and then "lo" as the text streams in, and returns "Hello". The service records one text file, marks the job complete and stores the exact bytes with their fingerprint.

Refuse the file after its deadline.

The test fetches its sample file once, then moves the test clock to 24 hours and one second after the file was made. The next request for the file is refused. A cleanup call then reports one file deleted.

Delete files nobody collected.

A second sample file is never fetched. At 25 hours, a cleanup call deletes it and leaves the job with no files.

Keep the prompt locked, with its key apart.

Three tests check the stored prompt. It waits in the work queue locked, its key is deleted when the job finishes, and it can't be unlocked under a different job's ID. The next section explains why it's built this way.

Recover the work without keeping the prompt forever.

A worker, the part of the service that runs a job, may fail after accepting it. A second worker needs enough information to carry on. That makes custody of the prompt, meaning who holds it and for how long, a real design problem: making work recoverable also creates something that could be kept too long.

So the locked prompt and its key live in different places. The lock is also tied to the job's ID: a test tries to open the prompt under another job's ID, and it fails.

Work queue

Holds the prompt, encrypted, along with the job's details. A test looks through everything in the queue and finds no readable copy of the prompt.

Job record

Holds the key, apart from the prompt. When the job finishes, the key is deleted. A test keeps a copy of the locked prompt, standing in for a backup, and shows it can no longer be opened.

Where the prompt and its key sit in the tests.

Decide how long each thing is kept.

The prompt and the returned files end in different ways. When a job finishes, the prompt's key is deleted, so the stored prompt becomes unreadable. Returned files expire 24 hours after they're made, and a cleanup call deletes them whether or not anyone collected them. Steps 3, 4 and 5 above show both.

The cost: a set lifetime can make useful content unavailable. Recovery and delivery have to fit inside that limit; retrying forever would defeat it.

What went into this work.

What I did

I decide what each project is for and check what comes back. In July 2026 I decided Poiesis would be a shared service that my other apps call when they need something generated. The rule I set for it: you get back exactly the file that was made, and nothing stays available forever.

What the AI did

AI tools write the code, including the eight tests on this page.

How I work with AI tools

What the eight tests show, and what they leave open.

Recorded
Eight of the service's own tests passed on September 19, 2026, at source revision de39639, with no failures, no skips and no attempted outside connections.
Source
Poiesis is private. The test record, which names each test, is public: artifact-custody-case.json.
Not shown yet
Nothing here proves a stored copy or backup was physically erased, or that a scheduler clears expired files on its own. Every deletion came from a call the test made.
The full record: the eight tests and what they leave open

The eight tests

Each test's name as the record lists it, grouped by the file it lives in and what it covers.

Returned files (steps 1 and 2) · tests/test_executor.py

  • test_a_generation_runs_through_the_real_lifted_engine
  • test_artifacts_are_fetchable_and_carry_an_expiry
  • test_run_text_with_a_sink_streams_and_settles_completed

Expiry (steps 3 and 4) · tests/test_api.py

  • test_artifacts_expire_at_24h_whether_or_not_collected
  • test_expiry_is_not_extended_by_never_fetching

Stored prompts (step 5) · tests/test_durable.py

  • test_the_plaintext_prompt_never_reaches_the_queue_at_all
  • test_shredding_the_key_makes_the_ciphertext_permanently_unreadable
  • test_a_sealed_prompt_cannot_be_moved_to_another_generation

How they ran

The tests ran on Python 3.11 with made-up data, storage held in memory, a clock the tests control and stand-ins for the text and image generators. No AI model, graphics processor or live generation service was called.

Beyond the two gaps in the record above, the tests don't show:

  • Real generation, or how good generated images or text would be.
  • Storage that lasts beyond a test run.
  • A second worker picking up a job after the first one fails.
  • Whether the service stays available in real use.
  • Whether a 24-hour limit fits any wider policy on keeping content.

What a fingerprint shows

The fingerprint identifies the bytes that came back. Authorship, rights, accuracy and quality need separate evidence.

You can check the "Hello" fingerprint yourself: printf 'Hello' | sha256sum prints the same 64 characters.

The record's attribution wording was updated on September 23, 2026, and the note on the 409 refusal was added then from the source. No tests were rerun, and the results didn't change.