{{ message }}
Repository navigation
Conversation
| ) | ||
|
|
||
| assert reason is not None | ||
| assert "https://example.com" in reason |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a canvas-level auto-fill for Google Sheets block credentials in the workflow editor, and also expands Copilot’s “terminal challenge” handling by introducing structured blocker signals, run-outcome reason codes, and secret/URL redaction for user-facing reasons and trace metadata.
Changes:
- Frontend: auto-fill the default Google OAuth credential into unconfigured Google Sheets read/write blocks (even when block editors aren’t mounted), and mark the workflow dirty so the change persists.
- Backend: introduce a dedicated terminal-challenge run outcome + blocker signal path, including current-page challenge preemption and MCP/browser-tool short-circuiting.
- Backend: centralize raw secret redaction and apply it to run-outcome display reasons and halt metadata (including URL credential/query sanitization).
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_copilot_turn_halt.py | Adds coverage for terminal-challenge halts and preservation of blocker signal extra. |
| tests/unit/test_copilot_run_output_content_gate.py | Updates expectations to treat terminal challenge as a terminal blocker (not “suspicious success”). |
| tests/unit/test_copilot_run_outcome_event.py | Adds challenge-failure scenarios and tests redaction in display reasons + halt metadata. |
| tests/unit/test_copilot_per_tool_budget.py | Adds tests ensuring current-page terminal challenges preempt budget loops and are redacted. |
| tests/unit/test_copilot_loop_detection_blocker.py | Ensures terminal challenge blockers preempt loop detection (native + MCP). |
| tests/unit/test_copilot_failure_tracking.py | Verifies terminal-challenge categories track anti-bot category aliases. |
| tests/unit/test_copilot_evaluate_page_evidence.py | Extends page-evidence normalization and ensures pre-attempt evidence stays diagnostic. |
| tests/unit/test_copilot_diagnosis_repair_contract.py | Updates contract failure typing to terminal challenge and ensures STOP behavior + category preservation. |
| skyvern/forge/sdk/copilot/workflow_credential_utils.py | Hardens url_origin to avoid credential leakage and handle hostname/port parsing safely. |
| skyvern/forge/sdk/copilot/turn_halt.py | Preserves blocker extra on halts and recognizes new terminal-challenge reason code. |
| skyvern/forge/sdk/copilot/tools/run_execution.py | Adds terminal-challenge evidence extraction, blocker signal creation, and run-outcome recording. |
| skyvern/forge/sdk/copilot/tools/page_observation.py | Improves anti-bot indicator extraction from nested evaluate payloads and disabled submit controls. |
| skyvern/forge/sdk/copilot/tools/blockers.py | Adds current-page terminal challenge preemption and expands anti-bot phrase detection. |
| skyvern/forge/sdk/copilot/secret_redaction.py | New module centralizing raw secret detection and redaction helpers. |
| skyvern/forge/sdk/copilot/run_outcome.py | Adds terminal-challenge reason code and applies secret/URL redaction to display reasons. |
| skyvern/forge/sdk/copilot/request_policy.py | Reuses centralized secret redaction utilities instead of duplicating logic. |
| skyvern/forge/sdk/copilot/output_policy.py | Imports secret redaction patterns from the new module. |
| skyvern/forge/sdk/copilot/mcp_adapter.py | Short-circuits MCP browser tools when current-page terminal challenge evidence is present. |
| skyvern/forge/sdk/copilot/failure_tracking.py | Adds a canonical set of anti-bot challenge category aliases. |
| skyvern/forge/sdk/copilot/enforcement.py | Adds backstop logic to stash/raise a terminal-challenge halt before other nudges. |
| skyvern/forge/sdk/copilot/diagnosis_repair_contract.py | Adds TERMINAL_CHALLENGE_BLOCKER failure type and STOP decision logic. |
| skyvern-frontend/src/routes/workflows/editor/hooks/useResolveDefaultGoogleSheetsCredential.ts | New hook to fill default Google credential across Sheets blocks at the canvas level. |
| skyvern-frontend/src/routes/workflows/editor/hooks/useResolveDefaultGoogleSheetsCredential.test.tsx | Unit tests for credential auto-fill behavior and dirty-flag deferral. |
| skyvern-frontend/src/routes/workflows/editor/FlowRenderer.tsx | Wires the new Sheets credential auto-fill hook into the editor renderer. |
| skyvern-frontend/src/routes/workflows/components/GoogleOAuthCredentialSelector.tsx | Uses a shared “default credential id” resolver for consistent selection. |
| skyvern-frontend/src/hooks/useGoogleOAuthCredentials.ts | Adds optional enabled gating and exports getDefaultGoogleOAuthCredentialId. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1632
to
+1634
| if isinstance(structured_blocker, str) and ( | ||
| _looks_like_anti_bot_blocker(structured_blocker) or isinstance(anti_bot_match, str) | ||
| ): |
Comment on lines
1459
to
+1463
| ); | ||
|
|
||
| useAutoPan(editorElementRef, nodes); | ||
| useAutoGenerateWorkflowTitle(nodes, edges, readOnly); | ||
| useResolveDefaultGoogleSheetsCredential(nodes, readOnly); |
Contributor
Author
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.

No description provided.