Skip to content

[ab-advisor] Experiment campaign for daily-security-red-team: A/B test reasoning_depth #31673

Closed

Description

@github-actions

🧪 Experiment Campaign: daily-security-red-team

Workflow file: .github/workflows/daily-security-red-team.md
Selected dimension: reasoning_depth
Triggered by: ab-testing-advisor on 2026-05-12


Background

The daily-security-red-team workflow performs a deep security scan of actions/setup/js and actions/setup/sh using the Claude engine with a highly prescriptive, multi-phase prompt (7 rotating analysis techniques, ~500 lines). Because the agent already spends up to 60 minutes on each run, the key open question is whether the added cost of deep iterative reasoning (where the agent explicitly re-evaluates preliminary findings before reporting) delivers meaningfully better true-positive rates compared to a single-pass scan — or whether single-pass already captures all actionable findings at a lower cost.

Hypothesis

  • H0 (null): Iterative multi-pass reasoning does NOT improve finding quality (precision × recall) compared to single-pass analysis.
  • H1 (alternative): Iterative reasoning reduces false-positive rate by ≥20% or increases confirmed true-positives by ≥15%, at the cost of ≤30% more run time and token usage.

Experiment Configuration

Add the following experiments: block to the workflow frontmatter:

experiments:
  reasoning_depth:
    variants: [single_pass, iterative]
    description: "Compare single-pass vs. iterative (re-evaluation) security analysis to measure false-positive rate, true-positive rate, and cost"
    hypothesis: "H0: no change in finding quality. H1: iterative reduces false-positive rate by >=20% at <=30% token overhead"
    metric: false_positive_rate
    secondary_metrics: [run_duration_ms, issues_created, token_count]
    guardrail_metrics:
      - name: run_success_rate
        direction: min
        threshold: 0.9
      - name: empty_output_rate
        direction: max
        threshold: 0.05
    min_samples: 30
    weight: [50, 50]
    start_date: "2026-05-12"
    analysis_type: proportion_test
    tags: [security, cost-efficiency, quality]
    issue: 0

Variant descriptions:

  • single_pass: The agent performs each analysis technique once, reports findings directly. Current default behavior — fast, low token cost.
  • iterative: After completing each technique, the agent reviews preliminary findings, discards low-confidence ones with a written rationale, then re-runs targeted checks on remaining candidates. Expected: fewer false positives, higher confidence findings, ~20–30% more tokens.

Workflow Changes Required

Add a conditional reasoning instruction block at the end of Phase 4: Execute Security Analysis in the workflow body. The {{#if}} block compiles to a runtime env-var check:

Before (end of Phase 4, after all technique blocks):

## Phase 5: Compile and Report Findings

After:

## Phase 4b: Iterative Re-Evaluation (variant: iterative only)

{{#if experiments.reasoning_depth iterative}}
Before proceeding to Phase 5, perform a **second-pass validation** of every finding collected so far:

1. For each finding in `FINDINGS[]`, re-read the exact file and line cited.
2. Determine if the finding is a **confirmed true positive**, a **false positive**, or **needs more investigation**.
3. Write a one-sentence justification for each decision.
4. Remove false positives from `FINDINGS[]` and log them to `$CACHE_DIR/dismissed-findings-${TIMESTAMP}.json`.
5. For "needs more investigation" items, run one additional targeted check (e.g., trace data flow or check call graph).
6. Update `$CURRENT_SCAN` with `"re_evaluation_complete": true` and `"dismissed_count": <N>`.
{{else}}
<!-- single_pass: skip re-evaluation, proceed directly to Phase 5 -->
{{/if}}

## Phase 5: Compile and Report Findings

Success Metrics

Metric Type Target
false_positive_rate (issues created but later closed as invalid) Primary iterative ≤ baseline × 0.80
run_duration_ms Secondary iterative ≤ single_pass × 1.30
issues_created per run Secondary observe (not a target — quality over quantity)
run_success_rate Guardrail Must stay ≥ 90% for both variants
empty_output_rate Guardrail Must stay ≤ 5% for both variants

Statistical Design

  • Variants: single_pass (control), iterative (treatment)
  • Assignment: Round-robin via gh-aw experiments runtime (cache-based)
  • Minimum runs per variant: 30 (for 80% power to detect a 20% reduction in false-positive rate at α=0.05 using a two-proportion z-test)
  • Expected experiment duration: ~60 days at 1 run/day (30 runs per variant)
  • Analysis approach: Two-proportion z-test (proportion_test) on false-positive rate; Mann-Whitney U on run_duration_ms

Implementation Steps

  • Add experiments: section to frontmatter (replace 0 in issue: with this issue number)
  • Add {{#if experiments.reasoning_depth iterative}} conditional block before Phase 5
  • Run gh aw compile daily-security-red-team to regenerate lock file
  • Monitor experiment artifact uploaded per run to /tmp/gh-aw/experiments/state.json
  • After 30+ runs per variant, compare false-positive rates using a two-proportion z-test
  • Document findings and promote winning variant

Infrastructure note: All three schema fields checked by the ab-testing-advisor gate (analysis_type, tags, notify) are already fully implemented in both pkg/workflow/compiler_experiments.go and actions/setup/js/pick_experiment.cjs. No infrastructure sub-issue is needed.

References

Generated by Daily A/B Testing Advisor · ● 4.9M · ◷

  • expires on May 26, 2026, 11:13 AM UTC

Activity

  1. github-actions commented on Jun 7, 2026

    @github-actions
    ContributorAuthor

    ⚠️ Guardrail violation in experiment reasoning_depth

    The following guardrail metric failed:

    • run_success_rate expected >=0.9, got 0.727 for variant single_pass (n=11 runs)
    • iterative is passing: 1.00 ✅

    Note: Statistical significance detected (p=0.032) but guardrail failure takes precedence.

    Recommendation: ABANDON — single_pass variant has unacceptable failure rate. Consider investigating root cause before re-running.

    View the full report: Daily Experiment Report — 2026-06-07

    Warning

    Firewall blocked 2 domains

    The following domains were blocked by the firewall during workflow execution:

    • proxy.golang.org
    • releaseassets.githubusercontent.com

    To allow these domains, add them to the network.allowed list in your workflow frontmatter:

    network:
      allowed:
        - defaults
        - "proxy.golang.org"
        - "releaseassets.githubusercontent.com"

    See Network Configuration for more information.

    Generated by 🧪 daily-experiment-report · ⌖ 31.4 AIC · ⊞ 24.6K · ◷

  2. github-actions commented on Jun 20, 2026

    @github-actions
    ContributorAuthor

    ⚠️ Guardrail violation in experiment reasoning_depth

    The following guardrail metric failed in the last 30-run analysis window:

    • run_success_rate expected >=0.90, got 0.857 for variant single_pass

    The iterative variant is performing at 100% success rate, while single_pass is below the reliability threshold.

    Neither variant has yet reached min_samples=30 (single_pass: 17/30, iterative: 22/30), but the guardrail failure on single_pass is a warning signal.

    Recommendation: ABANDON — investigate whether the single_pass reasoning mode has reliability issues before continuing the experiment.

    View the full report: Daily Experiment Report — 2026-06-20

    Warning

    Firewall blocked 2 domains

    The following domains were blocked by the firewall during workflow execution:

    • proxy.golang.org
    • releaseassets.githubusercontent.com

    To allow these domains, add them to the network.allowed list in your workflow frontmatter:

    network:
      allowed:
        - defaults
        - "proxy.golang.org"
        - "releaseassets.githubusercontent.com"

    See Network Configuration for more information.

    Generated by 🧪 daily-experiment-report · 194.2 AIC · ⌖ 17.4 AIC · ⊞ 11.2K · ◷

  3. github-actions commented on Jul 7, 2026

    @github-actions
    ContributorAuthor

    🧪 Experiment Update — 2026-07-07

    Experiment: reasoning_depth | Workflow: dailysecurityredteam
    Recommendation: EXTEND

    Variant State Runs Success Rate Mean Duration
    iterative (ctrl) 32 100.0% 458s
    single_pass 24 100.0% 468s

    Statistical test (success rate): p = 0.5732 (not significant yet)

    Rationale: Need more data; some variants below min_samples=30

    Auto-generated by Daily Experiment Report

    Warning

    Firewall blocked 2 domains

    The following domains were blocked by the firewall during workflow execution:

    • proxy.golang.org
    • releaseassets.githubusercontent.com

    To allow these domains, add them to the network.allowed list in your workflow frontmatter:

    network:
      allowed:
        - defaults
        - "proxy.golang.org"
        - "releaseassets.githubusercontent.com"

    See Network Configuration for more information.

    Generated by 🧪 daily-experiment-report · 432.3 AIC · ⌖ 19.6 AIC · ⊞ 11.5K · ◷

  4. github-actions commented on Jul 7, 2026

    @github-actions
    ContributorAuthor

    🧪 Experiment Update — 2026-07-07

    Experiment: reasoning_depth | Workflow: dailysecurityredteam
    Recommendation: EXTEND

    Variant State Runs Success Rate Mean Duration
    iterative (ctrl) 32 100.0% 458s
    single_pass 24 100.0% 468s

    Statistical test (success rate): p = 0.5732 (not significant yet)

    Rationale: Need more data; some variants below min_samples=30

    Auto-generated by Daily Experiment Report

    Warning

    Firewall blocked 2 domains

    The following domains were blocked by the firewall during workflow execution:

    • proxy.golang.org
    • releaseassets.githubusercontent.com

    To allow these domains, add them to the network.allowed list in your workflow frontmatter:

    network:
      allowed:
        - defaults
        - "proxy.golang.org"
        - "releaseassets.githubusercontent.com"

    See Network Configuration for more information.

    Generated by 🧪 daily-experiment-report · 432.3 AIC · ⌖ 19.6 AIC · ⊞ 11.5K · ◷

  5. github-actions commented on Aug 25, 2026

    @github-actions
    ContributorAuthor

    🧪 Experiment reasoning_depth is ready for analysis!

    All variants have reached the minimum sample size of 30 runs:
    iterative: 64/30
    single_pass: 41/30

    View the latest statistics in the Daily Experiment Report discussion (posted 2026-08-25).

    Generated by 🧪 daily-experiment-report · copilot · auto · 99.8 AIC · ⌖ 23.7 AIC · ⊞ 17K · ◷

  6. github-actions commented on Aug 27, 2026

    @github-actions
    ContributorAuthor

    🧪 Experiment reasoning_depth is ready for analysis!

    All variants have reached the minimum sample size of 30 runs:
    iterative: 66/30
    single_pass: 41/30

    Core decision: EXTEND (guardrail_unsupported) — mandatory guardrail is not backed by a supported metric observation.

    View the latest statistics in the Daily Experiment Report discussion.

    Generated by 🧪 daily-experiment-report · copilot · auto · 143.1 AIC · ⌖ 13.5 AIC · ⊞ 17K · ◷

  7. github-actions commented on Sep 6, 2026

    @github-actions
    ContributorAuthor

    🧪 Experiment reasoning_depth is ready for analysis!

    All variants have reached the minimum sample size of 30 runs:

    • iterative: 70/30
    • single_pass: 47/30

    View the latest statistics in the Daily Experiment Report.

    Generated by 🧪 daily-experiment-report · copilot · auto · 151.6 AIC · ⌖ 17.2 AIC · ⊞ 16.5K · ◷

  8. github-actions commented on Sep 9, 2026

    @github-actions
    ContributorAuthor

    🧪 Experiment reasoning_depth is ready for analysis!

    All variants have reached the minimum sample size of 30 runs:
    iterative: 72/30
    single_pass: 48/30

    Core decision so far: EXTEND (guardrail_unsupported) — mandatory guardrail "run_success_rate" is not backed by a supported metric observation

    View the latest statistics in the Daily Experiment Report.

    Generated by 🧪 daily-experiment-report · copilot · auto · 157.6 AIC · ⌖ 36 AIC · ⊞ 16.5K · ◷

  9. github-actions commented on Sep 10, 2026

    @github-actions
    ContributorAuthor

    🧪 Experiment reasoning_depth is ready for analysis!

    All variants have reached the minimum sample size of 30 runs:
    iterative: 73/30
    single_pass: 48/30

    View the latest statistics in the Daily Experiment Report discussion posted today (2026-09-10).

    Generated by 🧪 daily-experiment-report · copilot · auto · 112.4 AIC · ⌖ 22.2 AIC · ⊞ 16.7K · ◷

  10. github-actions commented on Sep 12, 2026

    @github-actions
    ContributorAuthor

    🧪 Experiment update: reasoning_depth is READY for analysis

    All variants have reached min_samples (30) in the dailysecurityredteam workflow.

    Core decision: EXTEND (guardrail_unsupported)

    mandatory guardrail "run_success_rate" is not backed by a supported metric observation

    Variants:

    • iterative: 75 runs assigned
    • single_pass: 48 runs assigned

    See the [Daily Experiment Report discussion] for full descriptive statistics and factorial diagnostics (posted in this run).

    Generated by 🧪 daily-experiment-report · copilot · auto · 285.3 AIC · ⌖ 32.8 AIC · ⊞ 16.7K · ◷

  11. github-actions commented on Sep 14, 2026

    @github-actions
    ContributorAuthor

    🧪 Experiment reasoning_depth is ready for analysis!

    All variants have reached the minimum sample size of 30 runs:
    single_pass: 49/30
    iterative: 76/30

    View the latest statistics in the Daily Experiment Report (discussion posted 2026-09-14).

    Generated by 🧪 daily-experiment-report · copilot · auto · 218.5 AIC · ⌖ 24.8 AIC · ⊞ 16.7K · ◷

  12. github-actions commented on Sep 17, 2026

    @github-actions
    ContributorAuthor

    🧪 Experiment status: READY for analysis (no verdict yet)

    All variants reached min_samples and the balance test passed, but the core decision engine returned EXTEND (reason code guardrail_unsupported): mandatory guardrail is not backed by a supported metric observation.

    See the full Daily Experiment Report discussion for tables, charts, and cross-repo decision-pipeline context (run 35196671921).

    Automated status update — no action required unless you want to help unblock the metric/guardrail pipeline gap noted in the report.

    Generated by 🧪 daily-experiment-report · copilot · auto · 219.5 AIC · ⌖ 21.3 AIC · ⊞ 16.9K · ◷

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions