From 106d89314feaa15c7bba259363b08e6ec7bb88d1 Mon Sep 17 00:00:00 2001 From: Dotta <34892728+cryppadotta@users.noreply.github.com> Date: Tue, 22 Sep 2026 19:31:39 -0700 Subject: [PATCH] fix(evals): keep raw diagnostics out of public history (#13850) ## Thinking Path > - Paperclip manages AI agents and their work. > - Product E2E campaigns retain evidence from live provider runs. > - The public publisher copied per-attempt files based on their extension. > - Credential redaction does not remove hidden reasoning or provider session IDs. > - This pull request keeps those raw diagnostics out of public evidence bundles. > - Public reports retain normalized grades and declared fixture screenshots. ## Linked Issues or Issue Description **What happened?** The Product history publisher accepted all JSON, log, Markdown, and text files under an attempt directory. API snapshots and process logs can contain provider reasoning even after credential redaction. **Expected behavior** Keep raw attempt diagnostics in retained Actions artifacts. Publish normalized results and declared fixture screenshots. Preserve the original grades and attempt evidence. **Steps to reproduce** Place a credential-redacted API snapshot with a reasoning event under an attempt's snapshots directory. The previous public path check admitted it because it ended in .json. ## What Changed - Remove extension-based admission for per-attempt text files in both S3 and Pages staging. - Require PNG paths to appear in the existing screenshot declaration allowlist. - Preserve root normalized results, grading, billing, provenance, and reviewed screenshot behavior. - Add seven denial cases for raw diagnostics, renamed files, malformed JSON, and false screenshot declarations. - Update report copy and the publication security contract. ## Verification - Focused history and report tests: 47 passed. - Replayed the filter against a copy of retained Grok evidence: six diagnostic files removed, one declared screenshot retained, zero provider calls. Original artifacts remain unchanged. - git diff --check passed. - Product typecheck in the reused local dependency tree reports an unrelated plugin type mismatch for organizationSwitcher in server/src/services/plugin-capability-validator.ts. CI will verify a fresh install. - No local browser or Docker execution. ## Risks Public reports no longer link raw per-attempt logs or API snapshots. Those files remain in the original Actions artifact. This change affects future publication only; it does not withdraw or rewrite existing immutable public campaigns. Normalized result content and marked screenshot review retain their existing boundaries. No workflow authorization, provider credentials, application behavior, or database changes. ## Model Used OpenAI Codex, GPT-6 family, with reasoning, code editing, and tool execution. The exact deployment model ID and context-window size are not exposed in this session. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge Co-authored-by: Paperclip --- tests/runner-e2e/SECURITY.md | 15 ++++++---- tests/runner-e2e/dashboard.ts | 4 +-- tests/runner-e2e/history-index.ts | 4 +-- tests/runner-e2e/history-publish.ts | 14 +++++---- tests/runner-e2e/history.test.ts | 44 +++++++++++++++++++++++------ tests/runner-e2e/report.test.ts | 4 +-- 6 files changed, 58 insertions(+), 27 deletions(-) diff --git a/tests/runner-e2e/SECURITY.md b/tests/runner-e2e/SECURITY.md index e499f638d1e..2653cec086f 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 5537e80c39f..4ad7912c25e 100644 --- a/tests/runner-e2e/dashboard.ts +++ b/tests/runner-e2e/dashboard.ts @@ -1104,7 +1104,7 @@ export function renderRunnerE2EDashboard(input: RunnerDashboardInput) {

Full-stack acceptance campaign

${html(input.title)}

-

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.

+

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.

@@ -1145,7 +1145,7 @@ export function renderRunnerE2EDashboard(input: RunnerDashboardInput) { ${suiteSections} ${historySection} -
Generated ${html(input.generatedAt)}${catalog.length} catalog executions · Declared screenshots and sanitized structured evidence published
+
Generated ${html(input.generatedAt)}${catalog.length} catalog executions · Declared screenshots and normalized results published