Skip to content

The open-source app everyone uses to manage agents at work

fix(evals): keep raw diagnostics out of public history (#13850)

Dotta106d89314fea
diff --git a/tests/runner-e2e/SECURITY.md b/tests/runner-e2e/SECURITY.md
index e499f638d1..2653cec086 100644
--- a/tests/runner-e2e/SECURITY.md
+++ b/tests/runner-e2e/SECURITY.md
@@ -197,8 +197,8 @@ latest pointers are mutable, and S3 versioning makes those updates recoverable.
## Public evidence boundary
CloudFront and GitHub Pages are public. Fixture identifiers, timing, token
-usage, costs, normalized results, allowlisted inert structured per-attempt
-evidence, and trusted runner PNG screenshots are expected public data. Each
+usage, costs, normalized results, and trusted runner PNG screenshots are
+expected public data. Each
public screenshot must carry the explicit `public-runner-fixture` marker in
the normalized result. This includes a `failure.png` capture. Screenshot paths
must be safe PNG basenames and must be tied to the exact normalized execution
@@ -211,8 +211,10 @@ fixed catalog labels and sanitized numeric/status fields. Video, archives,
generated Playwright/blob/HTML report trees, SVG or other active content,
credentials, Paperclip homes, databases, workspaces, master keys,
raw/unredacted logs, unmarked images, and unallowlisted files are not public.
-Allowlisted `.log` copies must pass the existing exact-value/key-shape scan and
-redaction boundary.
+Per-attempt JSON snapshots, result copies, logs, Markdown, and text files stay
+in the retained Actions artifact. Credential redaction does not remove hidden
+reasoning or provider session identities, so a text extension never admits a
+file to the public bundle. Graded results remain in `normalized-results.json`.
The packaged evidence uploaded as a 30-day GitHub Actions artifact has a
different, broader boundary. Text is exact-value and key-shape scanned and
@@ -225,8 +227,9 @@ capture requires review of the visible page state. Videos remain
access-controlled.
Before permanent publication, the campaign publisher creates a separate S3
-stage and retains only allowlisted `.json`, `.log`, `.md`, and `.txt` evidence,
-result PNGs with the explicit `public-runner-fixture` marker.
+stage and retains only result PNGs with the explicit `public-runner-fixture`
+marker under `evidence/`. This applies even to malformed JSON and renamed
+process logs. Original packaged evidence and grades remain unchanged.
It then launches publisher-only Chromium with networking blocked to render one
`public-images/campaign-summary.png`. That fixed-path PNG is capped at 12 MiB
and its signature is validated. Per-attempt XML is excluded because browsers
diff --git a/tests/runner-e2e/dashboard.ts b/tests/runner-e2e/dashboard.ts
index 5537e80c39..4ad7912c25 100644
--- a/tests/runner-e2e/dashboard.ts
+++ b/tests/runner-e2e/dashboard.ts
@@ -1104,7 +1104,7 @@ export function renderRunnerE2EDashboard(input: RunnerDashboardInput) {
<div>
<p class="eyebrow">Full-stack acceptance campaign</p>
<h1>${html(input.title)}</h1>
- <p class="lede">A browser-verified matrix of runner profiles, execution environments, and deterministic task contracts. Declared PNG screenshots and sanitized structured evidence are retained with every published campaign; additional diagnostic evidence remains in the access-controlled workflow artifact.</p>
+ <p class="lede">A browser-verified matrix of runner profiles, execution environments, and deterministic task contracts. Declared PNG screenshots and normalized results are retained with every published campaign; additional diagnostic evidence remains in the access-controlled workflow artifact.</p>
</div>
<div class="report-actions">
<div class="summary" aria-label="Campaign summary">
@@ -1145,7 +1145,7 @@ export function renderRunnerE2EDashboard(input: RunnerDashboardInput) {
</section>
${suiteSections}
${historySection}
- <footer><span>Generated ${html(input.generatedAt)}</span><span>${catalog.length} catalog executions · Declared screenshots and sanitized structured evidence published</span></footer>
+ <footer><span>Generated ${html(input.generatedAt)}</span><span>${catalog.length} catalog executions · Declared screenshots and normalized results published</span></footer>
</main>
<dialog class="gallery-dialog" data-gallery-dialog aria-labelledby="gallery-title">
<div class="gallery-shell">
diff --git a/tests/runner-e2e/history-index.ts b/tests/runner-e2e/history-index.ts
index 1c8e1c7456..ac3f7d23fb 100644
--- a/tests/runner-e2e/history-index.ts
+++ b/tests/runner-e2e/history-index.ts
@@ -218,7 +218,7 @@ export function renderRunnerHistoryIndex(
<div>
<p class="eyebrow">Historical test reporting</p>
<h1>Runner E2E campaigns</h1>
- <p class="lede">Each row is one workflow campaign against a Paperclip revision. Open a report for its configuration matrices, matchers, per-test billing, declared screenshots, and sanitized structured evidence. Additional diagnostic evidence remains in access-controlled workflow artifacts.</p>
+ <p class="lede">Each row is one workflow campaign against a Paperclip revision. Open a report for its configuration matrices, matchers, per-test billing, declared screenshots, and normalized results. Additional diagnostic evidence remains in access-controlled workflow artifacts.</p>
</div>
<div class="summary" aria-label="History summary">
<div class="metric"><strong>${campaigns.length}</strong><span>Campaigns</span></div>
@@ -237,7 +237,7 @@ export function renderRunnerHistoryIndex(
<tbody>${rows}</tbody>
</table>
</div>
- <footer><span>Updated ${html(date(history.updatedAt))} UTC</span><span>Immutable campaign reports · Declared screenshots and inert structured evidence</span></footer>
+ <footer><span>Updated ${html(date(history.updatedAt))} UTC</span><span>Immutable campaign reports · Declared screenshots and normalized results</span></footer>
</main>
</body>
</html>`;
diff --git a/tests/runner-e2e/history-publish.ts b/tests/runner-e2e/history-publish.ts
index b72cf684d9..e519749ef3 100644
--- a/tests/runner-e2e/history-publish.ts
+++ b/tests/runner-e2e/history-publish.ts
@@ -43,7 +43,6 @@ const PUBLISH_ROOT_FILES = new Set([
"normalized-results.json",
"summary.md",
]);
-const PUBLIC_EVIDENCE_EXTENSIONS = new Set([".json", ".log", ".md", ".txt"]);
const MAX_PUBLIC_RASTER_BYTES = 12 * 1024 * 1024;
const EMPTY_PUBLIC_SCREENSHOTS: ReadonlySet<string> = new Set();
const PRIVATE_EVIDENCE_DIRECTORIES = new Set([
@@ -73,10 +72,13 @@ function publicEvidencePath(
) {
return false;
}
+ // A text extension and credential scan do not establish a public projection.
+ // API snapshots and process logs can still hold hidden reasoning and provider
+ // session identities. Keep those diagnostics in the retained Actions artifact;
+ // normalized-results.json already carries the graded result contract.
return (
- PUBLIC_EVIDENCE_EXTENSIONS.has(
- path.posix.extname(evidencePath).toLowerCase(),
- ) || publicScreenshots.has(relative)
+ path.posix.extname(evidencePath).toLowerCase() === ".png" &&
+ publicScreenshots.has(relative)
);
}
@@ -546,8 +548,8 @@ async function main() {
// file left in a reused local directory. The root landing page below is the
// only dashboard that embeds navigation across campaigns. S3 gets its own
// staged copy. Only screenshots declared by normalized results (plus the
- // fixed failure screenshot for failed executions) cross the public boundary;
- // all other target-produced files remain subject to the structured allowlist.
+ // fixed failure screenshot for failed executions) cross the public evidence
+ // boundary. Raw per-attempt text stays in the retained Actions artifact.
const s3ReportRoot = path.join(temporary, "s3-campaign");
await cp(reportRoot, s3ReportRoot, { recursive: true, errorOnExist: true });
await prunePrivateHistoryEvidence(s3ReportRoot, publicScreenshots);
diff --git a/tests/runner-e2e/history.test.ts b/tests/runner-e2e/history.test.ts
index e44cb00ff3..0ade0e0e06 100644
--- a/tests/runner-e2e/history.test.ts
+++ b/tests/runner-e2e/history.test.ts
@@ -249,10 +249,10 @@ describe("runner E2E campaign history", () => {
"campaigns/complete-red/public-images/campaign-summary.png",
);
expect(index).toContain(
- "declared screenshots, and sanitized structured evidence",
+ "declared screenshots, and normalized results",
);
expect(index).toContain(
- "Declared screenshots and inert structured evidence",
+ "Declared screenshots and normalized results",
);
expect(index).not.toContain("data-gallery-dialog");
expect(index).not.toContain("Configuration matrix");
@@ -260,6 +260,32 @@ describe("runner E2E campaign history", () => {
});
describe("historical publication security", () => {
+ it.each([
+ "snapshots/api-state.json", "server.log", "playwright.log", "result.json",
+ "renamed-diagnostic.md", "nested/provider.txt", "malformed.json",
+ ])("withholds raw diagnostic %s even after credential redaction", async (file) => {
+ const root = await mkdtemp(path.join(os.tmpdir(), "runner-private-evidence-"));
+ temporaryDirectories.push(root);
+ const relative = `evidence/fixture.local.case/attempt-1/${file}`;
+ const absolute = path.join(root, relative);
+ const text = file === "malformed.json" ? "{malformed PRIVATE_REASONING" : JSON.stringify({
+ apiKey: "[REDACTED]",
+ runEvents: [{ payload: { prpEvent: { payload: {
+ kind: "reasoning", text: "PRIVATE_REASONING", sessionId: "PRIVATE_SESSION",
+ } } } }],
+ runLogs: [{ log: { content: JSON.stringify({ reasoning: "PRIVATE_REASONING" }) } }],
+ });
+ await mkdir(path.dirname(absolute), { recursive: true });
+ await writeFile(absolute, text);
+ expect(isHistoricalBundlePathAllowed(relative)).toBe(false);
+ // A text file cannot be admitted by pretending it is a declared screenshot.
+ expect(isHistoricalBundlePathAllowed(relative, false, new Set([relative]))).toBe(false);
+ await expect(createBundleManifest(root, "private-diagnostics")).rejects.toThrow("non-allowlisted");
+ await prunePrivateHistoryEvidence(root);
+ await expect(readFile(absolute)).rejects.toThrow();
+ expect((await createBundleManifest(root, "private-diagnostics")).files).toEqual([]);
+ });
+
it("allows public capture only on an issue task route", () => {
const target = {
issuePrefix: "PAP",
@@ -379,10 +405,10 @@ describe("historical publication security", () => {
);
expect(dashboard).toContain("View gallery · 1");
expect(dashboard).toContain(
- "Declared PNG screenshots and sanitized structured evidence are retained with every published campaign",
+ "Declared PNG screenshots and normalized results are retained with every published campaign",
);
expect(dashboard).toContain(
- "Declared screenshots and sanitized structured evidence published",
+ "Declared screenshots and normalized results published",
);
await expect(
readFile(path.join(evidenceDirectory, "final-state.png")),
@@ -404,13 +430,13 @@ describe("historical publication security", () => {
).rejects.toThrow();
await expect(
readFile(path.join(evidenceDirectory, "result.json"), "utf8"),
- ).resolves.toBe("{}\n");
+ ).rejects.toThrow();
await expect(
readFile(
path.join(evidenceDirectory, "snapshots", "api-state.json"),
"utf8",
),
- ).resolves.toBe("{}\n");
+ ).rejects.toThrow();
expect(
JSON.parse(
await readFile(path.join(output, "normalized-results.json"), "utf8"),
@@ -484,7 +510,7 @@ describe("historical publication security", () => {
}
await expect(
readFile(path.join(evidenceDirectory, "server.log"), "utf8"),
- ).resolves.toBe("sanitized\n");
+ ).rejects.toThrow();
const summaryHtml = renderPublicCampaignSummary(campaign);
expect(summaryHtml).toContain(execution.suite.label);
expect(summaryHtml).not.toContain("PROVIDER_TEXT_MUST_NOT_RENDER");
@@ -747,12 +773,12 @@ describe("historical publication security", () => {
isHistoricalBundlePathAllowed(
"evidence/core-compatibility.profile.local.case/attempt-1/result.json",
),
- ).toBe(true);
+ ).toBe(false);
expect(
isHistoricalBundlePathAllowed(
"evidence/core-compatibility.profile.local.case/attempt-1/snapshots/api-state.json",
),
- ).toBe(true);
+ ).toBe(false);
expect(isHistoricalBundlePathAllowed("paperclip-home/database")).toBe(
false,
);
diff --git a/tests/runner-e2e/report.test.ts b/tests/runner-e2e/report.test.ts
index e4009bb261..fe898ef3e4 100644
--- a/tests/runner-e2e/report.test.ts
+++ b/tests/runner-e2e/report.test.ts
@@ -245,10 +245,10 @@ describe("runner E2E report aggregation", () => {
expect(dashboard).toContain("data-gallery-next");
expect(dashboard).toContain("View gallery · 1");
expect(dashboard).toContain(
- "Declared PNG screenshots and sanitized structured evidence are retained with every published campaign",
+ "Declared PNG screenshots and normalized results are retained with every published campaign",
);
expect(dashboard).toContain(
- "Declared screenshots and sanitized structured evidence published",
+ "Declared screenshots and normalized results published",
);
expect(dashboard).toContain("message_contains");
expect(dashboard).toContain("Matchers and test context");