Skip to content

Reconcile failed Security review diagnostics in email with ADR 0015 #1097

Open

Description

@JacobStephens2

Raised by the Standards review of #1096, implementing #974.

The reviewer found that a Security review's failed-result diagnostic can be the first line of partial assistant output containing a pre-existing Base-branch vulnerability write-up. The Run cause then carries that line through Resend in its notification. ADR 0015 says a Run notification must not carry a finding's write-up.

#974's Agent Brief explicitly requires reusing session interpretation's diagnostic from errors or fallback result text, and says the cause flows unchanged into the email. The Spec review confirms that requirement. The PR already keeps all such diagnostics out of the public PR entry; this question is about emailed causes.

Evidence uses a synthetic fixture, not an actual vulnerability write-up: a failed grok result whose first line is Pre-existing Base-branch vulnerability: Private old vulnerability evidence.. On commit 2d3e31f, the root agent appended the Standards reviewer's test unchanged to tests/security_review.rs and ran its exact command:

cargo test --test security_review a_failed_review_keeps_private_result_text_out_of_its_notification -- --exact

It failed with exit code 101 (0 passed, 1 failed, 34 filtered):

private failed-result text reached Resend:
Cause:        Security review on grok failed: Pre-existing Base-branch vulnerability: Private old vulnerability evidence.

This confirms the confidentiality concern; the full suite is not offered as a refutation. The Spec review confirms that errors and fallback result diagnostics reaching email unchanged is the behavior #974 explicitly requests. The reproduction is retained with the local Standards report at .thirdshift-review-wfzBzA/notification-regression.rs and is reproduced below for future validation.

The Day shift must decide whether to narrow #974's verbatim-email requirement, distinguish operational diagnostics from assistant output by protocol provenance, or define another confidentiality rule for Security review failures. That changes the requested behavior and the interpretation of ADR 0015; the implementing agent should not silently make that policy choice.

This is a decision request only, with needs-triage as its sole label. It is not an implementation Ticket and creates no blocking dependency.

Reproduction

Append this test to tests/security_review.rs on PR #1096 and run the command above:

#[test]
fn a_failed_review_keeps_private_result_text_out_of_its_notification() {
    let scenario = Scenario::new();
    scenario.user_config_is("[harness]\ndefault = 'grok'\n");
    scenario.agent_does_in_session(1, OPENS_PR);
    scenario.agent_does_in_session(
        2,
        r#"
printf '%s\n' 'Pre-existing Base-branch vulnerability: Private old vulnerability evidence.' > "$FAKE_CLAUDE_FINAL_MESSAGE"
exit 1
"#,
    );
    let resend = ResendStandIn::replying(200, r#"{"id":"sent"}"#);
    let result = scenario.run_with_env(
        &[
            &scenario.issue_url(7),
            "security-review",
            "merge",
            "email",
            "[email protected]",
        ],
        &[
            ("THIRDSHIFT_RESEND_URL", resend.url()),
            ("RESEND_API_KEY", "re_test"),
        ],
    );
    assert_eq!(result.code, Some(1), "{}", result.stderr);
    let requests = resend.requests();
    assert_eq!(requests.len(), 1);
    let email = requests[0].body["text"].as_str().unwrap();
    assert!(
        !email.contains("Private old vulnerability evidence."),
        "private failed-result text reached Resend: {email}"
    );
}

Activity

  1. added
    needs-triage
    on Oct 22, 2026
  2. JacobStephens2 commented on Oct 25, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Triage Notes

    What we've established so far:

    What we still need from you (@JacobStephens2):

    • Pick: (a) only operational diagnostics from the protocol's errors reach email, never assistant text; (b) Security review failures get a generic Cause naming the Harness and pointing to the Session trace; or (c) another rule.
  3. added
    bug
    needs-info
    and removed
    needs-triage
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-info

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions