Skip to content

Guardrails label TASK_WORKFLOW_CODER_MUTATION_REQUIRED as an attribution miss and advise the human-only /swarm recover #2758

Description

@andrewjfiore

Summary

When the architect runs pre_check_batch while the task is in rework_required, the reducer correctly throws TASK_WORKFLOW_CODER_MUTATION_REQUIRED. Guardrails then file that error as a Stage A attribution failure and print a remediation that names a human-only command:

[guardrails] Stage A write failed for task 1.1: TASK_WORKFLOW_CODER_MUTATION_REQUIRED - pre_check_batch result was NOT attributed. Run /swarm recover 1.1.

The diagnosis is wrong (the result was attributed; the state simply requires a coder change first) and the advice is not actionable by the architect.

Version

opencode-swarm@7.179.1 on OpenCode 1.18.21, Windows 11. Byte-identical on the 7.180.0 release branch.

Reproduction

  1. Task in rework_required (see the companion issue on rework_required).
  2. Architect calls pre_check_batch for the task's files.
  3. The CRITICAL-WARN above is logged, twice in our run, once per attempt.

Where it happens

  • src/hooks/gate-evidence.ts (around lines 647-655): the throw is intentional and correct for this state.
  • src/hooks/guardrails/index.ts (around lines 201-204 and 1322-1329): the catch labels the code as an attribution miss and adds the /swarm recover advice.

Why it matters

In our run the architect followed the advice path as far as it could: it re-ran pre_check_batch, then stashed the finished deliverables and sent a coder with instructions to make no change, in an attempt to satisfy "a coder mutation is required". That burned about 7 minutes and a third of the run's model spend before the wall clock ended it. A message that said "this task needs a real code change from a coder, or is blocked" would have stopped that.

Expected

  • Label TASK_WORKFLOW_CODER_MUTATION_REQUIRED for what it is: the workflow needs an accepted coder mutation before Stage A can pass again.
  • Do not recommend /swarm recover to an agent that cannot run it. If the state is unrecoverable for the architect, say so.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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