T-Q65Q-one-engine-host-setting-chain-provenance
State: closed/done · Impact: medium · Complexity: medium
Collapse orchestrator.workflows.<name>.{engine,host} and
orchestrator.review.engine into workflows.<name>.{engine,host} (schema
already added in T-4OUZ), rewire both readers, and give chain’s
stage-binding resolution the same {layer} provenance tag. This must land
before sdlc/sessions-v2 (PR
#2371) merges, so that branch
adopts workflows.<name>.{engine,host} directly instead of merging its own
sessions.workflows addition first.
orchestrator.workflows.<name>.{engine,host} is read by step-runner.ts’s
resolveEngine/resolveHost for the orchestrate loop’s dispatch.
orchestrator.review.engine is a second, pr-review-specific way to set the
same effective value for one workflow name. chain.stages.<name>.workflow
resolution (resolveChain) takes an already-loaded merged SdlcConfig, so
it cannot report which layer (project vs. local) actually produced a stage’s
binding.
Proposed
Section titled “Proposed”workflows.<name>.engine/.host is the one place engine/host live per
workflow. step-runner.ts’s resolveEngine/resolveHost read
resolved.engine ?? 'claude' / resolved.host off the ResolvedWorkflow
resolveWorkflow already returns, dropping the orchestrator.workflows/
orchestrator.review.engine reads and the pr-review-specific special-case
branch entirely. resolveChain takes projectRoot instead of a pre-merged
config, additionally reporting {layer: 'project' | 'local' | 'default'}
per stage via T-JIBO’s resolveLayeredValue.
Approach
Section titled “Approach”lib/config/load.ts: deleteorchestrator.workflowsandorchestrator.review.engine(keepmax_rounds/rubric_path).lib/services/orchestrator/step-runner.ts:resolveEngine/resolveHostreadresolved.engine ?? 'claude'/resolved.hostoff theResolvedWorkflowresolveWorkflowalready returns, dropping theorchestrator.workflows/orchestrator.review.enginereads and thepr-review-specific special-case branch entirely.lib/config/chain.ts:resolveChainadditionally reports{layer: 'project' | 'local' | 'default'}per stage viaT-JIBO’sresolveLayeredValue, readingsdlc.local.yaml/sdlc.yaml’s rawchain.stages.<name>.workflow(change its signature to takeprojectRootinstead of a pre-loadedSdlcConfig, matchingresolveWorkflow’s signature; update its one caller,ticks/issues.ts, accordingly).- Sessions v2 is NOT touched by this task (it targets a different branch); the exact adoption diff is documented in ../decisions/D-LSLH-collapse-verbs-workflows-chain-hooks/impact-map.md instead.
| Area | Note |
|---|---|
solutions/ontological/lib/config/load.ts | Delete orchestrator.workflows, orchestrator.review.engine |
solutions/ontological/lib/services/orchestrator/step-runner.ts | resolveEngine/resolveHost read workflows.<name> |
solutions/ontological/lib/config/chain.ts | resolveChain takes projectRoot, reports {layer} |
solutions/ontological/lib/services/orchestrator/ticks/issues.ts | Update resolveChain call site |
solutions/ontological/lib/services/orchestrator/step-runner.test.ts, lib/config/chain.test.ts | Update fixtures |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
workflows.pr-review: {engine: codex}(nosteps) makes theprs/mergesticks dispatchpr-reviewwithcodex, withpr-review’s own steps still resolving to the built-in[{skill: 'pr-review'}]. - AC-2:
orchestrator.workflowsandorchestrator.review.engineboth fail schema validation as unknown keys. - AC-3:
resolveChain(projectRoot)reports{layer: 'project'}for a stage overridden insdlc.yaml,{layer: 'local'}for one overridden insdlc.local.yaml,{layer: 'default'}otherwise — a case not distinguishable before this task. - AC-4:
bun test solutions/ontological/lib/services/orchestrator solutions/ontological/lib/config/chain.test.tspasses.
Out of scope
Section titled “Out of scope”- Sessions v2’s own
resolveSessionEngine/resolveSessionHost— that branch is not modified here; this task only makes the target shape (workflows.<name>.engine/.host) exist for it to adopt on rebase. Update: thesessions.workflows/resolveSessionEngine/resolveSessionHostduplication this task anticipated turned out to come from P6 (PR #2327, task T-QMGC), not Sessions v2 — P6 merged intomainbefore this decision’s migration sweep landed. That adoption diff — deletingsessions:fromSdlcConfigSchemaand rewiring both functions ontoresolveWorkflow(args.workflow, ctx.projectRoot).engine/.host— has since landed as part of this decision’s own migration sweep. Sessions v2 (PR #2371) is still an open draft and still must rebase onto this task’s shape when it next merges main, rather than adoptingsessions.workflows; see impact-map.md’s “Sessions v2 — exact adoption diff”.
Dependencies
Section titled “Dependencies”T-JIBO, T-4OUZ, T-4KYN (T-4KYN extracts executeStep from
the same step-runner.ts this task edits — land after T-4KYN to avoid a
same-file rebase).
Discovery context
Section titled “Discovery context”Drawn from D-LSLH-collapse-verbs-workflows-chain-hooks’s “One engine/host
setting” section and its “Sequencing — confirmed” note.
Depends on
Section titled “Depends on”T-JIBO, T-4OUZ, T-4KYN