test(reliability): bound PR queue Git metadata lookup - #707
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR bounds ChangesPR queue Git metadata timeout
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
@opencode-agent address Fresh current-main reconciliation handoff for Draft #707. Immediately refetch source head, live protected Fresh compare is Run focused PR-queue governance timeout tests and existing governance tests, renderer check, |
Reliability defect
Protected
mainaa5e84963e428aaa8c2900138bb36b07b8d649a7boundsgit rev-parse HEADin several release/evidence builders through #704, butscripts/build_pr_queue_governance.py::_source_commitstill callssubprocess.run(...)with no timeout and converts every exception to the stringunknown. Because this governance builder is itself invoked by the commercial release evidence flow, a hung Git child can still hold the release/control-plane lane indefinitely.Intentional RED
Exact test-only head:
76168c4cf7bba78b7681d4bd78bc7504c3247be0, directly based on the protected head above.tests/test_pr_queue_governance_git_timeout.pyreplaces the Git subprocess with a deterministic timeout and requires two production-boundary facts:_source_commitpasses one package-owned positive deadline tosubprocess.run; andsubprocess.TimeoutExpiredfails closed as boundedRuntimeError("source commit lookup timed out")instead of being silently converted tounknown.Current production code has no
GIT_METADATA_TIMEOUT_SECONDSand supplies notimeout=, so this test is expected RED. Setup/import/fixture/changelog failure is not valid RED.Minimum GREEN after RED proof
git rev-parse HEADcall;subprocess.TimeoutExpiredbefore the generic fallback and raise the stable non-reflective timeout error;unknownfallback for ordinary non-timeout Git unavailability unless current tests prove a stronger contract;No PR classification semantics, GitHub API retry policy, numerical code, dependency/workflow/version/release, or canonical #604/#621 documentation changes belong in this slice.
Summary by CodeRabbit
Bug Fixes
Tests
Documentation