Skip to content

test(reliability): bound procurement Git metadata lookup - #670

Closed
seonghobae wants to merge 1 commit into
mainfrom
fix/procurement-git-metadata-timeout-20260810
Closed

test(reliability): bound procurement Git metadata lookup#670
seonghobae wants to merge 1 commit into
mainfrom
fix/procurement-git-metadata-timeout-20260810

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Reliability gap

Advances #555 with a disjoint procurement-evidence subprocess slice from exact protected main a7be9eb8ca0b807364173f8471fc300e3cf9350f.

scripts/build_procurement_due_diligence.py::_source_commit() invokes local git rev-parse HEAD without a per-operation timeout and catches every exception into "unknown". A hung Git child can therefore consume runner capacity until an outer job timeout, and subprocess.TimeoutExpired is silently converted into apparently usable provenance.

Intentional fail-first contract

tests/test_procurement_git_metadata_timeout.py requires:

  • a package-owned positive local-Git deadline no greater than 30 seconds;
  • TimeoutExpired to fail closed as exact stable RuntimeError("source commit lookup timed out") without reflecting child output/error/command text;
  • successful lookup to preserve stripped commit output; and
  • ordinary non-timeout Git failures to preserve the historical "unknown" fallback.

This first commit changes tests only. Keep Draft until GitHub CI proves the intended RED at the production boundary. Then make the smallest correction in scripts/build_procurement_due_diligence.py, add concise reliability doctoring plus an authoritative changelog fragment, render/check CHANGELOG.md, and require focused then full exact-head CI/Security/SAST/review evidence.

Scope boundary

Do not change procurement criteria, transaction-value semantics, psychometric/numerical code, workflows/dependencies, package version, canonical #604/#621 documentation, or adjacent active timeout slices #666/#667/#669/#578.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b7e3fbf8-dd70-45f6-a048-341eabbed7b8

📥 Commits

Reviewing files that changed from the base of the PR and between 384516b and 6dd7ec4.

📒 Files selected for processing (2)
  • scripts/build_procurement_due_diligence.py
  • tests/test_procurement_git_metadata_timeout.py

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.

Copy link
Copy Markdown
Contributor Author

@opencode-agent address

Sole bounded GREEN writer for Draft #670. Final pre-write guard is mandatory: refetch exact PR head, independently resolve protected main, inspect comments/reviews, and refetch scripts/build_procurement_due_diligence.py plus the focused tests. Proceed only if source head is still dbeebd2ea04bcd4de9021316c740c63eaa256c5e, protected main is still a7be9eb8ca0b807364173f8471fc300e3cf9350f, and no other source writer targets this branch/path; abort rather than race if anything moved.

Exact fail-first proof is complete. CI run 31422510993, Python job 93566396115, synthetic merge 34170ba98882a0b3449445d6d147fca8e9042603 completed 2 failed, 2949 passed, 2 skipped. The ONLY failures are the new procurement Git-metadata regressions: TimeoutExpired is swallowed into "unknown", and successful git rev-parse HEAD receives no bounded timeout. Existing procurement due-diligence tests are otherwise GREEN. Rust/PyO3, package/reinstall/release acceptance, GPU-smoke, fuzz, Security Scan 31422510927, and SAST 31422510990 are GREEN. The unrelated _log_sigmoid RuntimeWarning is #583/#564 and must not be changed here.

Implement the minimum GREEN only:

  1. In scripts/build_procurement_due_diligence.py, define a clearly named package-owned local Git metadata deadline (positive and <=30 seconds; choose a defensible small local-command value and document it).
  2. Pass that deadline to the existing subprocess.run(["git", "rev-parse", "HEAD"], ...) call.
  3. Catch subprocess.TimeoutExpired explicitly before the existing non-timeout fallback and fail closed with exactly RuntimeError("source commit lookup timed out") from None; never echo child stdout/stderr, command text, repo paths, or exception payload.
  4. Preserve successful stripped commit identity exactly. Preserve the historical "unknown" fallback for ordinary non-timeout Git/OS failure; do not alter procurement criteria, transaction-value semantics, packet/evidence policy, or adjacent subprocess classes.
  5. Run tests/test_procurement_git_metadata_timeout.py plus existing tests/test_procurement_due_diligence.py, meaningful changed-production statement/branch coverage, formatting and git diff --check.
  6. Add concise reliability doctoring grounded in current Python subprocess documentation and GitHub Actions timeout documentation, with APA 7 references and no claim that the chosen local deadline is a scientific runtime limit. Add authoritative docs/changelog.d/555-procurement-git-metadata-timeout.md only after product GREEN.
  7. Render/check managed CHANGELOG.md, then run the full applicable Python/Rust/PyO3/package/GPU/fuzz/Security/SAST gates on one unchanged final head. Keep Draft and stop source writes after one coherent verified GREEN series so current-head review/merge governance returns to the maintainer loop.

Do not touch #604/#621 canonical docs, dependencies/workflows, package version/release, psychometric/numerical code, reviewer authority, or adjacent #555 slices (#578/#657/#666/#667/#669).

@github-actions

Copy link
Copy Markdown
Contributor

자동 정리: base 대비 실제 변경(diff)이 0건이라 이 PR을 닫습니다. 변경을 추가한 뒤 reopen하세요.

@seonghobae seonghobae reopened this Aug 11, 2026
@seonghobae
seonghobae force-pushed the fix/procurement-git-metadata-timeout-20260810 branch from de94901 to 1a21147 Compare August 11, 2026 05:56
@seonghobae
seonghobae force-pushed the fix/procurement-git-metadata-timeout-20260810 branch from 1a21147 to 6dd7ec4 Compare August 11, 2026 06:28
@seonghobae

Copy link
Copy Markdown
Contributor Author

Superseded by unified Git metadata timeout fix PR (see fix/git-metadata-timeouts-unified).

@seonghobae seonghobae closed this Aug 11, 2026
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