Repository navigation
⚡ Bolt: Single-pass frontmatter YAML parsing and syscall reduction in skill assessment engine - #25
Conversation
- Add return_meta=True option to check_frontmatter_parses to extract validation status and parsed metadata dict in a single pass, eliminating duplicate yaml.safe_load() parsing per skill in score_skill loops. - Replace os.path.isdir() pre-checks before os.listdir() with direct try...except OSError blocks to eliminate redundant stat syscalls. - Use set-based lookup _EXCLUDED_DIRS for O(1) directory pruning. - Return frozenset from LRU-cached _get_sibling_basenames to prevent cache mutation and speed up set lookups.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
💡 What: Single-pass frontmatter YAML parsing and stat syscall elimination in
scripts/critique_10khr_runner.pyandscripts/heuristic_score.py.🎯 Why: During library assessment loops,
yaml.safe_load()was being called twice for every skill (once in D1 for metadata extraction and once in D8 for frontmatter validation). Additionally, pre-checkingos.path.isdir()beforeos.listdir()caused ~5 redundantstatsystem calls per skill directory.📊 Impact: Eliminates 50% of PyYAML parsing CPU time during scoring loops and removes ~5 stat syscalls per skill examined across
critique_10khr_runner.pyandheuristic_score.py.🔬 Measurement: Verified with
PYTHONPATH=scripts python3 -m unittest discover -s tests(all 21 unit tests pass cleanly in 0.34s).PR created automatically by Jules for task 1624227674151680623 started by @indigokarasu