-
Notifications
You must be signed in to change notification settings - Fork 107
fix: Fix observation parsing to exclude markdown and wiki links #269
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
Conversation
The is_observation() function was incorrectly identifying markdown links [text](url) and wiki links [[text]] as observations due to overly simple bracket detection. This change: - Uses regex to properly validate observation format: [category] content - Ensures only proper observations with category followed by space and content are detected - Maintains support for tag-only observations (#tag) - Fixes false positives from links at line beginnings Fixes #247 Co-authored-by: jope-bm <[email protected]>
@claude you need to add some unit tests that show that your code change fixed the bug. |
Claude finished @jope-bm's task —— View job Adding Unit Tests for Observation Parsing Fix ✅I've successfully added comprehensive unit tests to validate the observation parsing fix that excludes markdown and wiki links. Todo List:
Analysis:The fix updated
Added Tests:I've added
The tests include specific examples that would have failed before the fix and now pass correctly. Changes Made:
The unit tests demonstrate that your code change successfully fixed issue #247! |
Tests validate that markdown links [text](url) and wiki links [[text]] are correctly excluded from observation parsing while valid observations continue to work properly. Addresses feedback on PR #269 fixing issue #247. Co-authored-by: jope-bm <[email protected]>
…de markdown/wiki links - Add exclusions for markdown links [text](url) and wiki links [[text]] - Fix token content handling to support both real and test tokens using token.tag or token.content - Handle empty brackets [] followed by content in parse_observation - Update all related functions to use consistent token content access pattern Fixes issue #247 where markdown and wiki links were incorrectly parsed as observations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Signed-off-by: Joe P <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome
Signed-off-by: Joe P <[email protected]> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: jope-bm <[email protected]> Co-authored-by: Claude <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Fixes issue where markdown links text and wiki links [[text]] were incorrectly parsed as observations.
Changes
is_observation()
to use regex validation[category] content
Closes #247
🤖 Generated with Claude Code