Skip to content

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.

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.

  1. lib/config/load.ts: delete orchestrator.workflows and orchestrator.review.engine (keep max_rounds/rubric_path).
  2. lib/services/orchestrator/step-runner.ts: 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.
  3. lib/config/chain.ts: resolveChain additionally reports {layer: 'project' | 'local' | 'default'} per stage via T-JIBO’s resolveLayeredValue, reading sdlc.local.yaml/sdlc.yaml’s raw chain.stages.<name>.workflow (change its signature to take projectRoot instead of a pre-loaded SdlcConfig, matching resolveWorkflow’s signature; update its one caller, ticks/issues.ts, accordingly).
  4. 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.
AreaNote
solutions/ontological/lib/config/load.tsDelete orchestrator.workflows, orchestrator.review.engine
solutions/ontological/lib/services/orchestrator/step-runner.tsresolveEngine/resolveHost read workflows.<name>
solutions/ontological/lib/config/chain.tsresolveChain takes projectRoot, reports {layer}
solutions/ontological/lib/services/orchestrator/ticks/issues.tsUpdate resolveChain call site
solutions/ontological/lib/services/orchestrator/step-runner.test.ts, lib/config/chain.test.tsUpdate fixtures
  • AC-1: workflows.pr-review: {engine: codex} (no steps) makes the prs/merges ticks dispatch pr-review with codex, with pr-review’s own steps still resolving to the built-in [{skill: 'pr-review'}].
  • AC-2: orchestrator.workflows and orchestrator.review.engine both fail schema validation as unknown keys.
  • AC-3: resolveChain(projectRoot) reports {layer: 'project'} for a stage overridden in sdlc.yaml, {layer: 'local'} for one overridden in sdlc.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.ts passes.
  • 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: the sessions.workflows/resolveSessionEngine/ resolveSessionHost duplication this task anticipated turned out to come from P6 (PR #2327, task T-QMGC), not Sessions v2 — P6 merged into main before this decision’s migration sweep landed. That adoption diff — deleting sessions: from SdlcConfigSchema and rewiring both functions onto resolveWorkflow(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 adopting sessions.workflows; see impact-map.md’s “Sessions v2 — exact adoption diff”.

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).

Drawn from D-LSLH-collapse-verbs-workflows-chain-hooks’s “One engine/host setting” section and its “Sequencing — confirmed” note.

T-JIBO, T-4OUZ, T-4KYN


← Back to Tasks