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

feat(#244): add E2E tests for pre-PR quality gate lifecycle (#231)#

Problem#

No E2E coverage existed for the quality gate introduced in #231, leaving the gate-block, approve-bypass, override-consume, quick-passthrough, and malformed-directive paths untested against a real database.

Task / Link#

Closes #244 — GitHub Issue

Changes#

  • Created test/quality-gate.e2e-spec.ts with 8 E2E scenarios
  • Tests use real TaskStateService (in-memory SQLite) + real PhaseRouterService with mocked Claude/external deps
  • Covers: auto/careful gate blocks, approve-directive gate release, qualityGateOverride consumed on deliver, quick bypass, malformed directive (wrong casing) rejected
  • All test descriptions reference #231 for traceability
  • Lint auto-fix applied to src/metrics/metrics.service.spec.ts (line formatting only)

Notes#

  • Tests run under npm run test:e2e (pattern: .e2e-spec.ts), consistent with other files in test/
  • With a real TaskStateService, qualityGateOverride is consumed before buildEnv is called — the env does NOT include QUALITY_GATE_OVERRIDE=1; tests document actual behavior

Testing#

  • npx jest --config ./test/jest-e2e.json --testPathPatterns quality-gate — 8/8 pass
  • npm run test — 674/674 pass (no regression)
  • npm run lint — 0 errors
PrdAgent-runner