Skip to content

Conversation

@quanru
Copy link
Collaborator

@quanru quanru commented Dec 29, 2025

No description provided.

@netlify
Copy link

netlify bot commented Dec 29, 2025

Deploy Preview for midscene ready!

Name Link
🔨 Latest commit 95bb358
🔍 Latest deploy log https://app.netlify.com/projects/midscene/deploys/695ca1b720f4f300080e311b
😎 Deploy Preview https://deploy-preview-1685--midscene.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@quanru quanru marked this pull request as draft December 29, 2025 07:51
@quanru quanru changed the title WIP: feat(core): implement cache execution fallback to AI planning feat(core): implement cache execution fallback to AI planning Dec 29, 2025
@quanru quanru force-pushed the fix/fallback-to-normal-when-cache-fail branch from 2d32c61 to f9986e3 Compare December 29, 2025 12:02
@quanru quanru marked this pull request as ready for review December 30, 2025 03:43
@quanru
Copy link
Collaborator Author

quanru commented Dec 30, 2025

close #1640

@quanru quanru marked this pull request as draft December 31, 2025 02:00
@quanru quanru force-pushed the fix/fallback-to-normal-when-cache-fail branch from 2e89b18 to 1a78457 Compare December 31, 2025 08:45
@quanru quanru requested a review from Copilot January 4, 2026 02:08
Copy link
Contributor

Copilot AI left a comment

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 implements a cache execution fallback mechanism that gracefully handles failures when executing cached YAML workflows. When a cached workflow fails, the system now automatically falls back to AI planning with detailed failure context, enabling smarter retry strategies.

Key Changes:

  • Added fallback logic to catch cache execution errors and retry with AI planning
  • Implemented detailed execution context tracking with completed, failed, and pending task information
  • Enhanced error messages with structured failure context for better AI decision-making

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
packages/core/tests/unit-test/agent-cache-fallback.test.ts New comprehensive test suite covering cache fallback scenarios, context propagation, and edge cases
packages/core/src/yaml/player.ts Added buildFailureContext() method to generate structured failure information for AI fallback
packages/core/src/yaml.ts Extended ScriptPlayerTaskStatus interface with index field for task position tracking
packages/core/src/agent/agent.ts Implemented try-catch around cached workflow execution with context-aware fallback to AI planning

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants