DSL tracing infrastructure, execution safety fixes, and monitoring support#2
Open
kmdvs wants to merge 6 commits into
Open
DSL tracing infrastructure, execution safety fixes, and monitoring support#2kmdvs wants to merge 6 commits into
kmdvs wants to merge 6 commits into
Conversation
Introduce DSL algorithm runner and trace collector for debugging scraping steps. Update statements controller and views to conditionally render trace data when enabled. Add options to toggle trace in UI, improve wringer error handling, and introduce trace partial. Also update routes and helpers to support the new trace feature.
Add monitoring capability for websites and improve DSL execution pipeline. Includes: - monitoring flag for websites - DSL runner improvements - additional tests for parser and algorithm runner
saumier
reviewed
May 16, 2026
Member
saumier
left a comment
There was a problem hiding this comment.
Hi Kim. I am not able to review this. These changes are too big and I don't understand enough to add value here.
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.
Summary
This PR introduces tracing support for DSL algorithm execution and improves the reliability of DSL evaluation in the Condenser pipeline.
The changes allow developers to inspect each step of DSL algorithm execution, making debugging of scraping pipelines significantly easier.
In addition, several fixes improve execution safety and thread isolation.
Finally, monitoring support was added for websites.
Key Changes
DSL tracing infrastructure
DSL execution fixes
Website monitoring support
monitorableattribute towebsitesDatabase Changes
A migration is included:
add_monitorable_to_websites
This adds a column:
websites.monitorable :boolean
The column indicates whether a website should be monitored/debugged.
Tests
Added and updated tests:
dsl_algorithm_runner_testdsl_content_parser_teststatements_helper_testThese tests verify:
Motivation
Debugging DSL scraping pipelines has historically been difficult because intermediate algorithm steps were not visible.
Tracing provides visibility into each algorithm step (XPath extraction, Ruby transformations, etc.), allowing developers to quickly identify failures.
The execution fixes also prevent state leakage between DSL runs and improve stability under concurrent execution.
Deployment Notes
After deploying, run:
rails db:migrate
No breaking schema changes are expected.
Review Notes
The main implementation areas are:
app/services/dsl/(DSL execution and tracing)statements_controller/ views (trace UI integration)websites.monitorableTracing is optional and only enabled when explicitly requested.