report_execution
Posts verification results (pass/fail/flaky/skipped) per node to update confidence scores, transforming static priors into ground-truth-based estimates.
Instructions
Closes the verification feedback loop. External executors (any MCP-compatible coding agent, CI runner, or human) post back verification results — pass / fail / flaky / skipped — keyed to nodeId + tier + directive. Veris persists these in local SQLite state, applies them to confidence math (14-day half-life decay, flaky = half-credit), and uses them on subsequent runs to raise or lower confidence per node. Without this call, confidence is a static prior; with it, confidence reflects ground truth. Call once per batch of executed targets, not per-target — payload accepts an array.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| executions | Yes |
Implementation Reference
- src/mcp/McpServer.ts:333-351 (handler)The handleReportExecution method is the core handler for the 'report_execution' tool. It accepts an array of execution results (each with nodeId, tier, result, and optional workflowId/directive/detail/durationMs), persists them via VerisState.recordExecution(), and returns the count of recorded executions along with the run ID.
private handleReportExecution(args: any) { const executions = args.executions || []; if (!this.lastRunId) this.lastRunId = this.state.newRunId(); const now = new Date().toISOString(); for (const e of executions) { this.state.recordExecution({ runId: this.lastRunId, nodeId: e.nodeId, workflowId: e.workflowId ?? null, tier: e.tier, directive: e.directive ?? '', result: e.result, detail: e.detail, durationMs: e.durationMs, executedAt: now }); } return this.text({ recorded: executions.length, runId: this.lastRunId }); } - src/mcp/McpServer.ts:120-143 (schema)The tool definition for 'report_execution' including inputSchema. It defines the 'executions' array parameter where each item has nodeId, workflowId, tier, directive, result (enum: pass/fail/skipped/flaky), detail, and durationMs. The description explains it closes the verification feedback loop by persisting verification results into SQLite state.
{ name: "report_execution", description: "Closes the verification feedback loop. External executors (any MCP-compatible coding agent, CI runner, or human) post back verification results — pass / fail / flaky / skipped — keyed to nodeId + tier + directive. Veris persists these in local SQLite state, applies them to confidence math (14-day half-life decay, flaky = half-credit), and uses them on subsequent runs to raise or lower confidence per node. Without this call, confidence is a static prior; with it, confidence reflects ground truth. Call once per batch of executed targets, not per-target — payload accepts an array.", inputSchema: { type: "object", properties: { executions: { type: "array", items: { type: "object", properties: { nodeId: { type: "string" }, workflowId: { type: "string" }, tier: { type: "string" }, directive: { type: "string" }, result: { type: "string", enum: ["pass", "fail", "skipped", "flaky"] }, detail: { type: "string" }, durationMs: { type: "number" } }, required: ["nodeId", "tier", "result"] } } }, required: ["executions"] } }, - src/mcp/McpServer.ts:60-82 (registration)The registration in the CallToolRequestSchema handler. When the tool name is 'report_execution', it dispatches to handleReportExecution(args).
this.server.setRequestHandler(CallToolRequestSchema, async (request) => { const args = (request.params.arguments || {}) as any; switch (request.params.name) { case "analyze_repository": return this.handleAnalyzeRepository(); case "export_behavioral_graph": return this.handleExportGraph(); case "analyze_pr_behavior": return this.handleAnalyzePr(args); case "generate_verification_plan": return this.handleGeneratePlan(); case "identify_unverified_behaviors": return this.handleIdentifyUnverified(args); case "list_workflows": return this.handleListWorkflows(); case "analyze_workflow": return this.handleAnalyzeWorkflow(args); case "detect_drift": return this.handleDetectDrift(); case "generate_adversarial_probes": return this.handleGenerateProbes(); case "allocate_budget": return this.handleAllocateBudget(args); case "what_if_revert": return this.handleWhatIfRevert(args); case "report_execution": return this.handleReportExecution(args); case "confidence_history": return this.handleConfidenceHistory(args); case "node_history": return this.handleNodeHistory(args); case "export_onboarding": return this.handleExportOnboarding(); case "cross_repo_snapshot": return this.handleCrossRepoSnapshot(); case "register_repo": return this.handleRegisterRepo(args); default: throw new Error(`Unknown tool: ${request.params.name}`); } }); - The recordExecution method on VerisState persists a single ExecutionRecord into the local SQLite 'executions' table. This is the persistence helper called by handleReportExecution.
public recordExecution(rec: ExecutionRecord): void { if (!this.db) return; const payload = { ...rec, detail: rec.detail ?? null, durationMs: rec.durationMs ?? null, executedAt: rec.executedAt ?? new Date().toISOString(), workflowId: rec.workflowId ?? null }; this.db.prepare(` INSERT OR REPLACE INTO executions (run_id, node_id, workflow_id, tier, directive, result, detail, duration_ms, executed_at) VALUES (@runId, @nodeId, @workflowId, @tier, @directive, @result, @detail, @durationMs, @executedAt) `).run(payload); } - src/persistence/VerisState.ts:30-40 (helper)The ExecutionRecord interface defines the shape of execution data that the report_execution handler produces and recordExecution consumes.
export interface ExecutionRecord { runId: string; nodeId: string; workflowId: string | null; tier: string; directive: string; result: 'pass' | 'fail' | 'skipped' | 'flaky'; detail?: string; durationMs?: number; executedAt?: string; }