Delete every artifact of a run; returns the count. Idempotent (a
deleted run lists nothing). The purges call it: pass this store as
artifactStore to BOTH purgeExpiredWorkflowRuns (per aged-out run,
with its snapshot row) and purgeTenant (per surviving run at
offboarding) — the snapshot rows are the only enumerable record of a
run's artifact keys, so an unpaired retention purge strands them.
All artifacts of a run (cursor pagination drained), sorted by name.
Workflow artifact store over an R2 bucket (or any ArtifactBucket, e.g. InMemoryArtifactBucket in tests/dev). Typical step usage:
const artifacts = new R2ArtifactStore(env.ARTIFACTS); await artifacts.put( { workflowId, runId, name: 'reports/summary.md' }, markdown, { contentType: 'text/markdown' }, );