Skip to content

agricola: /ag fix silently blocked after /ag skip with misleading error message #176

Description

@Sertug17

Describe the bug

In agricola/service.py, both handle_comment() and _requests_for_targets() build a set of "already handled" targets from all ledger decisions including SkipDecision:

# handle_comment(), line 235 (agricola/state branch)
recorded_targets = {decision.target for decision in entry.decisions}

# _requests_for_targets(), line 617
decided = {decision.target for decision in decisions}

Because SkipDecision entries are included in these sets, a maintainer who previously ran /ag skip go reason="..." is permanently blocked from queuing a fix for that target via /ag fix go. The command silently returns:

"Fix for go is already recorded."

…even though no PR was ever opened the target was only skipped. There is no code path through the comment handler to override a skip decision with a new fix.

The fix is to filter both sets to DecisionKind.PROPAGATE entries only, so a skip can be overridden by a subsequent /ag fix.

Steps to reproduce

  1. Have a canonical PR tracked by agricola with an open tracking issue.
  2. Comment /ag skip go reason="not needed right now" on the tracking issue.
  3. Comment /ag fix go on the same tracking issue.
  4. Observe: reply says "Fix for go is already recorded." but no downstream PR was ever queued or opened for go.
  5. Expected: agricola should queue the fix (appending a new PropagateDecision with key propagate:{source_id}:go), since a skip and a propagate have different idempotency keys and can coexist in the ledger.

Logs

N/A the only output is the misleading reply comment on the tracking issue.

Platform(s)

Linux (x86), Linux (ARM), Mac (Intel), Mac (Apple Silicon), Windows (x86), Windows (ARM)

Container Type

Not running in a container

What version/commit are you on?

agricola/state branch, service.py lines 235 and 617

If you've built from source, provide the full command you used

No response

Code of Conduct

  • I agree to follow the Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    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