Skip to content

pipeline: make agent-ready intake atomic and idempotent #338

Description

@WalksWithASwagger

Summary

Make the agent:ready intake transition atomic and idempotent so a valid issue cannot be falsely escalated while its dev loop starts.

Context

Implementation Notes

  • Treat this as workflow state-machine correctness, not a reason to weaken stop labels.
  • Avoid running full issue-quality evaluation for unrelated label events merely because agent:ready is already present.
  • Ensure the dev loop starts only after a successful quality result or performs the same validation before adding in-progress.
  • Define the no-op result explicitly; a successful noop must clear temporary state without becoming a false human escalation.

Acceptance Criteria

  • One agent:ready transition yields one authoritative quality decision before the dev loop marks work in progress.
  • Adding or removing unrelated labels cannot re-lint a currently in-progress issue as a fresh ready intake.
  • in-progress remains a stop label for independent intake attempts but does not invalidate the run that owns it.
  • A successful noop run opens no PR, creates no remote branch, clears temporary state, and does not add needs-human.
  • Invalid ready issues still lose ready aliases, gain needs-human, and receive a useful quality comment.
  • Workflow concurrency prevents duplicate attempts for one issue without silently cancelling the authoritative result.
  • Regression tests reproduce the skill: remove machine-specific paths from the real-sky upscaler #318/build: align fresh-clone setup with the canonical verification gate #321 event ordering and prove the false escalation is gone.

Tests/Evals

  • Add workflow/event-matrix tests for ready, unrelated labeled, in-progress, invalid ready, noop success, and duplicate delivery.
  • Use fixtures and mocked GitHub state; do not dispatch a live provider.

Verification

  • python3 -m pytest tests/agentic -q
  • npm test
  • Parse both workflow YAML files.
  • On a disposable test issue, add agent:ready once and confirm one quality outcome, one noop attempt, no PR/remote branch, no needs-human, and no lingering in-progress.

Agent Instructions

Human Checkpoints

Out of Scope

Linear

Not applicable. Rafiki delivery is GitHub-only; do not create or update a Linear issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedWork cannot proceed until a blocker is resolved.bugSomething isn't workingphase-3Phase 3 — Workflow IntegrationpipelineCore pipeline toolingtestsTest coverage, smoke checks, and acceptance automationtype:taskImplementation task

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions