Skip to content

feat: Verification Protocol — auto quality gate via POST /v1/sessions/:id/verify (#740)#982

Merged
OneStepAt4time merged 1 commit intomainfrom
feat/740-verification-protocol
Apr 3, 2026
Merged

feat: Verification Protocol — auto quality gate via POST /v1/sessions/:id/verify (#740)#982
OneStepAt4time merged 1 commit intomainfrom
feat/740-verification-protocol

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Summary

Implement Verification Protocol (Issue #740) — automated quality gate execution after CC sessions.

What's included

New endpoint: POST /v1/sessions/:id/verify
Runs quality gate on the session's workDir:

  1. npx tsc --noEmit (type check)
  2. npm run build (build)
  3. npm test (full test suite, unless criticalOnly: true)

SSE event: event: 'verification'
Emitted when verification completes, with full result:

{
  "event": "verification",
  "data": {
    "ok": true,
    "steps": [{ "name": "tsc", "ok": true, "durationMs": 2340 }, ...],
    "totalDurationMs": 45230,
    "summary": "Verification passed: tsc ✅, build ✅, test ✅ (45230ms)"
  }
}

Config: verificationProtocol

{
  "verificationProtocol": {
    "autoVerifyOnStop": false,
    "criticalOnly": false
  }
}

Usage

# After a session ends, trigger verification:
curl -X POST http://localhost:9100/v1/sessions/{id}/verify
# → SSE event emitted, HTTP 200 if passed, 422 if failed

Quality Gate

  • tsc --noEmit: PASS
  • npm run build: PASS
  • 2174 tests: PASS

Developed with: v2.9.3
Tested with: v2.9.3

- Add POST /v1/sessions/:id/verify endpoint that runs tsc + npm build + npm test on the session's workDir
- Add VerificationResult SSE event type (event: 'verification')
- Add verificationProtocol config option (autoVerifyOnStop, criticalOnly)
- Emit 'working' status while verifying, SSE 'verification' event with full result on completion
- 2174 tests pass
Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verification Protocol implementation is clean. SSE event pattern, config options, and exec approach are correct. Approved.

@aegis-gh-agent
Copy link
Copy Markdown
Contributor

aegis-gh-agent bot commented Apr 3, 2026

Self-rebase failed — conflicts with merged PRs across config.ts, events.ts, server.ts. Please rebase onto current main and push. Approved — will merge immediately on green CI.

@OneStepAt4time OneStepAt4time merged commit fb2d340 into main Apr 3, 2026
5 checks passed
@OneStepAt4time OneStepAt4time deleted the feat/740-verification-protocol branch April 3, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant