Skip to content

Auto-apply ok-to-test label for trusted bot-authored PRs #2495

Description

@fullsend-ai-retro

What happened

PR #2492 was authored by fullsend-ai-coder[bot] and modified e2e test infrastructure (e2e/admin/admin_test.go, e2e/admin/testutil.go). The e2e test gate skipped execution with the message: "E2E tests did not run. [...] For other contributors, a maintainer must add the ok-to-test label after the latest push." The review agent approved the PR and applied ready-for-merge without e2e tests having run. The human reviewer approved and merged. The PR's changes — retry logic for flaky e2e tests — were never validated by actually running the e2e suite before merge. See PR #2492 and review workflow run.

What could go better

The ok-to-test gate exists to prevent untrusted external contributors from running e2e tests. However, the org's own code agent (fullsend-ai-coder[bot]) is a trusted author — its PRs originate from a controlled pipeline with pre-commit security scanning. Treating bot-authored PRs the same as external contributor PRs means e2e-modifying changes merge without e2e validation. In this case, the fix was correct and simple, so no harm was done. But a subtler bug in retry logic or test helpers could have merged undetected. Confidence: medium-high — this is a clear gap in the pipeline, though the risk is partially mitigated by human review.

Proposed change

Add automation (likely in the fullsend.yaml shim workflow or a dedicated workflow) that auto-applies the ok-to-test label when a PR is opened or updated by a trusted bot actor (e.g., fullsend-ai-coder[bot], fullsend-ai-fix[bot]). This could be a simple conditional step: if github.actor matches the trusted bot list and the label isn't already present, apply it. Alternatively, modify the e2e gate workflow to implicitly trust these actors without requiring the label. Note: issue #1424 covers the related but distinct problem of the review agent applying ready-for-merge without checking CI status — that issue should also be addressed but is already tracked.

Validation criteria

The next 3 bot-authored PRs that touch e2e/ paths should have e2e tests run automatically without manual ok-to-test label application. Verify by checking the PR checks tab for e2e job execution.


Generated by retro agent from #2492

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/ciCI pipelines and checkscomponent/e2eEnd-to-end testsfeatureFeature-category issue awaiting human prioritizationtriagedTriaged but awaiting human prioritizationtype/featureNew capability request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions