[M4] Rule-based no-progress detector baseline#48
Open
askmy-stack wants to merge 1 commit into
Open
Conversation
Detects planning-loop / stagnation failures via two model-independent signals: consecutive repeated actions (same name + arguments) and flat goal progress over a window of steps. Wires the new NoProgressDetector into all_detectors() so it participates in `ras experiment run --compare`, and records goal_progress on each trace event so detectors can read it. Fixes #22 Co-authored-by: Cursor <cursoragent@cursor.com>
Owner
Author
|
@askmy-stack Checklist for review:
Note: |
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
NoProgressDetectorinbaselines/rules/detectors.py, a rule-based Milestone-4 baseline that flags planning-loop / stagnation failures via two model-independent signals: consecutive repeated actions (same tool name + arguments) and flat goal progress over a configurable window.goal_progresson eachTraceEvent's attributes inTraceCollector.recordso detectors can read progress deltas directly from the trace (previously it was only tracked as a parallel list on the collector).runtime/features/progress.pywith the underlyingrepeated_action_step/flat_progress_stephelpers, following the pattern ofruntime/features/mismatch.py.all_detectors()(and thusbaselines/rules/__init__.pyexports), so it automatically participates inras experiment run --compare.experiments/results/tool-semantic-drift-001{.md,-report.json}to show the new detector row (no false alarm on this tool-drift case, as expected — it targets planning loops, not semantic drift).Testing
tests/unit/test_no_progress_detector.py: repeated-action detection, flat-goal-progress detection, no false alarm on non-consecutive repeats / monotonically increasing progress, registration inall_detectors(), and no false alarms on the existing clean/drifted scripted episodes.make ci(ruff lint + format check, mypy, pytest) passes locally — 31/31 tests pass.ras experiment run --case tool-semantic-drift-001 --compareand confirmedno_progressappears in both the JSON and Markdown reports.Fixes #22
Test plan
make cipassesras experiment run --case tool-semantic-drift-001 --compareshowsno_progressin detector comparison outputMade with Cursor