fix(ci): restore bypass-aware image publication gate - #432
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughОбновлены маршрутизация ChangesRuleset validation flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/critical/runtime/image_runtime_contract_test.go (1)
602-604: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winПокройте live-путь
ValidateWorkflowRun.Тест вызывает только
ValidateRelease, поэтому проверяетGet-TagRulesets, но не изменённыйGet-LiveRulesetDetailsна Line 325–326. ДобавьтеValidateWorkflowRun/-EventOnlyValidationсценарий с live API-обработчиком для tag и branch rulesets, включая проверки авторизации и пагинации.Also applies to: 1283-1318
🤖 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 `@tests/critical/runtime/image_runtime_contract_test.go` around lines 602 - 604, Расширьте тестовый сценарий live ruleset API, добавив вызов ValidateWorkflowRun с режимом EventOnlyValidation и live-обработчиками для tag и branch rulesets. Покройте для этого пути проверки авторизации и пагинации, чтобы тестировался Get-LiveRulesetDetails, сохранив существующие проверки ValidateRelease и Get-TagRulesets.
🤖 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 `@tests/critical/runtime/image_runtime_contract_test.go`:
- Around line 602-604: Расширьте тестовый сценарий live ruleset API, добавив
вызов ValidateWorkflowRun с режимом EventOnlyValidation и live-обработчиками для
tag и branch rulesets. Покройте для этого пути проверки авторизации и пагинации,
чтобы тестировался Get-LiveRulesetDetails, сохранив существующие проверки
ValidateRelease и Get-TagRulesets.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c4afb17c-f819-45a3-a2aa-009dd295ee96
📒 Files selected for processing (3)
.github/workflows/docker-publish.ymlscripts/production-gates/build-and-scan-images.ps1tests/critical/runtime/image_runtime_contract_test.go
5ed2cd5 to
98a49a5
Compare
98a49a5 to
73a5f05
Compare
Summary
ValidateWorkflowRunsteps, while explicitly clearing it from candidate executionbypass_actorsis omittedauthority-0015and advance toauthority-0016Root cause
PowerShell wrapped the REST API's top-level JSON array as one nested item (
@(Invoke-RestMethod ...)), so the validator compared array-valuedtarget/enforcementproperties and reported zero matching tag rulesets. The job-scopedgithub.tokenalso cannot prove bypass policy; GitHub Actions run 29556774487 verified the existing repository credential exposes both bypass actors and required-check integration identity.Verification
authority-0015preapproval in merged PR chore(ci): preapprove image gate authority repair #433pwsh -NoProfile -File scripts/production-gates/test-pr-authority-data-only.ps1→ PASS 9/9go test -tags critical ./tests/critical/runtime -run TestDockerReleaseRefFreshnessGuard -count=1→ PASSValidateWorkflowRunagainst Docker run 29554211846 succeeded for tagv6.46.0, commitb1f4e964708435ce8e265ff0ba412e4ee34e7de8, tag ruleset19085203, and main ruleset19040665GITHUB_TOKENpermissions reduced from write to read; PR approval permission disabled15368with the solepull_requestrecovery bypass actorThe regression-test file is intentionally split into the immediately following ordinary-path PR because the closed-world authority guard rejects maintenance PRs that mix protected control-plane and non-protected test paths.