Skip to content

docs(openspec): plan #2877 Read check runs only in the implement watch - #3168

Merged
dan-petty merged 3 commits into
mainfrom
fix/2877-the-implement-job-watch-reads-commit
Nov 2, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/2877-the-implement-job-watch-reads-commit

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Plans #2877

The implement job watch reads the checks of its pull request through read_commit_checks. That function also calls the commit status endpoint, which needs the statuses read permission. The App token holds no such permission, so a refusal stops the item as "GitHub could not say whether the checks passed". The repository sets no commit status, so the call has no use.

The plan adds a keyword commit_statuses (default true) to the merge-readiness verdict, get_pr_monitoring_status and monitor_pr. watch_pull passes false, and the verdict then reads check runs only with read_check_runs. devops pr monitor, pr ready and pr check-readiness keep reading commit statuses. Tests run the whole watch with a refused status endpoint.

Change: openspec/changes/2877-the-implement-job-watch-reads-commit/

🤖 Generated with Claude Code

https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW

Copy link
Copy Markdown
Owner

Review of the plan for #2877.

CI: all 18 checks green or skipped (head 8aa72cf). Premise: holds on main. The only commit status call in src/ is check_verdict.py:337, reached by read_commit_checks from merge_readiness.py:239 through monitor_pr (implement_pull.py:93). read_check_runs exists (check_verdict.py:374) and stage_ready.py:108 already uses it. Dependency #2865 is closed (merged in #2882). Line references in Feasibility check out (implement_pull.py:82, implement_run.py:648/653, pr_monitor.py:515/540).

  1. The checks reader has two call shapes. read_check_runs(owner, repo_name, head_sha, *, session=None) takes no runner (check_verdict.py:374-380), but _judge_checks calls read_commit_checks(owner, repo_name, head_sha, runner=reads.runner, session=reads.session) (merge_readiness.py:239-241, read_commit_checks at check_verdict.py:395-402). Task 1.2 says only "_judge_checks calls reads.checks(...)" with the default read_commit_checks. If the call keeps runner=, read_check_runs raises TypeError; if it drops runner=, the default loses the runner that the commit status read needs. The plan hides the main design choice. Fix: state the call shape (for example, a reader type (owner, repo, sha, session) and a default that binds reads.runner, or a statuses: bool choice), put it in design.md, and make test 1.1 call a reader with the real read_check_runs signature.

  2. The guarantee the spec states is not tested end to end. The spec says the watch "SHALL NOT call the commit status API endpoint", and scenario 2 says a token without statuses gets the check run items and no unread reason. Test 2.1 replaces monitor_pr, so it proves only the keyword passed to a double. Nothing proves that monitor_pr passes checks to get_pr_monitoring_status (pr_monitor.py:643, which today passes no runner and no reader) and on to assess_merge_readiness (pr_monitor.py:540). Scenario 2 has no test at all. Fix: add to group 1 a test in the existing tests/github/test_github_pr_monitor.py (it exists; the plan does not list it) that runs get_pr_monitoring_status and monitor_pr with a fake reader and asserts the reader is called and read_commit_checks is not. Add a test that a refused status endpoint (edge double of the REST read) leaves the watch verdict intact. Add that file to Impact.

  3. Feasibility does not check the external premise. fix(roadmap): the implement job watch reads commit statuses, which the App token may not read #2877 says "no Job has reached the watch, so no run shows the refusal", and the Permission table of GitHub is the evidence. The plan cites only local read_file results and test commands. It is cheap to cite the table row (Commit statuses: read for GET /repos/{owner}/{repo}/commits/{ref}/status) and CONST_GITHUB_APP_TOKEN_PERMISSIONS. I did not re-check the GitHub table (not verified).

  4. Minor.

    • Task 1.2 does two things (new keyword on three functions and the _Reads field). Fine for one step, but the verify command runs only test_merge_readiness.py; run tests/github/test_github_pr_monitor.py too.
    • devops pr check-readiness (commands/pr.py:1203, :1545) and devops pr monitor (:737) keep the default; say in the design that the call sites stay unchanged and why a person's token needs statuses (design.md does, good).
    • The "Pending a person: tuicr" bullet is a plain bullet and allowed by openspec/config.yaml.

Spec check: ADDED requirement The implement job watch reads check runs only is new in roadmap-implement-job; no duplicate name. Title and body are a valid Conventional Commit with a real body. Existing Tool Considered is fine (it builds nothing).

Related issues: none open on the same code. #2865 (closed) added read_check_runs.

Verdict: hold until point 1 (call shape) and point 2 (end-to-end tests) are in the plan. Both are small.


Generated by Claude Code

Name the call shape (a `commit_statuses` keyword, not a reader), test the
whole watch with a refused status endpoint, cite the GitHub permission
table, and list the dependencies and the callers that stay unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
@dan-petty dan-petty changed the title docs(openspec): plan #2877 Read only check runs in the implement watch docs(openspec): plan #2877 Read check runs only in the implement watch Nov 2, 2026
@dan-petty
dan-petty merged commit 94f5dd4 into main Nov 2, 2026
20 checks passed
@dan-petty
dan-petty deleted the fix/2877-the-implement-job-watch-reads-commit branch November 2, 2026 17:19
dan-petty added a commit that referenced this pull request Nov 14, 2026
…ve (#5576)

Plans #3257

Staged designs restate the issue and give no reason for the chosen
design, and in #3163 and #3168 the missing alternative hid a wrong
premise. The stage check refuses a plan that states a decision and gives
no rejected alternative, and refuses an alternative whose evidence is
only an opinion. A fact is a path and line, a quoted command output or a
number. The planner prompt, the design rule and the verification prompt
state the rule, and the golden set holds a case of pull request 3168.
The rule lives in `content_problems` of the stage check, so the stage
job and the replay judge a plan with one rule set.

Change: `openspec/changes/3257-require-a-rejected-alternative-with-a/`

---------

Co-authored-by: devops-cli-service[bot] <349441588+devops-cli-service[bot]@users.noreply.github.com>
Co-authored-by: Daniel Petty <[email protected]>
dan-petty added a commit that referenced this pull request Nov 23, 2026
Issue #3257: a staged design often restates the issue and gives no
reason for the chosen design, and in #3163 and #3168 the missing
alternative hid a wrong premise. The stage check refuses a decision with
no rejected alternative and an alternative whose evidence is only an
opinion, before the implementation starts.

Closes #3257

Change:
`openspec/changes/archive/2026-11-23-3257-require-a-rejected-alternative-with-a/`

`uv run devops roadmap eval stage --replay`:
before: 86 of 323 (27%)
after: 87 of 324 (27%)
Base eval score: 86 of 323 (27%)
Head eval score: 87 of 324 (27%)
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.

2 participants