Commit graph

4 commits

Author SHA1 Message Date
google-labs-jules[bot]
7ff87330fa Bolt: Optimized repository validation with efficient file traversal
This commit replaces the inefficient `pathlib.Path.rglob("*")` traversal in `scripts/ci_validate_repo.py` with a recursive `os.scandir()` implementation.

Key performance improvements:
1. Reduced object instantiation: `os.scandir()` avoids creating `Path` objects for every file/directory encountered, only creating them for targeted source files.
2. System call reduction: Pre-fetches `os.stat()` metadata during the initial scan (leveraging cached data on Windows/some Linux filesystems), eliminating redundant system calls in the validation loop.
3. Execution monitoring: Integrated high-resolution timing with `time.perf_counter()` to provide measurable performance feedback.

Benchmarked at ~0.0007s for current repository size.
2026-02-27 13:31:36 +00:00
google-labs-jules[bot]
565e0f72d0 Bolt: optimize repository validation with chunked reading and early size checks
Optimized `scripts/ci_validate_repo.py` for performance and memory efficiency:
- Refactored `check_no_nul_bytes` and `check_reasonable_size` into a single-pass `validate_files` function.
- Implemented early size check using `p.stat().st_size` to avoid reading files larger than 5MB.
- Replaced `p.read_bytes()` with chunked binary reading (64KB chunks) to detect NUL bytes, significantly reducing memory overhead.
- Added performance comments and maintained the efficient `rglob('*')` traversal pattern.

Measurements:
- Reduced I/O passes from 2 to 1.
- Reduced peak memory usage for large files from O(N) to O(1) buffer size.
- Faster rejection for oversized files (rejection before reading).
2026-02-19 19:51:26 +00:00
copilot-swe-agent[bot]
e23f7cbb90 Add executable permissions to scripts and create verification document
Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
2026-01-06 20:41:06 +00:00
Cursor Agent
85c1e2f963 feat: Add GitHub Actions for CI, automerge, and sync
Co-authored-by: genxdbxfx3 <genxdbxfx3@gmail.com>
2025-12-27 06:02:09 +00:00