fix(webui): drop dead Task.stage readers, split stateStoreDeps for cyclop

The task-list table and NeedsYouCard read a task.stage field the API
stopped emitting once tasks.stage dropped; remove the column and the
fallback rather than let it render an empty cell forever.

stateStoreDeps grew a fourth optional-capability branch (StepReader,
alongside Pi's ExecutionCanceller and the RecoverStale rebase) and
tripped golangci-lint's cyclop gate; split the execution-tree surfaces
into executionDeps, mirroring the existing accessDeps split.
This commit is contained in:
sam committed 2026-09-27 07:02:05 +10:00
1 parent e7b21b9e5d
commit 2aea3ce0dc
5 files changed
+22 -18

No files matched your search

+18 -11
View File
@@ -343,6 +343,24 @@ func (b *boot) stateStoreDeps(grants *staterpc.TaskGrants) staterpc.Deps {
if btc, ok := b.st.(storecontract.BindingTaskCreator); ok {
deps.BindingTaskCreator = btc
}
b.executionDeps(&deps)
b.accessDeps(&deps)
if css, ok := b.st.(storecontract.ConfigSnapshotStore); ok {
deps.ConfigSnapshots = css
}
if as, ok := b.st.(storecontract.ApplyStatusStore); ok {
deps.ApplyStatus = as
}
if cs, ok := b.st.(storecontract.ChannelStatusStore); ok {
deps.ChannelStatus = cs
}
return deps
}
// executionDeps wires the execution-tree surfaces (workflow calls, step
// recording/reading, cancellation) from the same store, degrading each one
// independently the store lacks it rather than failing the boot.
func (b *boot) executionDeps(deps *staterpc.Deps) {
if wc, ok := b.st.(storecontract.WorkflowCaller); ok {
deps.WorkflowCalls = wc
}
@@ -355,17 +373,6 @@ func (b *boot) stateStoreDeps(grants *staterpc.TaskGrants) staterpc.Deps {
if sr, ok := b.st.(storecontract.StepReader); ok {
deps.StepReader = sr
}
b.accessDeps(&deps)
if css, ok := b.st.(storecontract.ConfigSnapshotStore); ok {
deps.ConfigSnapshots = css
}
if as, ok := b.st.(storecontract.ApplyStatusStore); ok {
deps.ApplyStatus = as
}
if cs, ok := b.st.(storecontract.ChannelStatusStore); ok {
deps.ChannelStatus = cs
}
return deps
}
// accessDeps wires the policy chain and its denial records from the same