Skip to content

Artifacts

When a script fails, the fixer needs to see what the script saw. Artifacts are that evidence — captured continuously during the run and packaged only when something breaks.

What’s in a bundle

A failure produces one .tar.gz bundle containing:

FileContents
screenshot-*.pngRolling screenshots — the last 3 before the failure
dom.htmlFull DOM snapshot at the moment of failure
network.jsonRequest/response log (URLs, statuses, timings)
console.jsonConsole messages from the page
actions.jsonEvery Playwright action with arguments and durations
browser-state.jsonBrowser/context state at failure time
trace.zipPlaywright trace — optional, off by default

The DOM snapshot is the star: it’s how the fixing agent discovers that #login-btn became #signin-button without ever re-running your script.

Where bundles go

  1. Local disk first, always. Artifacts are written to ./autowright-artifacts/ (configurable via localArtifactDir) before any upload is attempted. If storage is down, the evidence still exists.
  2. S3-compatible storage second. The bundle is uploaded to your configured bucket at {scriptId}/{errorHash}.tar.gz — MinIO locally, S3 or any compatible store in production.
  3. Only the URL travels. The service and its database never touch artifact bytes; the fixer downloads the bundle directly from storage when a job starts.

Controlling capture

Capture is tunable per script via the capture block:

autowright: {
scriptId: 'portal-scraper',
capture: {
screenshotCount: 3, // rolling screenshot buffer
dom: true, // DOM snapshot on failure
network: true, // network log
console: true, // console log
tracing: false, // Playwright trace (heavier)
},
}

Credentials are redacted from captured artifacts before upload. See Configuration for storage settings.