Repository navigation
JVNAUTOSCI-2592 harden spreadsheet workflow execution - #295
Merged
Merged
Conversation
There was a problem hiding this comment.
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_tooltool names as satisfying required-effects tool requirements (deterministic, non-LLM steps only). - Add
stop_on_errortoworkflow_control.for_eachwith enforced sequential execution, plus richer iteration count outputs. - Cache successful actor-scoped nested workflow authority resolution for the lifetime of a single
WorkflowEnvironmentexecution.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
workflow_mcp.invoke_toolmethods when enforcing required-effects launch policyworkflow_control.for_eachfail-fast behaviour and enable it for spreadsheet record materialisationWhy
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
git diff --checkpassedThe private workbook and its contents are not included in this change.