refactor: split run creation into composable record and dispatch phases#7168
refactor: split run creation into composable record and dispatch phases#7168
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Code Review: PR #7168 (Round 1) — LGTM 🎉All P0 and P1 issues have been resolved. SummaryThis is a clean, well-executed mechanical refactor that splits
Key observations:
Verdict: LGTM ✅No critical or high-priority issues remaining. This PR is ready for merge. Completed after 1 round(s) of automated review-fix loop |
⚡ Lighthouse — Web
Tested URL: https://pr-7168-www.vm6.ai/ · Full report |
Acceptance Report: #7164 — Split createRun into composable phasesEpic: #7152 — Extract Zero platform layer from generic run infrastructure 1. Requirements (Definition of Done)
2. Code Review
3. Merge Conflict NoteThis PR branches from main which still has the VerdictACCEPTED Clean structural refactoring. |
8770d4f to
e564aec
Compare
5e47ea9 to
14770a7
Compare
Extract the record-creation phase (compose loading, authorization, validation, DB transaction) into a standalone createRunRecord() function and export buildAndDispatchRun() so that zero-run-service can insert Zero-specific logic between record creation and dispatch in future iterations. createRun() is now a thin composition of the two with identical behavior. Closes #7164 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Acceptance Report: #7164 — Split createRun into composable phasesEpic: #7152 — Extract Zero Platform Layer from Generic Run Infrastructure 1. Requirements (Definition of Done)
2. Code Review
3. Architectural Alignment
4. Independence
5. Issues FoundMust FixNone. Should FixNone. Nits
VerdictACCEPTED Clean structural refactoring that splits |
14770a7 to
484751f
Compare
Summary
createRunRecord()from the first half ofcreateRun()(compose loading, authorization, validation, DB transaction)buildAndDispatchRun()which was previously a private functioncreateRun()as a thin composition of the two with identical behaviorindex.ts:createRunRecord,buildAndDispatchRun,CreateRunRecordResultThis enables
zero-run-serviceto insert Zero-specific logic (token generation, secret resolution) between record creation and dispatch in future iterations.Closes #7164
Parent Epic: #7152
Test plan
🤖 Generated with Claude Code