Skip to content

fix(qa): require proof that redaction scenarios actually exposed the secret - #119495

Merged
steipete merged 1 commit into
mainfrom
codex/autoqa-secret-redaction-evidence-20260805
Aug 5, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/autoqa-secret-redaction-evidence-20260805

Conversation

@steipete

@steipete steipete commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where both secret-redaction QA scenarios could pass even though the model never read the fake secret, or read a different file, because they checked only harness setup and safe-looking assistant prose.

Why This Change Was Made

Both QA scenarios now require a successful persisted agent-owned read, then inspect provider-independent Gateway history for the exact fixture path, matching tool-call/result ID, successful result, and the synthetic secret inside that result. Outbound leak checks use an outbound-only cursor; transcript scans retain their separate full-message cursor. This changes QA evidence only, not production redaction, authentication, secret storage, or security policy.

User Impact

Redaction QA now fails when the secret never reached the model and detects genuine leaked output across both personal and security workflows.

Evidence

  • Authentic parsed-scenario regressions cover both scenarios in mock and live modes: wrong-file reads, mismatched result IDs, unsuccessful or missing reads, missing synthetic marker, and mixed-message cursor mistakes all fail.
  • Positive controls prove correlated relative and absolute fixture paths pass while the synthetic secret remains absent from outbound text.
  • Real Gateway + mock-provider runs passed both secret-redaction-tool-logs and personal-redaction-no-secret-leak with actual successful persisted fixture reads.
  • Trusted Blacksmith Testbox aggregate passed 916 tests across 28 files. No production authentication or security code is changed.
  • Independent structured review found no accepted actionable findings; Testbox run: https://github.com/openclaw/openclaw/actions/runs/30973152491

Inspectable after-fix Gateway evidence

Observed on the trusted Blacksmith Testbox using a real ephemeral OpenClaw Gateway, the qa-channel transport, and a mock OpenAI model provider:

scenario: secret-redaction-tool-logs
provider: mock-openai
Gateway: real ephemeral Gateway
result: PASS
persisted evidence: successful read; exact fake-fixture path; matching tool-call/result ID; synthetic marker present in tool result and absent from outbound reply

scenario: personal-redaction-no-secret-leak
provider: mock-openai
Gateway: real ephemeral Gateway
result: PASS
persisted evidence: successful read; exact fake-fixture path; matching tool-call/result ID; synthetic marker present in tool result and absent from outbound reply

Only synthetic QA markers were used; no live credentials or real secret values are included.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 5, 2026, 1:37 AM ET / 05:37 UTC.

ClawSweeper review

What this changes

The PR makes two QA redaction scenarios correlate a persisted read call and successful result with the exact synthetic-secret fixture before checking outbound text for leaks.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 3 items remain

Keep open: current main still permits both redaction scenarios to pass without proving the agent read the synthetic secret, and this PR adds the missing scenario-owned evidence. The code review found no discrete correctness defect, but merge needs inspectable after-fix runtime output.

Priority: P2
Reviewed head: 505c9c554be11f2e50a6a122ea3d0b91c1772473
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch is focused and source-supported, but the claimed runtime proof is not inspectable.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: The body reports real Gateway plus mock-provider passes and links Testbox, but no inspectable after-fix output for either scenario was available; post redacted terminal output, logs, or an artifact before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The body reports real Gateway plus mock-provider passes and links Testbox, but no inspectable after-fix output for either scenario was available; post redacted terminal output, logs, or an artifact before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 7 items Current-main gap: The security scenario verifies that the harness wrote and read the fixture, then accepts a safe outbound marker; it does not inspect persisted agent tool history or result content.
Shared owner boundary: The shared runner waits for a successful persisted result by tool name only, so exact fixture-path and secret-content proof belongs in these scenario definitions.
Proposed scenario proof: The PR checks a read call’s resolved fixture path, matching successful tool-result ID, and synthetic secret content before accepting outbound redaction evidence.
Findings None None.
Security None None.

How this fits together

QA Lab runs agent prompts through the Gateway, then records tool history and QA-channel messages. These scenarios verify that redaction tests exercised a real secret-read path before asserting that the visible reply did not reveal it.

flowchart LR
A[Redaction scenario] --> B[Agent prompt]
B --> C[Persisted Gateway history]
C --> D[Read call and result correlation]
D --> E[QA-channel outbound cursor]
E --> F[No-secret delivery assertion]
Loading

Decision needed

Question Recommendation
Should this protected PR require inspectable redacted runtime output for both redaction scenarios, or should the linked Testbox claim receive a proof override? Require inspectable scenario output: Ask for a redacted terminal log or artifact showing both scenarios passed after the correlated persisted read.

Why: The green proof check validates PR-body structure rather than executing the changed scenarios, and the linked run could not be inspected in this review environment.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The body reports real Gateway plus mock-provider passes and links Testbox, but no inspectable after-fix output for either scenario was available; post redacted terminal output, logs, or an artifact before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The PR body links a Testbox run but provides no inspectable terminal output, log, or artifact for the two after-fix scenarios; the supplied environment could not resolve GitHub to inspect that run.
Agent review details

Security

None.

PR surface

Tests +297, Other +65. Total +362 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 297 0 +297
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 83 18 +65
Total 3 380 18 +362

Review metrics

Metric Value Why it matters
Production vs test delta scenario definitions +83/-18; tests +297/-0 The production growth is justified by a new QA evidence invariant; most of the change is focused regression coverage.

Stored data model

Persistent data-model change detected: serialized state: qa/scenarios/security/secret-redaction-tool-logs.yaml. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the scenario-specific Gateway-history correlation, then attach redacted after-fix output showing both named scenarios pass on this head.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the scenario-specific Gateway-history correlation, then attach redacted after-fix output showing both named scenarios pass on this head.

Do we have a high-confidence way to reproduce the issue?

Yes—current source shows both scenarios can reach a safe outbound marker after a harness fixture read without verifying the persisted agent read/result; the PR’s focused negative cases encode that gap.

Is this the best way to solve the issue?

Yes—the scenario YAML is the narrowest owner for exact fixture correlation, while the shared runner retains its generic successful-tool-result responsibility.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against dc93ea6d699a.

Labels

Label changes:

  • add P2: This is a bounded repair to high-risk redaction QA evidence, without a demonstrated production secret-handling regression.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The body reports real Gateway plus mock-provider passes and links Testbox, but no inspectable after-fix output for either scenario was available; post redacted terminal output, logs, or an artifact before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: This is a bounded repair to high-risk redaction QA evidence, without a demonstrated production secret-handling regression.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The body reports real Gateway plus mock-provider passes and links Testbox, but no inspectable after-fix output for either scenario was available; post redacted terminal output, logs, or an artifact before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

Likely related people:

  • mushuiyu886: Affected current-main lines blame to this shallow-history boundary commit; the trail is insufficient to attribute feature ownership confidently. (role: current-main routing candidate; confidence: low; commits: c6be75957f13; files: qa/scenarios/personal/redaction-no-secret-leak.yaml, qa/scenarios/security/secret-redaction-tool-logs.yaml)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach redacted terminal output, logs, or an artifact showing both redaction scenarios pass on commit 505c9c5.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 046a688 into main Aug 5, 2026
136 of 142 checks passed
@steipete
steipete deleted the codex/autoqa-secret-redaction-evidence-20260805 branch August 5, 2026 06:00
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant