Repository navigation
refactor(github): pr check-readiness reads one merge-readiness verdict from github/ - #2456
Merged
Merged
Conversation
…t from github/ The merge-readiness rules of `devops pr check-readiness` move out of the Typer module into `github/merge_readiness.py`, which returns the verdict as data: the blockers, the advisories, the checks still running, the review threads that block and the grounding facts. It prints nothing and raises no `typer.Exit`, and it reads `gh` through a runner and the GitHub session through a session that a caller gives. The item rules become public pure predicates in `roadmap/grounding.py`. The command renders the verdict with the same exit codes and lines. `read_commit_checks` replaces the private `_fetch_checks_from_rest`, and `list_pr_review_threads` takes an optional runner. The readiness tests no longer patch `commands.pr.run_gh` or replace the GitHub session: the rules are table tests, the verdict runs over `GitHubApiFake` and `process_fake` through the new `github_api_and_gh` fixture, and the command has a table of its exit codes and lines.
Owner
Author
|
Test evidence:
Pending a person: review the diff in tuicr ( |
dan-petty
force-pushed
the
refactor/2442-merge-readiness-verdict
branch
from
October 28, 2026 17:09
e791dbe to
f9200bf
Compare
dan-petty
marked this pull request as ready for review
October 28, 2026 17:16
dan-petty
pushed a commit
that referenced
this pull request
Oct 28, 2026
🤖 I have created a release *beep* *boop* --- ## [0.10.0](v0.9.0...v0.10.0) (2026-10-28) ### Features * **review:** devops review intake hands the findings of a session on merged code to roadmap intake ([#2455](#2455)) ([a5c7b82](a5c7b82)) * **security:** devops k8s audit runs Popeye in the tool sandbox with a kube-api network profile that only reads the API server ([#2467](#2467)) ([e02c3fb](e02c3fb)) * **security:** the App's installation tokens carry only the permissions the roadmap jobs use ([#2482](#2482)) ([9599ef2](9599ef2)), closes [#2473](#2473) ### Bug Fixes * **config:** a config file that is not valid YAML stops the load with an error that quotes none of its text ([#2468](#2468)) ([91fe5dc](91fe5dc)) * **config:** config set reports an unknown key as unknown, not as a key that needs a value ([#2465](#2465)) ([8b650a6](8b650a6)) * **devcontainer:** run the checkout's devops in devcontainer terminals ([#2460](#2460)) ([abd2d41](abd2d41)) * **k8s:** loki runs from the grafana-community chart on loki 3.7.9, out of reach of CVE-2026-21729 ([#2470](#2470)) ([96c50c9](96c50c9)) * **security:** a credential keyword at the end of a line no longer masks the first word of the next line ([#2461](#2461)) ([b754a73](b754a73)) * **security:** a credential value is masked also when the next line starts with a parenthesis ([#2477](#2477)) ([ece25ca](ece25ca)), closes [#2471](#2471) * **security:** pin kubeconform and replace Checkov with Trivy's misconfiguration scan ([#2464](#2464)) ([960e357](960e357)) * **security:** refuse GCONV_PATH, SHELLOPTS, BASHOPTS and PS4 from a caller, and archive the merged security changes ([#2453](#2453)) ([1f9231d](1f9231d)) ### Code Refactoring * **ai:** chat_structured is the one structured-output path ([#2452](#2452)) ([3509732](3509732)) * **github:** pr check-readiness reads one merge-readiness verdict from github/ ([#2456](#2456)) ([16442c4](16442c4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The merge-readiness rules of
devops pr check-readinesslived inside the Typer modulecommands/pr.py, about 620 lines that printed their own warnings while they decided. No other caller could get the verdict as data, and the readiness tests patchedcommands.pr.run_gh, imported private names and replaced the GitHub session.github/merge_readiness.pyreturns the verdict as data: the blockers, the advisories (the warnings and information lines of today), the checks still running, the review threads that block and the grounding facts. It prints nothing and raises notyper.Exit. It readsghthrough a runner and the GitHub session through a session that a caller gives, asGitHubRoadmapStoredoes.roadmap/grounding.pyholds the item rules as public pure predicates over the grounding facts, inGROUNDING_RULES.devops pr check-readinessrenders the verdict. Its exit codes and its lines do not change; the thread table now prints after the advisories.check_verdict.read_commit_checksreplaces the private_fetch_checks_from_rest, andlist_pr_review_threadstakes an optional runner._classify_check_run, which no code called, is deleted.tests/test_item_grounding.py), the verdict runs overGitHubApiFakeandprocess_fakethrough the newgithub_api_and_ghfixture (tests/test_merge_readiness.py), and the command has a table of its exit codes and lines (tests/commands/test_pr.py). The replaced tests,tests/test_pr_check_runs.pyand therouted_sessionfixture are deleted.This is part 1 of #998. #2443 moves
devops pr readyanddevops pr monitoronto the verdict.Closes #2442
Change:
openspec/changes/archive/2026-10-28-2442-merge-readiness-verdict/