Repository navigation
fix: terminal outcome type cycle fails architecture CI - #165284
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 4, 2026, 10:49 PM ET / October 5, 2026, 02:49 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR imports the agent run outcome type from its existing type-only module, breaking a static dependency cycle without changing runtime behavior. Merge readiness✅ Ready for maintainer review This PR remains useful: pinned main and the latest release retain the circular type import. The narrow repair has no identified correctness blocker, consistent with the previous review. Priority: P2 Review scores
Verification
How this fits togetherThe agent runtime carries terminal outcomes through thrown errors so lifecycle consumers preserve timeout and cancellation details. Architecture checks inspect the modules’ import graph, including type-only dependencies. flowchart LR
A[Agent run outcome] --> B[Terminal error wrapper]
C[Leaf outcome type] --> B
B --> D[Termination classification]
E[Static module imports] --> F[Architecture cycle check]
F --> G[CI result]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0. Total 0 across 1 file. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep terminal type dependencies directed at the existing leaf contract while preserving the public re-export and runtime termination semantics. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the type-inclusive cycle on pinned main and the architecture checker that detects it. Checks were not executed during this read-only review. Is this the best way to solve the issue? Yes, importing the unchanged type from its existing leaf owner is the narrowest repair and preserves runtime behavior and public exports. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d4ce3b2f33d4. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Fixed: agent terminal outcomes no longer create a type dependency cycle. |
Use the existing terminal-outcome type owner to break the architecture-check cycle without changing runtime error behavior. Refs openclaw#165279.
Architecture CI fails because the terminal-error wrapper imports its outcome type through the runtime implementation module. That module loads run-termination, which imports the wrapper and closes a type-inclusive dependency cycle.
Import the same type from its existing leaf owner. The public re-export, error construction, and runtime termination behavior remain unchanged.
Cloud Mac validation passed: the native Madge checker reports zero cycles, core typechecking passes, and all 99 existing terminal-outcome/termination tests pass (18.40 seconds in Vitest, 21.20 seconds including preparation). Focused formatting and type-aware lint also pass.
Fixes #165279.