Skip to content

Report the Harness and diagnostic when a Security review fails - #1096

Merged
JacobStephens2 merged 3 commits into
mainfrom
issue-974
Oct 22, 2026
Merged

JacobStephens2 merged 3 commits into
mainfrom
issue-974

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Failed Security review on grok
  Run cause: Security review on grok failed: Not signed in. ...
  Public PR: Security review on grok failed; see Session log
  Recovery:  Security review will use grok, chosen by security.harness

Reuse the interpreted diagnostic's first non-empty, trimmed line. Preserve generic failures, deliberate incomplete reviews and Safeguard refusals.

Closes #974

Evidence

  • Before: cargo test --test security_review a_failed_security_review_names_its_harness_and_first_diagnostic_line -- --exact reproduced the generic cause despite grok's login diagnostic.
    After: the diagnostic reaches the Run cause, Activity log, status and email; the rest remains in the Session log.
  • Before: the Standards review's exact cargo test --test security_review a_failed_review_keeps_private_result_text_out_of_its_public_pr -- --exact failed by copying private failed-result text into the PR.
    After: the same test passes unchanged and is retained.
  • scripts/affected-tests main selected cargo nextest run: 2355 passed, 56 skipped on 2d3e31f. /usr/bin/time -p scripts/affected-tests main: 1488.44s wall, including 97s compilation; nextest execution 1389.552s. cargo check --all-targets and formatting also passed. All GitHub checks are green on this head.

Test seams

  • Run CLI with fake external Harness processes: failed Security review causes and Recovery guidance, including Activity log, status and Run notification output.
  • Security review outcome interface: generic failures, deliberate incomplete reviews and Safeguard refusals.

Merge Danger

Door: two-way

Normal revert; no data migration.

Blast Radius: diagnostics

Unaddressed findings

Standards

Spec

None.

Security

  • Failed-review diagnostic reaches the email notification (introduced, unaddressed). Same root concern as Standards S2 above, confirmed independently in this session's security review: Outcome::hold() in src/security/review.rs builds the Run cause from the diagnostic's first line, and that cause flows unchanged to the Resend email (Cause:), Activity log, status and Console. When the diagnostic is fallback result text (partial assistant output) rather than a harness auth error, its first line reaches a third-party notification carrier, which ADR 0015 reserves for title/severity/link, never a write-up. Evidence: a temporary proof-of-concept mirroring a_failed_security_review_names_its_harness_and_first_diagnostic_line — grok error_during_execution result, empty errors, synthetic private marker as result — failed on HEAD (cargo test --test poc_974_notification, exit 101, marker present in the fake-Resend Cause: line) and passed on the untouched merge base 829a86f (generic cause, no marker), so it is introduced by this change, not pre-existing. Severity: medium — a real private-record → third-party boundary crossing, limited to one trimmed line addressed to the run owner's email. Unaddressed because A Security review whose Harness fails reports a generic cause that names neither the Harness nor its error #974's Agent Brief explicitly requires the cause to flow unchanged to the email and the committed acceptance tests assert that cause text; redacting the notification carrier changes that plan decision, which stays deferred to the Day shift in #1097. No fix committed; the temporary reproducer was removed so the suite stays green.

Security review outcome

  • Failed-review diagnostic reaches the email notification

Review coverage

Both axes read all five changed files. Unread changed files: none. Generated-output exclusions: none.

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit f2eb1fa into main Oct 22, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-974 branch October 22, 2026 22:12
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A Security review whose Harness fails reports a generic cause that names neither the Harness nor its error

1 participant