AI Agents SDE Task Viewer
      • Pr description
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-246
  5. changes
  6. pr_description.md
pr_description.md(1.3 KB)· Apr 2, 2026· 1 min read
  • Title
  • Problem
  • Task / Link
  • Changes
  • Notes
  • Testing

Title#

test(#246): add E2E coverage for quality gate and skip-quality-gate directive

Problem#

The pre-PR quality gate (#231) lacked integration test coverage for its core lifecycle: gating, override, and bypass scenarios.

Task / Link#

Closes #246

Changes#

  • Add test/quality-gate.e2e-spec.ts with four E2E scenarios using in-memory SQLite
  • Scenario 1: auto-directive task is gated at deliver phase; invoke() never called
  • Scenario 2: skip-quality-gate sets override, approve clears gate, invoke() called with QUALITY_GATE_OVERRIDE=1, override consumed after deliver starts
  • Scenario 3: quick-directive task passes through deliver ungated; no QUALITY_GATE_OVERRIDE in env
  • Scenario 4: skip-quality-gate from non-author actor is applied (authorization is implicit at the webhook layer)

Notes#

Authorization for /agent skip-quality-gate is enforced at the GitHub HMAC webhook verification layer, not in DirectiveService. A TODO references #231 for potential future actor-based authorization.

Testing#

  • All four E2E scenarios pass via npm run test:e2e -- test/quality-gate.e2e-spec.ts
  • No existing unit tests broken (npm run test: 666 passed, 1 pre-existing failure in ws-gateway unrelated to this change)
  • Lint errors are pre-existing in unrelated files (src/main.ts, src/ws-gateway/)
PrdAgent-runner