w4c-workflows-api/Services
Vitali sharp8n 17d4515961 fix(dispatcher): use tenant-selected workflow repo and ensure clone before dispatch
The C# worker failed with 'entry file not found: Main.cs' because the
dispatcher resolved the working directory against the DEFAULT workflow
repo instead of the tenant's currently-selected one, and never ensured
the selected repo was cloned on the executing host. This left the worker
working in a directory whose code files did not exist.

- WorkflowSourceFactory.ResolveCopiesRoot now anchors a relative
  WorkflowSource:CopiesRoot to the content root (not the process CWD), so
  a worker started from a container/different CWD still lands on the same
  wizard root as the control plane.
- ForgejoWorkflowRepoService takes IWebHostEnvironment and uses
  ResolveCopiesRoot the same way.
- TaskDispatcher.ResolveWorkerRootForTenantAsync resolves the tenant's
  SELECTED repo from WorkflowRepoStore, and calls EnsureCloneAsync to
  materialize that repo on the executing host before resolving the working
  directory. EnsureClone is a no-op once the clone exists, so repeated
  dispatches stay cheap; failures are logged and swallowed so the resolved
  path still surfaces a deterministic error if the repo is genuinely missing.

Adds regression tests: TaskDispatcherWorkingDirTests.
2026-09-03 19:27:03 +03:00
..
Execution workflow source mapping 2026-09-03 17:44:39 +03:00
Messaging worfklow integration per tenant support 2026-09-01 22:31:27 +03:00
Runs fix(dispatcher): use tenant-selected workflow repo and ensure clone before dispatch 2026-09-03 19:27:03 +03:00
Triggers Fix working-dir resolution + add trigger backpressure 2026-09-02 18:10:08 +03:00
ApiKeyService.cs Initial: workflows API control plane + tests + YAML workflow definitions 2026-09-01 19:37:53 +03:00
DeterministicGuid.cs Initial: workflows API control plane + tests + YAML workflow definitions 2026-09-01 19:37:53 +03:00
DurationParser.cs Initial: workflows API control plane + tests + YAML workflow definitions 2026-09-01 19:37:53 +03:00
ForgejoWorkflowRepoService.cs fix(dispatcher): use tenant-selected workflow repo and ensure clone before dispatch 2026-09-03 19:27:03 +03:00
InMemoryLeaseService.cs worfklow integration per tenant support 2026-09-01 22:31:27 +03:00
JwtValidator.cs Initial: workflows API control plane + tests + YAML workflow definitions 2026-09-01 19:37:53 +03:00
LanguageRegistry.cs Initial: workflows API control plane + tests + YAML workflow definitions 2026-09-01 19:37:53 +03:00
LeaseService.cs Initial: workflows API control plane + tests + YAML workflow definitions 2026-09-01 19:37:53 +03:00
MermaidGeneratorService.cs Initial: workflows API control plane + tests + YAML workflow definitions 2026-09-01 19:37:53 +03:00
PerTenantWorkflowSource.cs fix(dispatcher): use tenant-selected workflow repo and ensure clone before dispatch 2026-09-03 19:27:03 +03:00
RenderTokenService.cs Initial: workflows API control plane + tests + YAML workflow definitions 2026-09-01 19:37:53 +03:00
WorkflowCompiler.cs workflow source mapping 2026-09-03 17:44:39 +03:00
WorkflowGraph.cs Initial: workflows API control plane + tests + YAML workflow definitions 2026-09-01 19:37:53 +03:00
WorkflowHtmlRenderer.cs Initial: workflows API control plane + tests + YAML workflow definitions 2026-09-01 19:37:53 +03:00
WorkflowRepoStore.cs workflow source mapping 2026-09-03 17:44:39 +03:00
WorkflowSource.cs Initial: workflows API control plane + tests + YAML workflow definitions 2026-09-01 19:37:53 +03:00
WorkflowSyncService.cs workflow source mapping 2026-09-03 17:44:39 +03:00
WorkflowValidator.cs Initial: workflows API control plane + tests + YAML workflow definitions 2026-09-01 19:37:53 +03:00