Skip to content

update_task_status(completed) permanently blocked for tasks with files_touched: [] — pre_check gate can never be satisfied #2763

Description

@CrystalMethod

Summary

A plan task with an empty files_touched list (a pure verification/read-only task that writes no files) can never be marked completed. update_task_status requires a pre_check gate, but pre_check_batch only writes that gate when it has files to scan — and with files_touched: [] there are no files, so the gate is never recorded. The task is stuck in in_progress forever.

Reproduction

  1. Create a plan with a task whose files_touched is [] (e.g., a verification-only task).
  2. Run pre_check_batch (with or without an explicit file list).
  3. Attempt update_task_status(task_id, "completed").

Result:

Task 1.1 generation 0 has not passed exact-task QA. State: idle. Missing gates: [pre_check].

Root cause

  • update_task_status requires a pre_check gate in the per-task evidence file (.swarm/evidence/<taskId>.json).
  • pre_check_batch scans files and writes its verdict to shared gate-level evidence directories (build/, quality_budget/, sast_scan/, secretscan/) — it never writes a pre_check entry into the per-task evidence file.
  • With files_touched: [], there is nothing to scan, so no gate evidence is produced at all.
  • Additionally, check_gate_status reports a different required-gate set (e.g., only critic_sounding_board) than update_task_status enforces (pre_check), so the two tools disagree about what the task actually needs.

Why files_touched can legitimately be empty

A task may be a pure verification task: it exists to confirm that the existing toolchain (install, typecheck, lint, test baseline) runs cleanly against human-authored configuration files. Those config files are explicitly outside the coder's write authority (config-zone), and the task itself makes no code changes — so there are no files the coder is permitted to write. files_touched: [] is the correct, honest declaration for such a task, and it should not deadlock the completion gate.

Expected behavior

One of:

  • A task with files_touched: [] should be able to pass the pre_check gate without file scanning (e.g., pre_check_batch with no files still records a gate verdict), or
  • update_task_status should not require pre_check for tasks that declare no file scope, or
  • check_gate_status and update_task_status should derive required gates from the same source so they never disagree.

Workaround (current)

Give the task a non-empty files_touched containing a real file (e.g., a minimal smoke test) so pre_check_batch has something to scan. This works but forces artificial file writes onto verification-only tasks.

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