-
Notifications
You must be signed in to change notification settings - Fork 1
fix: enable readfile liquid tag in workflow args #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The `readfile` liquid tag registered in `liquid-extensions.ts` was not available when rendering parameters passed to remote workflows. This was because `WorkflowCheckProvider`, `WorkflowExecutor`, and the test runner were creating plain `Liquid` instances instead of using the extended Liquid instance with custom tags and filters. Changes: - Use `createExtendedLiquid()` in WorkflowCheckProvider constructor - Use `createExtendedLiquid()` in WorkflowExecutor constructor - Use `createExtendedLiquid()` in test-runner output computation - Add test case to verify readfile tag works in workflow args Fixes #305 Co-Authored-By: Claude Opus 4.5 <[email protected]>
PR Overview: Enable readfile Liquid Tag in Workflow ArgsSummaryThis PR fixes a critical bug where the Key Changes1. Enable readfile Tag in Workflow Context (Primary Fix)Root Cause: The Files Changed:
Impact: All workflow executions now have access to:
2. Timeout Error Handling & ClassificationProblem: Command timeouts were not consistently treated as execution failures, causing dependent checks to run when they shouldn't. Files Changed:
Impact: Timeouts now consistently:
3. Slack Error Notifications for Execution FailuresProblem: Execution failures (including timeouts) were not surfaced to Slack when checks completed. Files Changed:
Impact: Users now receive Slack notifications when:
4. Worktree Refresh on Ref AdvanceProblem: Reusing existing worktrees could result in stale checkouts if the branch advanced. Files Changed:
Impact: Long-running processes that reuse worktrees now get fresh code when branches advance. 5. Workflow Import ImprovementsProblem: Workflow imports lacked circular dependency detection and proper error handling. Files Changed:
Impact: More robust workflow import system with:
6. Bot Message Filtering ChangesProblem: Overly restrictive bot filtering prevented legitimate third-party bot integrations. Files Changed:
Impact: Third-party bots can now trigger Visor for integration purposes while preventing loops. Architecture & Impactgraph TD
A[WorkflowCheckProvider] -->|createExtendedLiquid| B[Liquid Engine]
C[WorkflowExecutor] -->|createExtendedLiquid| B
D[TestRunner] -->|createExtendedLiquid| B
B -->|configureLiquidWithExtensions| E[readfile Tag]
B -->|configureLiquidWithExtensions| F[Custom Filters]
E -->|Read files| G[File System]
H[CommandCheckProvider] -->|Detect timeout| I[Error Classifier]
I -->|Classify as fatal| J[StatsManager]
J -->|Skip dependents| K[LevelDispatch]
L[SlackFrontend] -->|Check completed| M[Execution Failure Detector]
M -->|Post error| N[Slack API]
O[WorktreeManager] -->|Reuse worktree| P[Check ref advance]
P -->|Ref moved| Q[Checkout new commit]
Component Relationships:
Scope Discovery & Context ExpansionRelated Files:
Impact Boundaries:
Testing Coverage✅ New tests added:
Review NotesKey areas to focus on:
Potential concerns:
Metadata
Powered by Visor from Probelabs Last updated: 2026-01-30T17:23:07.789Z | Triggered by: pr_updated | Commit: 6ee44af 💡 TIP: You can chat with Visor using |
Security Issues (8)
Architecture Issues (7)
Performance Issues (11)
Quality Issues (17)
Powered by Visor from Probelabs Last updated: 2026-01-30T17:23:11.429Z | Triggered by: pr_updated | Commit: 6ee44af 💡 TIP: You can chat with Visor using |
Previously, Visor blocked ALL bot messages to prevent recursion loops. This was too restrictive and prevented integration with other bots. Changes: - GitHub: Remove `comment.user?.type === 'Bot'` check that blocked all bots - Slack: Remove `if (ev.bot_id) return` check that blocked all bots - Slack frontend: Remove `ev?.subtype === 'bot_message'` check Visor still protects against self-loops by checking: - Messages from visor[bot] and github-actions[bot] - Comments with visor-comment-id markers - Slack messages from Visor's own bot user ID Co-Authored-By: Claude Opus 4.5 <[email protected]>
Previously, when two workflow files both imported the same dependency, Visor would throw a "Workflow already exists" error on the second import. Now, duplicate imports are handled gracefully by skipping workflows that are already registered. This allows multiple workflow files to declare their imports for standalone testing while still working correctly when composed together. Changes: - config.ts: Skip already-imported workflows in loadWorkflows() - workflow-check-provider.ts: Simplify import handling to use same pattern Co-Authored-By: Claude Opus 4.5 <[email protected]>
Summary
readfileLiquid tag not being available when rendering parameters passed to remote workflowsChanges
createExtendedLiquid()inWorkflowCheckProviderconstructorcreateExtendedLiquid()inWorkflowExecutorconstructorcreateExtendedLiquid()in test-runner output computationreadfiletag works in workflow argsRoot Cause
The
readfiletag is registered viaconfigureLiquidWithExtensions()insrc/liquid-extensions.ts. However, when workflow parameters are rendered (in theprepareInputsmethod), the code was using a plainnew Liquid()instance that doesn't have the custom extensions registered.Test Plan
Fixes #305