{{ message }}
Repository navigation
Add workflow orchestration for adaptive caching (7/8) - #4922
Merged
pedrohsdb merged 1 commit intoFeb 28, 2026
Merged
Conversation
Synced from cloud PR: Skyvern-AI/skyvern-cloud#8990 Author: @pedrohsdb ## Summary - Integrates adaptive caching into the workflow execution lifecycle and script page class — split from #8960 - This is the main production-touching PR — connects all the standalone modules together - Depends on #8984 (database), #8986 (prompts), #8987 (modules), #8988 (SkyvernPage), #8989 (script gen) ## Changes (797 additions, 78 deletions) ### `skyvern/forge/sdk/workflow/service.py` (+765 lines) The core orchestration changes: - Handles `code_v2` run mode in the workflow execution path - Triggers script review on workflow completion when adaptive caching is enabled - Manages fallback episode collection throughout the run lifecycle - Coordinates with the script reviewer service to publish improved script revisions - Adds `generate_script_on_terminal` support for auto-generating scripts on terminal workflow states ### `skyvern/core/script_generations/script_skyvern_page.py` (+110 lines) Extends the script execution page class: - Records branch hits during `classify()` calls for TTL-based pruning - Captures fallback episodes when cached script logic fails - Routes to `surgical_fallback()` when targeted AI intervention is needed ## Test plan - [x] Both files pass `py_compile` - [x] Both files pass ruff lint and format - [ ] End-to-end test: run a workflow with adaptive_caching=true - [ ] Verify fallback episodes trigger script review on completion - [ ] Verify branch hits are recorded and stale branches detected - [ ] Test generate_script_on_terminal flag behavior 🤖 Generated with [Claude Code](https://claude.ai/code)
pedrohsdb
deleted the
repo-sync/pedro/adaptive-caching-pr7-orchestration
branch
February 28, 2026 01:34
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.

Synced from cloud PR: https://github.com/Skyvern-AI/skyvern-cloud/pull/8990
Author: @pedrohsdb
Summary
Changes (797 additions, 78 deletions)
skyvern/forge/sdk/workflow/service.py(+765 lines)The core orchestration changes:
code_v2run mode in the workflow execution pathgenerate_script_on_terminalsupport for auto-generating scripts on terminal workflow statesskyvern/core/script_generations/script_skyvern_page.py(+110 lines)Extends the script execution page class:
classify()calls for TTL-based pruningsurgical_fallback()when targeted AI intervention is neededTest plan
py_compile🤖 Generated with Claude Code