Skip to content

test(taskctl): integration test for adversarial verdict submission and pipeline completion #260

@randomm

Description

@randomm

Goal

Extend the Pulse happy path integration tests to cover the adversarial verdict submission and pipeline completion phases, using TDD.

Why

The adversarial-pipeline agent was silently failing to submit verdicts (wrong tool invocation). We need tests that:

  1. Verify the adversarial agent has taskctl in its allowed tools
  2. Verify processAdversarialVerdicts correctly handles APPROVED → commitTask → stage:done
  3. Verify the ops-pipeline commit flow completes and closes the task
  4. Catch any future regressions in the verdict→completion path

What to test

Test 1: adversarial-pipeline agent has taskctl permission

  • Load the adversarial-pipeline agent config from agent.ts
  • Assert that taskctl is in its allowed permissions
  • This is a fast unit test, no I/O needed

Test 2: full pipeline completion after APPROVED verdict (extend pulse-happy-path.test.ts)

  • Already have: open→developing→reviewing→adversarial-running
  • Add: set APPROVED verdict on task → call processAdversarialVerdicts → verify stage:done, status:closed
  • This already exists in pipeline.test.ts but should also be in the happy path flow

Test 3: ops-pipeline agent has correct permissions

  • Assert ops-pipeline agent has git/bash permissions needed to commit
  • Fast unit test

Acceptance Criteria

  • Test verifies adversarial-pipeline has taskctl:allow permission
  • Happy path test covers full flow through verdict → closed
  • bun test passes, bun run typecheck passes
  • Tests are in test/tasks/ alongside existing pipeline tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions