Skip to content

logs --adoption: bot merges and closures are recorded as automation_decision without the merge outcome #79252

Done

Description

@mnkiefer

Problem

observeLifecycleProposal returns state: lifecycle, signal: automation_decision as soon as the deciding actor is a bot, before it records whether the pull request was merged or closed. Bot-merged and bot-closed pull requests therefore produce identical lifecycle records.

pkg/cli/logs_lifecycle_adoption.go:

if actorType == "Bot" || isBotUser(login) {
    observation.State, observation.Signal = "lifecycle", "automation_decision"
    return observation
}

Evidence

In a retained study of github/gh-aw workflows, 84 of 106 pull-request lifecycle records from gh aw logs --adoption are automation_decision with no merge outcome. For daily-doc-updater, 7 of 8 outputs have no recoverable acceptance outcome, so acceptance rate and value cannot be computed for that workflow.

Proposed fix

Keep the strict explicit_human gate for attribution unchanged, but record the observed resolution and the deciding actor, for example:

"adoption": {
  "state": "accepted", "signal": "merged", "acceptance_kind": "automation",
  "actor": {"login": "github-actions[bot]", "type": "Bot"}, "human_verified": false
}

gh aw value attribution would still require explicit_human, while consumers could distinguish merged from closed automation decisions.

Reproduce

gh aw logs daily-doc-updater --repo github/gh-aw --adoption --json

Pick an output whose target pull request is merged on GitHub; its lifecycle record is automation_decision without the merge.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions