Skip to content

feat(roadmap): the Service marks green stage drafts ready - #2882

Merged
dan-petty merged 12 commits into
mainfrom
feat/2865-service-marks-stage-pr-ready
Oct 31, 2026
Merged

dan-petty merged 12 commits into
mainfrom
feat/2865-service-marks-stage-pr-ready

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The stage job opens a draft pull request for each item it stages. Its plan is complete when it opens it. Nothing marked the draft ready, so a green plan stayed a draft and GitHub did not merge it.

This change adds the row stage_ready to the status lane of the Service. It is due on a first run and every 10 minutes. It needs no clone and no model.

  • A round reads only the open items whose record holds stage.pr and no stage.ready of the same number and no implement.job. With no such item it sends no request. It never reads the draft of a person.
  • A pull request that is not an open draft is recorded in stage.ready, so no later round reads it.
  • An open draft goes to ready_to_mark with its check runs. When every check run ended and passed, the round reads the pull request once more. If the head moved, the draft waits. Else it marks the pull request ready with mark_ready, the function of the implement job, and records stage.ready.
  • The check runs are read without the commit statuses, because the App token holds checks: read and no statuses.
  • A pull request that fails stops its item only. A 404 fails the item and records nothing. A rate limit, rejected credentials and the stop of the Service stop the round.
  • ready_to_mark is the one seam for the decision. feat(roadmap): Add a draft PR evaluator for issue and rules #2867 replaces its body.

The texts that said "the stage job never marks the pull request ready" are changed, and the generated documents follow.

Closes #2865

@dan-petty dan-petty added type/feature Type feature: a new function scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Oct 31, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Results of the ship stage.

Findings fixed:

  • 404 on the pull request read was recorded as settled (major). The row now lets the error fail its item and records nothing. Test: test_a_pull_request_that_github_cannot_find_fails_its_item_and_is_read_again. This also covers the missing 404 test.
  • A rate limit did not stop the round (major). write_each has a new argument also_stop, and the row passes GitHubRateLimitError. Test: test_a_rate_limit_stops_the_round_at_the_first_pull_request.
  • Race on the head commit (minor). The round reads the pull request again before it marks and leaves a draft whose head moved or that left the draft state. A window of milliseconds stays, as the design says. Test: test_a_head_that_moved_after_the_checks_stays_a_draft_and_is_read_again.
  • The docstring of write_each is wrapped at 100 columns (three duplicate findings).

The OpenSpec requirement, scenarios and design of the archived change hold the new rules.

Findings not fixed: none.

@dan-petty
dan-petty marked this pull request as ready for review October 31, 2026 16:13
@dan-petty
dan-petty merged commit 63fae06 into main Oct 31, 2026
19 checks passed
@dan-petty
dan-petty deleted the feat/2865-service-marks-stage-pr-ready branch October 31, 2026 16:13
dan-petty pushed a commit that referenced this pull request Oct 31, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.28.0](v0.27.0...v0.28.0)
(2026-10-31)


### Features

* **ai:** preview requests in dry run for rag ingest analyze
([#2873](#2873))
([c53bcec](c53bcec)),
closes [#2244](#2244)
* **ai:** preview requests in dry run for runs cost cache
([#2884](#2884))
([0df9777](0df9777))
* **roadmap:** the Service marks green stage drafts ready
([#2882](#2882))
([63fae06](63fae06)),
closes [#2865](#2865)
* **roadmap:** tool log names the reason of a retried call
([#2875](#2875))
([03d3dc5](03d3dc5)),
closes [#2866](#2866)


### Bug Fixes

* **ci:** devops ci test expands or refuses a path argument
([#2879](#2879))
([884a80b](884a80b)),
closes [#2868](#2868)
* **roadmap:** cap output and deadline of a step model call
([#2881](#2881))
([0c4bd3a](0c4bd3a)),
closes [#2869](#2869)

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(roadmap): the Service marks a stage pull request ready when its checks pass

1 participant