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
- Start OpenHorse
- Ask it to file a GitHub issue (e.g.,
提issue给官方)
- Issue is successfully created (verified by gh cli output)
- 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
Bug Description
The
evaluateCompletionGateindrift-guard.jsalways checks forverificationtype 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 persistentWarning: Completion gate missingwarnings throughout the session.Reproduction
提issue给官方)Warning: Completion gate missing: Required verification has not passed yet.Root Cause
drift-guard.js:evaluateCompletionGate()hardcodes the requirement forverificationevidence, without distinguishing task types:Expected Behavior
Suggested Fix
Add a
verificationTypefield 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