Skip to content

test(pr-review): preserve check evaluation coverage - #5730

Closed
iscekic wants to merge 5 commits into
mobile-pr-review-context-5458-s20from
mobile-pr-review-context-5458-s21
Closed

iscekic wants to merge 5 commits into
mobile-pr-review-context-5458-s20from
mobile-pr-review-context-5458-s21

Conversation

@iscekic

@iscekic iscekic commented Aug 29, 2026 •

Copy link
Copy Markdown
Collaborator

No new behavior — this level adds regression tests without changing product code.


Summary

Restored check regression tests exercise contextCheckSchema, normalizeContextPolicies, and evaluateContextRequirements directly, so the scenarios use the production contracts.
They separate check outcomes from enforcement, validate application bindings and commit selection, and keep uncertain evidence unavailable.
Production contracts, saved data, and existing callers remain unchanged; the added cases establish automated coverage, not live provider behavior.

Files
  • apps/web/src/lib/github-pr-review/context-requirements.test.ts — adds requiredness and conclusion cases: neutral and skipped required runs are met; optional or unknown requiredness and unknown outcomes remain unavailable. Covers EXPECTED, PENDING, and ERROR as unmet, SUCCESS as met, and unknown status states as unavailable. Tests bypass rights, denied bypass access, unknown viewer contexts, and missing policies without inventing blockers from observed failures. Matches appId rather than display names, retains optional failures, and leaves null or zero bindings unknown rather than wildcard. Rejects status creators and inaccessible applications as binding evidence without reporting missing checks. Keeps duplicate runs from one application unavailable; different applications retain independent outcomes under a wildcard. Reports missing checks as unmet only with complete applicable policies, complete observations, and established enforcement. Partial collections, pagination, denied access, and unknown bypass rights cannot establish missing checks. Retains an observed unmet failure when a later page fails, alongside partial retryable source metadata and an unavailable evaluation row. Selects a valid test-merge commit with status observations, and falls back to the head only for complete empty merge observations. Leaves run-only results, partial merge reads, wrong parents, and head-only contexts unavailable, without inventing blockers; head-only contexts do not create missing observations. Asserts evaluatedShas and selection evidence. Rejects missing evidence, old head or base revisions, missing timestamps, unknown check kinds, and checks tied to an old commit.

Tests: 1 modified test file, apps/web/src/lib/github-pr-review/context-requirements.test.ts (M; +247/-0 lines).
Generated: 0 files changed.


Visual Changes

Visual Changes: N/A

Verification

  • Manual verification: skipped because this level changes tests only. The handoff includes no end-to-end report.

Reviewer Notes

  • Repository: Kilo-Org/cloud.
  • Worktree: /Users/igor/Projects/.worktrees/mobile-pr-review-context-5458.
  • Review scope: level 21 only, from mobile-pr-review-context-5458-s20 to mobile-pr-review-context-5458-s21.
  • These added tests do not establish live provider or repository-wide verification.

Human steps

This level requires no human steps before merge or after merge.

Notes

This level changes tests only. Live backend and iOS verification remains pending on the completed stack tip.

Stacked PRs — merge bottom to top. Each level shows only its own diff.

Runtime verification (E2E, user advocacy, simplify) runs on the tip PR over every level.
Every level keeps its own checks, its own bot review, and its own threads; each one is answered on its own PR.
Each level is its own deliverable: it builds and passes its own checks alone.
A finding on a level is repaired on that level, then carried upward with stack.sh forward.

  1. mobile-pr-review-context-5458-s1 — ci(pr-review): enable checks for context stack bases #5679
  2. mobile-pr-review-context-5458-s2 — feat(pr-review): define source-backed context contracts #5682
  3. mobile-pr-review-context-5458-s3 — feat(pr-review): normalize optional context payloads #5684
  4. mobile-pr-review-context-5458-s4 — feat(pr-review): map available REST context metadata #5687
  5. mobile-pr-review-context-5458-s5 — feat(pr-review): isolate optional context reads #5690
  6. mobile-pr-review-context-5458-s6 — feat(pr-review): complete labels and requested people #5691
  7. mobile-pr-review-context-5458-s7 — feat(pr-review): define review source documents and normalization #5695
  8. mobile-pr-review-context-5458-s8 — feat(pr-review): select source-backed review decisions #5696
  9. mobile-pr-review-context-5458-s9 — feat(pr-review): integrate independent review context reads #5699
  10. mobile-pr-review-context-5458-s10 — test(pr-review): preserve review source failure coverage #5703
  11. mobile-pr-review-context-5458-s11 — feat(pr-review): define linked issue source contracts #5706
  12. mobile-pr-review-context-5458-s12 — feat(pr-review): integrate typed linked issue context #5707
  13. mobile-pr-review-context-5458-s13 — test(pr-review): cover linked issue source failures #5708
  14. mobile-pr-review-context-5458-s14 — feat(pr-review): preserve structured policy evidence #5709
  15. mobile-pr-review-context-5458-s15 — feat(pr-review): normalize applicable merge policies #5712
  16. mobile-pr-review-context-5458-s16 — feat(pr-review): read applicable merge policies #5713
  17. mobile-pr-review-context-5458-s17 — feat(pr-review): define requirement observation contracts #5720
  18. mobile-pr-review-context-5458-s18 — feat(pr-review): expand named policy requirements #5723
  19. mobile-pr-review-context-5458-s19 — feat(pr-review): evaluate evidenced check requirements #5727
  20. mobile-pr-review-context-5458-s20 — feat(pr-review): evaluate evidenced merge policies #5728
  21. mobile-pr-review-context-5458-s21 — test(pr-review): preserve check evaluation coverage #5730 ← this PR
  22. mobile-pr-review-context-5458-s22 — test(pr-review): preserve policy evaluation coverage #5732
  23. mobile-pr-review-context-5458-s23 — feat(pr-review): integrate requirement observation reads #5735
  24. mobile-pr-review-context-5458-s24 — test(pr-review): preserve requirement source coverage #5736
  25. mobile-pr-review-context-5458-s25 — test(pr-review): complete requirement reader coverage #5739
  26. mobile-pr-review-context-5458-s26 — feat(pr-review): preserve queue membership and position #5741
  27. mobile-pr-review-context-5458-s27 — refactor(pr-review): share mobile-safe context contracts #5744 (tip)

@kilo-code-bot

kilo-code-bot Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • apps/web/src/lib/github-pr-review/context-requirements.test.ts

Reviewed by grok-4.6 · Input: 148.3K · Output: 25.7K · Cached: 528K

Review guidance: REVIEW.md from base branch mobile-pr-review-context-5458-s20

@iscekic

iscekic commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

Closing: the owner stopped this workflow section. The branch is retained.

@iscekic iscekic closed this Aug 31, 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