Repository navigation
Commit ad9caf7
committed
refactor(service-automation): move the run-context and resume bodies into run-resume.ts
Move-only. The bodies of fifteen AutomationEngine methods move unedited
into a new run-resume.ts: resolveRunContext, seedRunGrants,
resolveDecisionSegmentContext and expandDeclaredLookups, which resolve a
run's context; resume, refuseGatedResume, refuseUndeclaredSuspension,
loadSuspendedRun, loadSuspendedRunStrict and creditChildRun, which load
and gate a suspended run; and failSuspendedRun,
settleUnresumableSuspension, cancelRun, cloneVariablesAtPause and
failAncestors, which fail, settle or cancel one. Each method keeps its
name, docblock, signature and position in the class and calls its body
with a RunResumeHost literal holding exactly the members the body reads;
creditChildRun reads none and is called directly. Each async stub drops
async and returns the promise the moved function makes.
Fields assigned only at their declaration or in the constructor go by
value. store, userGrantsResolver, recordExpander and
nodeTypeVocabularySealed go through getters, because a method reassigns
each. refuseInvalidScreenInput and buildSubflowResumeSignal stay in the
class: they read the module-private ENGINE_BUILT_SIGNAL. The imports only
moved bodies read move with them. The ENGINE_SOURCES grep pins read the
new module too.
Claude-Session: https://claude.ai/code/session_01Mnj4nkWuhJ18xEdZvb2cjE
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 03243fc commit ad9caf7
3 files changed
Lines changed: 822 additions & 547 deletions
File tree
- packages/services/service-automation/src
0 commit comments