Remove the workflow needs: block #1888

Closed
opened 2026-11-12 10:35:13 +00:00 by sam · 2 comments
Owner

The workflow needs: block (captures, gate_retries) only fed the harness capability check, which went with Kit removal (#1877). It now parses with no consumer. Workflow definitions decode strictly, so removing the field rejects any stored definition that sets it: strip it from stored definitions in the same change, and remove the toggle from WorkflowSettings.vue and the row from WORKFLOWS.md.

Done when: no needs field in WorkflowInterface, the UI or WORKFLOWS.md, and existing definitions still load.

The workflow `needs:` block (captures, gate_retries) only fed the harness capability check, which went with Kit removal (#1877). It now parses with no consumer. Workflow definitions decode strictly, so removing the field rejects any stored definition that sets it: strip it from stored definitions in the same change, and remove the toggle from WorkflowSettings.vue and the row from WORKFLOWS.md. Done when: no needs field in WorkflowInterface, the UI or WORKFLOWS.md, and existing definitions still load.
Author
Owner

Also remove WorkflowInterface.Needs (internal/domain/workflow/task/interface.go): it has no callers since the Kit removal in #1877.

Also remove WorkflowInterface.Needs (internal/domain/workflow/task/interface.go): it has no callers since the Kit removal in #1877.
sam self-assigned this 2026-11-12 14:47:40 +00:00
sam closed this issue 2026-11-12 15:12:10 +00:00
Author
Owner

Triaged: no code change is needed for this. Issue #1888 is already satisfied by the tree as it stands; there is nothing left to implement.

Evidence, checked against each "done when" criterion:

  1. No needs field in WorkflowInterface — internal/domain/workflow/task/interface.go declares only inputs, repository, outputs, profile, identity, instructions. There is no Needs/GateRetries/Captures type or struct tag anywhere: rg 'yaml:"needs|json:"needs' over the whole repo returns only taskstate.NeedsAttention (json:"needs_attention", unrelated), and rg 'gate_retries|GateRetries' returns nothing.
  2. Harness capability check is gone — rg 'Harness' over internal/ returns no matches; the only trace of Kit is the comment in proto/buf.yaml:10 noting the external-harness contracts were deleted with Kit support.
  3. No UI toggle — ui/src/workflows/WorkflowSettings.vue renders Instructions, Runs as (identity), Container profile, Works on (repository) and the outputs SpecList; no captures/gate-retries control. rg 'gateRetries|gate_retries|harness' ui/src matches only an unrelated comment in ui/src/events/tab-selection.ts.
  4. No row in WORKFLOWS.md — the workflow field table (WORKFLOWS.md:38-46) lists id, steps, repository, inputs, outputs, profile, identity. Every "needs" hit in that file is the natural-language phrase "needs a repository".
  5. Existing definitions still load — internal/domain/workflow/definition.go:89-117 has dropNeeds, which deletes the needs key from the document's root mapping before the strict KnownFields(true) decode, and ParseDefinition (line 121-128) calls it, so every decode path (DecodeDefinitionCollection, the control-plane projector workflow_projector.go:149, client.go:62, intake_routes.go:64, workflow_definitions.go:37, definition.go:213/280/346/480) inherits the compat strip. internal/domain/workflow/definition_load_test.go TestParseDefinitionDropsStoredNeeds asserts exactly the two required properties: a definition carrying needs:\n captures: true\n gate_retries: 3 still loads, and a definition carrying a different unknown key (bogus: 1) is still refused — i.e. strictness was not loosened globally.
  6. Nothing in the repo still sets the block — no file matches ^\s*needs: (shipped definitions, examples, configtemplate, seed data included).

One deviation from the issue's literal wording, which is a deliberate existing decision rather than a gap: stored definitions are not migrated/stripped in storage; they are stripped at decode time by dropNeeds. That keeps old saved definitions loading while rejecting every other unknown key, and it is already covered by the test above. If the operator wants the key physically removed from the stored workflow-definitions resource (a data migration so the YAML served to the editor no longer shows needs:), that is a separate, optional follow-up — it is not part of the stated done-when criteria.

Not verified: I could not execute the test suite in this read-only environment (go test ./internal/domain/workflow/ -run TestParseDefinitionDropsStoredNeeds), so the pass/fail status of that test is inferred from reading it, not observed.

Triaged: no code change is needed for this. Issue #1888 is already satisfied by the tree as it stands; there is nothing left to implement. Evidence, checked against each "done when" criterion: 1. No `needs` field in `WorkflowInterface` — `internal/domain/workflow/task/interface.go` declares only `inputs`, `repository`, `outputs`, `profile`, `identity`, `instructions`. There is no `Needs`/`GateRetries`/`Captures` type or struct tag anywhere: `rg 'yaml:"needs|json:"needs'` over the whole repo returns only `taskstate.NeedsAttention` (`json:"needs_attention"`, unrelated), and `rg 'gate_retries|GateRetries'` returns nothing. 2. Harness capability check is gone — `rg 'Harness'` over `internal/` returns no matches; the only trace of Kit is the comment in `proto/buf.yaml:10` noting the external-harness contracts were deleted with Kit support. 3. No UI toggle — `ui/src/workflows/WorkflowSettings.vue` renders Instructions, Runs as (identity), Container profile, Works on (repository) and the outputs SpecList; no captures/gate-retries control. `rg 'gateRetries|gate_retries|harness' ui/src` matches only an unrelated comment in `ui/src/events/tab-selection.ts`. 4. No row in `WORKFLOWS.md` — the workflow field table (`WORKFLOWS.md:38-46`) lists `id`, `steps`, `repository`, `inputs`, `outputs`, `profile`, `identity`. Every "needs" hit in that file is the natural-language phrase "needs a repository". 5. Existing definitions still load — `internal/domain/workflow/definition.go:89-117` has `dropNeeds`, which deletes the `needs` key from the document's root mapping before the strict `KnownFields(true)` decode, and `ParseDefinition` (line 121-128) calls it, so every decode path (`DecodeDefinitionCollection`, the control-plane projector `workflow_projector.go:149`, `client.go:62`, `intake_routes.go:64`, `workflow_definitions.go:37`, `definition.go:213/280/346/480`) inherits the compat strip. `internal/domain/workflow/definition_load_test.go` `TestParseDefinitionDropsStoredNeeds` asserts exactly the two required properties: a definition carrying `needs:\n captures: true\n gate_retries: 3` still loads, and a definition carrying a different unknown key (`bogus: 1`) is still refused — i.e. strictness was not loosened globally. 6. Nothing in the repo still sets the block — no file matches `^\s*needs:` (shipped definitions, examples, configtemplate, seed data included). One deviation from the issue's literal wording, which is a deliberate existing decision rather than a gap: stored definitions are not migrated/stripped in storage; they are stripped at decode time by `dropNeeds`. That keeps old saved definitions loading while rejecting every other unknown key, and it is already covered by the test above. If the operator wants the key physically removed from the stored `workflow-definitions` resource (a data migration so the YAML served to the editor no longer shows `needs:`), that is a separate, optional follow-up — it is not part of the stated done-when criteria. Not verified: I could not execute the test suite in this read-only environment (`go test ./internal/domain/workflow/ -run TestParseDefinitionDropsStoredNeeds`), so the pass/fail status of that test is inferred from reading it, not observed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1888