Skip to content

R2 Artifacts

Sentinel stores binary artifacts in Cloudflare R2 under a structured key layout. Each incident gets its own directory.

Name: sentinel-artifacts Binding: ARTIFACTS

sentinel-artifacts/
incidents/{incidentId}/
test-case.ts # Generated reproduction test
test-result.json # Execution result metadata
sample-event.json # Original observability event
patch.diff # Git diff of the fix
pr-body.md # Pull request description

A bun:test TypeScript file generated by the TestGen agent. Contains the reproduction test that confirms the bug exists.

Content-Type: application/typescript Created by: TestGen Example:

import { describe, expect, it } from "bun:test";
describe("Reproduction — /api/users/:id", () => {
it("returns 500 when user ID is malformed", async () => {
const response = await fetch("http://localhost/api/users/invalid%00id");
expect(response.status).toBe(500);
});
});

Metadata about the test execution.

Content-Type: application/json Created by: TestGen Example:

{
"reproductionConfirmed": true,
"generatedAt": "2026-02-20T10:15:00Z"
}

The original Workers Observability event that triggered the incident.

Content-Type: application/json Created by: TestGen Example:

{
"timestamp": "2026-02-20T10:00:00Z",
"serviceName": "my-worker",
"triggerRoute": "/api/users/:id",
"method": "GET",
"statusCode": 500,
"errorMessage": "TypeError: Cannot read properties of undefined (reading 'name')",
"stackTrace": "at handler (/src/handlers/users.ts:42:15)\n..."
}

The git diff output showing exactly what the FixAgent changed.

Content-Type: text/x-diff Created by: FixAgent

The Markdown body of the GitHub Pull Request, including incident details, root cause analysis, fix strategy, and verification checklist.

Content-Type: text/markdown Created by: FixAgent

Every R2 artifact is also tracked in the D1 artifacts table with:

  • incident_id — links back to the incident
  • artifact_type — one of: test_case, test_result, sample_event, patch, pr_body
  • r2_key — the full R2 object key
  • content_type — MIME type
  • size_bytes — artifact size