[codex] Add diagnostic metadata regression tests#32
Conversation
📝 WalkthroughWalkthroughThis PR increases the ChangesBuild diagnostics changes
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
build.py (1)
564-578: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueMagic number lacks unit/rationale comment.
"max-file-size"bumped from10000to35840with no comment on units or why this specific value was chosen. Consider a named constant (similar toDIAGNOSTIC_CHUNK_SIZE) with a brief comment.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@build.py` around lines 564 - 578, The pack command in subprocess.run uses a hard-coded max-file-size value with no explanation, so replace the literal in build.py with a named constant near the relevant logic, similar to DIAGNOSTIC_CHUNK_SIZE, and add a brief comment stating the units and why that size is chosen. Update the encryptly_bin pack invocation to reference that constant so the rationale is easy to find and maintain.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@build.py`:
- Around line 564-578: The pack command in subprocess.run uses a hard-coded
max-file-size value with no explanation, so replace the literal in build.py with
a named constant near the relevant logic, similar to DIAGNOSTIC_CHUNK_SIZE, and
add a brief comment stating the units and why that size is chosen. Update the
encryptly_bin pack invocation to reference that constant so the rationale is
easy to find and maintain.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3029c08f-37c3-42e2-bd07-0a7087b4aec5
⛔ Files ignored due to path filters (2)
tools/encryptly/windows-arm64/encryptly.exeis excluded by!**/*.exetools/encryptly/windows-x64/encryptly.exeis excluded by!**/*.exe
📒 Files selected for processing (8)
build.pydiagnostic/build-0618b98e-part001.logddiagnostic/build-0618b98e-part002.logddiagnostic/build-0618b98e.jsontests/test_build_diagnostics.pytools/encryptly/linux-arm64/encryptlytools/encryptly/linux-x64/encryptlytools/encryptly/macos-arm64/encryptly
Summary
Adds deterministic regression tests for
build.pydiagnostic metadata generation so future build changes do not break the JSON/logd contract required for PR review.Changes
tests/test_build_diagnostics.pyusing standard-libraryunittest.diagnostic_logdpath.diagnostic_logd_erroris populated and no valid archive is claimed..logdreferences and decrypt command metadata.diagnostic/build-0618b98e.jsondiagnostic/build-0618b98e-part001.logddiagnostic/build-0618b98e-part002.logdTesting
python -m py_compile build.py tests/test_build_diagnostics.pypython -m unittest discover -s tests -vPYTHONIOENCODING=utf-8 PYTHONUTF8=1 python3 build.py -m backend0618b98e.cargois not installed on this Windows machine.Diagnostic decrypt command:
Checklist
Refs #3
Summary by CodeRabbit
New Features
Tests