fix: integrate audit findings round 1 - tools, worker, scheduler, main agent
- Unify ToolResultEnvelope (output vs content) for built-in tools - Fix shell.run AsyncGenerator consumption in ToolRegistry.call/streaming - Scheduler: consume WorkerResult.status instead of marking all running tasks completed - WorkerProcess/WorkerManager: surface exit events and generate failed/cancelled result - MainAgent: integrate ContextAssembler, Chinese destructive regex, ArchitectureDesigner impact gate - run.ts: pendingConfirmation flow, dispatch extracted, .air files filtered from /results - CapabilityRegistry wired into RuntimeApp and ServiceRegistry; DoctorService uses it - release.ts: findRepoRoot/findBun, run air e2e + depcruise + runtime regression - New gates: release-critical-gates, CLI run command regression - 14/14 e2e gates pass; 3/3 release dry-run pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -44,17 +44,13 @@ describe('D3: Worker result envelope', () => {
|
||||
expect(source).toContain('AgentType')
|
||||
})
|
||||
|
||||
it('wrap_worker_result returns WorkerResult with safe defaults', () => {
|
||||
// Verify safe defaults for key fields
|
||||
it('wrap_worker_result maps role results into WorkerResult with safe defaults', () => {
|
||||
expect(source).toContain("agent_type: (payload.agent_type as AgentType) || 'executor'")
|
||||
expect(source).toContain("status: (payload.status as WorkerStatus) || 'completed'")
|
||||
expect(source).toContain("summary: (payload.summary as string) || ''")
|
||||
expect(source).toContain('changed_files: (payload.changed_files as string[]) || []')
|
||||
expect(source).toContain('artifacts: (payload.artifacts as any[]) || []')
|
||||
expect(source).toContain('verification: (payload.verification as any[]) || []')
|
||||
expect(source).toContain('risks: (payload.risks as any[]) || []')
|
||||
expect(source).toContain('follow_up_tasks: (payload.follow_up_tasks as any[]) || []')
|
||||
expect(source).toContain('evidence_refs: (payload.evidence_refs as any[]) || []')
|
||||
expect(source).toContain("const raw_status = (payload.status as string) || 'completed'")
|
||||
expect(source).toContain("raw_status === 'fixed' || raw_status === 'pass'")
|
||||
expect(source).toContain('changes.map((c: any) => String(c.file))')
|
||||
expect(source).toContain("verification_payload ? [{ command: 'worker verification'")
|
||||
expect(source).toContain('result: (payload.result as unknown) || payload')
|
||||
})
|
||||
|
||||
it('get_result returns undefined for unknown agent', () => {
|
||||
|
||||
Reference in New Issue
Block a user