Skip to content

JVNAUTOSCI-2592 harden spreadsheet workflow execution - #295

Merged
witbrock merged 1 commit into
mainfrom
jvnautosci-2592-required-effects-static-tool
Jul 23, 2026
Merged

witbrock merged 1 commit into
mainfrom
jvnautosci-2592-required-effects-static-tool

Conversation

@witbrock

Copy link
Copy Markdown
Member

What changed

  • recognise exact statically bound workflow_mcp.invoke_tool methods when enforcing required-effects launch policy
  • add opt-in sequential workflow_control.for_each fail-fast behaviour and enable it for spreadsheet record materialisation
  • cache successful actor-scoped nested-workflow authority resolution for the lifetime of one execution, avoiding repeated Atlas reads
  • bump and regenerate the represented spreadsheet workflow seed and document the new VWL option

Why

The live spreadsheet campaign exposed three structural blockers: valid deterministic tool bindings were rejected before launch, one failed record could amplify a model timeout across the rest of the batch, and the same nested workflow definition was repeatedly loaded from Atlas for each record.

Validation

  • 84 focused backend workflow tests passed
  • 4 spreadsheet repo-seed invariants passed
  • generated bundle exactly matches its generator
  • Ruff and git diff --check passed

The private workbook and its contents are not included in this change.

Copilot AI review requested due to automatic review settings July 23, 2026 20:08
@witbrock
witbrock marked this pull request as ready for review July 23, 2026 20:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens durable spreadsheet workflow execution by improving required-effects tool identity detection, adding opt-in fail-fast semantics to workflow_control.for_each, and reducing repeated nested-workflow authority lookups via per-execution caching. These changes primarily strengthen correctness and operational behaviour under batch spreadsheet materialisation workloads.

Changes:

  • Recognise statically bound workflow_mcp.invoke_tool tool names as satisfying required-effects tool requirements (deterministic, non-LLM steps only).
  • Add stop_on_error to workflow_control.for_each with enforced sequential execution, plus richer iteration count outputs.
  • Cache successful actor-scoped nested workflow authority resolution for the lifetime of a single WorkflowEnvironment execution.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/backend/test_spreadsheet_programme_workflow_vontology_service.py Updates expectations for spreadsheet record materialisation to fail-fast (all_must_succeed, stop_on_error).
tests/backend/test_required_tool_identity_service.py Adds coverage ensuring deterministic static MCP bindings satisfy required-effects tool policy and rejects dynamic/LLM/subworkflow modes.
tests/backend/test_nested_workflow_actor_authority.py Adds tests for per-execution caching of successful nested workflow authority resolution and non-caching of failures.
tests/backend/test_control_flow_actions.py Adds tests for for_each fail-fast behaviour, defaults, and concurrency rejection when stop_on_error=true.
src/backend/workflows/workflow_mcp_tool_actions.py Exposes extract_static_workflow_mcp_tool_name and formalises the tool-name input key set.
src/backend/workflows/repo_seed_bundles/spreadsheet_programme_representation_workflow_seed_bundle.json Regenerates the represented spreadsheet workflow seed (version bump), enabling fail-fast record materialisation and adding new context labels.
src/backend/workflows/durable/nested_workflow_authority.py Implements actor-scoped nested-workflow resolution caching on the execution environment.
src/backend/workflows/durable/control_flow_actions.py Implements stop_on_error in workflow_control.for_each, including sequential-only enforcement and new aggregate outputs.
src/backend/workflows/action_registry.py Adds an execution-local _nested_workflow_resolution_cache to WorkflowEnvironment.
src/backend/services/selected_workflow_handoff_service.py Extends required-effects policy evaluation to account for statically bound workflow_mcp.invoke_tool tool names.
scripts/generate_spreadsheet_programme_workflow_seed.py Updates the seed generator to emit stop_on_error + all_must_succeed for record materialisation and bumps seed version.
docs/engineering/von_workflow_language_manual.md Documents workflow_control.for_each.stop_on_error semantics and its sequential execution requirement.

def test_nested_resolution_caches_success_for_same_environment_and_scope(
monkeypatch,
) -> None:
import src.backend.workflows.durable.registry_factory as registry_factory
def test_nested_resolution_cache_is_not_reused_across_actor_scopes(
monkeypatch,
) -> None:
import src.backend.workflows.durable.registry_factory as registry_factory
def test_nested_resolution_does_not_cache_authority_failure(
monkeypatch,
) -> None:
import src.backend.workflows.durable.registry_factory as registry_factory
@witbrock
witbrock merged commit 9f0a142 into main Jul 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants