Skip to content

⚡ Bolt: Single-pass frontmatter YAML parsing and syscall reduction in skill assessment engine - #25

Merged
indigokarasu merged 1 commit into
mainfrom
bolt/single-pass-frontmatter-parsing-1624227674151680623
Oct 12, 2026
Merged

indigokarasu merged 1 commit into
mainfrom
bolt/single-pass-frontmatter-parsing-1624227674151680623

Conversation

@indigokarasu

Copy link
Copy Markdown
Owner

💡 What: Single-pass frontmatter YAML parsing and stat syscall elimination in scripts/critique_10khr_runner.py and scripts/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-checking os.path.isdir() before os.listdir() caused ~5 redundant stat system 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.py and heuristic_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

- 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.
@google-labs-jules

Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b067b1b0-bd2d-4d0e-919a-4a6851caa924

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@indigokarasu
indigokarasu merged commit 814a966 into main Oct 12, 2026
4 checks passed
@indigokarasu
indigokarasu deleted the bolt/single-pass-frontmatter-parsing-1624227674151680623 branch October 12, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant