Skip to content

[P1.8] Deduplicate blocker creation (adapter + runtime each create one → double blockers/webhooks) #735

Description

@frankbria

Severity: high | Category: correctness | Phase: P1.8

Problem

VerificationWrapper/plan Agent already persist a blocker before returning AgentResult(status="blocked"), then runtime.execute_agent creates a second one from result.blocker_question. blockers.create has no dedupe and fires the outbound webhook per call, so every blocked run produces two OPEN blockers + two blocker.created webhooks; a human must answer both.

Evidence

codeframe/core/runtime.py:825, codeframe/core/adapters/verification_wrapper.py:204

Acceptance criteria

  • Blocker creation has a single owner; runtime creates one only when the result carries a question with no already-persisted blocker (or dedupe on (task_id, question, OPEN)).
  • Test: one escalation produces exactly one OPEN blocker and one webhook.

Dependencies

None


Filed from the SaaS launch-readiness audit. Atomic: one developer, one session. Work order: strictly P0.1 → P3.12 (no forward dependencies).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-high-betaHigh priority - should fix before beta for best experiencepriority:hightype:bugSomething is broken and needs fixing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions