refactor(ci): harden relay check parsing - #107874
trunk-io[bot] merged 3 commits into
Conversation
🤖 CI report🚨 Trunk lane — universal laneThis PR is assigned to the universal lane. It cannot merge in parallel with other PRs, so it can take longer to merge. Ask dev-ex if you think this is wrong. ✅ Duplication (Python) — cleanNew Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying. ✅ Duplication (TypeScript) — cleanNew TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Repository: PostHog/posthog/.coderabbit.yaml Review profile: QUIET Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: PostHog/posthog/.coderabbit.yaml Review profile: QUIET Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe relay accepts workflow URLs only for the configured Depot organization and maps unrecognized check states to "unknown". Check-run reads enforce response and pagination limits, handle malformed data, and filter results by app, name, SHA, optional PR number, and Depot workflow URL. The entry point passes the event’s PR number to the reader. Tests cover API-shaped payloads and mismatched identity fields. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Valid Depot checks are retained when another check is malformed or has no pull-request association. No actionable merge-blocking risk is established. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The relay now applies narrower identity and URL checks before accepting a successful CI result. No newly introduced security bypass was established, but checks without pull-request association data are still accepted, and that upstream case remains unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
468575b to
cba8d6b
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: PostHog/posthog/.coderabbit.yaml
Review profile: QUIET
Plan: Enterprise
Run ID: 8422f0f6-8590-48ff-80fd-5580cfffd44f
📒 Files selected for processing (2)
.github/scripts/ci_backend_relay.py.github/scripts/test_ci_backend_relay.py
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.
cba8d6b to
7603442
Compare
7603442 to
64564a1
Compare
There was a problem hiding this comment.
Approved.
This hardens CI check-parsing logic (risky CI tooling territory), but the author has STRONG familiarity (100% of touched lines last-authored by them, 65 merged PRs in this path), which substitutes for independent review assurance, and the change is thoroughly covered by new tests with no unresolved reviewer concerns on the current head.
- Author wrote 100% of the modified lines and has 65 merged PRs in these paths (familiarity STRONG).
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 63L, 1F substantive, 118L/2F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1c-medium (118L, 2F, single-area, refactor) |
| stamphog 2.2.0 | .stamphog/policy.yml @ 64564a1 · reviewed head 64564a1 |
|
This pull request was merged into |
Problem
Changes
How did you test this code?
Release status
Automatic notifications
Docs update
🤖 Agent context