Skip to content

Bug: Completion Gate false-positive for non-code tasks (issue filing, git push, etc.) #73

Description

@tianxingzhivlog-droid

Bug Description

The evaluateCompletionGate in drift-guard.js always checks for verification type entries in the evidence ledger. However, for non-code tasks like filing issues, pushing code, or answering questions, there is no test to run — the task completion IS the verification. This causes persistent Warning: Completion gate missing warnings throughout the session.

Reproduction

  1. Start OpenHorse
  2. Ask it to file a GitHub issue (e.g., 提issue给官方)
  3. Issue is successfully created (verified by gh cli output)
  4. Context Harness still reports: Warning: Completion gate missing: Required verification has not passed yet.

Root Cause

drift-guard.js:evaluateCompletionGate() hardcodes the requirement for verification evidence, without distinguishing task types:

// Always requires verification evidence, regardless of task nature
const hasVerification = ledgerEntries.some(e => e.type === "verification");

Expected Behavior

  • For code tasks: require test/verification evidence (current behavior)
  • For non-code tasks (issue filing, git push, Q&A): consider the tool success output as sufficient verification
  • Or: allow the agent to mark a task as "verification not applicable"

Suggested Fix

Add a verificationType field to the task contract:

  • "test" — requires test evidence (default for code tasks)
  • "tool_success" — tool output with exit code 0 is sufficient (for issue filing, push, etc.)
  • "none" — no verification needed (for Q&A)

Environment

  • OpenHorse: v0.2.24
  • Node.js: v22.23.1
  • macOS Darwin

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