Skip to content

fix(repos): Keep live rules and stricter thresholds - #7481

Merged
dan-petty merged 4 commits into
mainfrom
fix/7326-onboard-lowers-a-stricter-ruleset
Nov 28, 2026
Merged

dan-petty merged 4 commits into
mainfrom
fix/7326-onboard-lowers-a-stricter-ruleset

Conversation

@devops-cli-service

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

Copy link
Copy Markdown
Contributor

Row 10 of devops repos onboard writes the baseline main ruleset over the live ruleset and keeps only the live required check names, so each other live rule and each stricter live threshold is lost with no warning. On 2026-11-26 it removed the code_coverage rule of dan-petty/devops-cli and lowered its CodeQL, code quality and review-thread settings (#7326). Rule 5 of the repository rules lets only the owner lower a security or quality threshold, so the row must keep each live rule and each stricter live value, name each one, and leave the choice to the owner.

Closes #7326

Change: openspec/changes/archive/2026-11-28-7326-onboard-lowers-a-stricter-ruleset/

@devops-cli-service devops-cli-service Bot added type/docs Type docs: a change to the documents scope/spec labels Nov 27, 2026
@devops-cli-service devops-cli-service Bot changed the title docs(spec): plan #7326 Keep live rules and stricter thresholds fix(repos): Keep live rules and stricter thresholds Nov 28, 2026
@devops-cli-service devops-cli-service Bot added type/bug Type bug: the code does not do what it must scope/repos The devops repos commands and worktrees and removed type/docs Type docs: a change to the documents scope/spec labels Nov 28, 2026
@devops-cli-service
devops-cli-service Bot force-pushed the fix/7326-onboard-lowers-a-stricter-ruleset branch from 476d186 to f162eb4 Compare November 28, 2026 00:07
@devops-cli-service

Copy link
Copy Markdown
Contributor Author

The steps of the job:

Step Status Attempts Tokens in/out Last failing command
group 1 done 2 6101570/42984 -
group 2 done 1 5359668/26146 pytest on base: tests/github/onboard/test_onboard_rows.py
group 3 done 1 2000028/5753 -
  • tools: run_command 67, edit_file 27, read_file 26, grep 3, list_files 2, write_file 2, create_directory 1
  • scoped check pre-push: passed, 4 s
  • scoped check static: passed, 25 s
  • scoped check tests: passed, 45 s
  • scoped check strength: passed, 0 s
  • group 3: skipped, group 3: kind other
  • fail-to-pass of group 1: fails on the base commit. Tests that fail on the base commit: tests.github.onboard.test_onboard_ruleset_merge::test_merge_keeps_a_live_rule_that_the_baseline_lacks, tests.github.onboard.test_onboard_ruleset_merge::test_merge_keeps_a_stricter_live_threshold[higher coverage minimum], tests.github.onboard.test_onboard_ruleset_merge::test_merge_keeps_a_stricter_live_threshold[warnings kept over errors], tests.github.onboard.test_onboard_ruleset_merge::test_merge_keeps_a_stricter_live_threshold[medium CodeQL threshold], tests.github.onboard.test_onboard_ruleset_merge::test_merge_keeps_a_stricter_live_threshold[review thread resolution], tests.github.onboard.test_onboard_ruleset_merge::test_merge_keeps_a_stricter_live_threshold[checks enforced on create], tests.github.onboard.test_onboard_ruleset_merge::test_merge_keeps_a_live_required_checks_rule[live required checks rule kept], tests.github.onboard.test_onboard_ruleset_merge::test_merge_keeps_a_live_required_checks_rule[live check entry kept], tests.github.onboard.test_onboard_ruleset_merge::test_merge_takes_the_baseline_value_of_a_weaker_live_parameter, tests.github.onboard.test_onboard_ruleset_merge::test_merge_keeps_an_unranked_parameter, tests.github.onboard.test_onboard_ruleset_merge::test_merge_names_each_kept_setting, tests.github.onboard.test_onboard_ruleset_merge::test_merge_keeps_a_scanning_tool_that_the_baseline_lacks, tests.github.onboard.test_onboard_ruleset_merge::test_merge_names_a_kept_list_parameter, tests.github.onboard.test_onboard_ruleset_merge::test_merge_adds_a_baseline_rule_and_check.
  • fail-to-pass of group 2: fails on the base commit. Tests that fail on the base commit: tests.github.onboard.test_onboard_rows::test_a_stricter_live_ruleset_keeps_its_rule_and_names_it.
  • verify of group 3: uv run devops ci docs exits 0.
\u2139 Quality gate root: /run/roadmap/work/model-clone
\u2713 All documentation files are up to date.

@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 28, 2026 00:36
devops-cli-service Bot and others added 3 commits November 28, 2026 00:37
The rank tables of the ruleset merge lacked the GitHub values none and
all and held low_or_higher, which GitHub does not have, and they did not
rank max_coverage_drop. A live value that a table does not rank stays,
so a live none stayed over a stricter baseline value.

The merge also kept a stricter live parameter of the required checks
rule that the settings file of the repository sets, and it gave a
warning line for it, but the file value then won. The merge now leaves
each such parameter to the file and gives no warning line for it.
@dan-petty
dan-petty force-pushed the fix/7326-onboard-lowers-a-stricter-ruleset branch from f162eb4 to a87385d Compare November 28, 2026 00:42
A live required checks rule that the baseline lacks and that holds only
its checks gave the warning line "keeps the rule required_status_checks".
The change line of row 10 names each required check, so the rule gives
no warning line of its own.
@dan-petty

Copy link
Copy Markdown
Owner

Vetting of this pull request, 2026-11-28.

Fixes pushed to the branch (test first, each test failed before its fix):

  • a87385dee: the rank tables now hold each value of the REST API: none and all for security_alerts_threshold, none for alerts_threshold, all for severity. The table held low_or_higher, which GitHub does not have. max_coverage_drop is now ranked (lower is stricter). Before, a live none stayed over a stricter baseline value. Also, a parameter of the required checks rule that the settings file of the repository sets no longer gives a keeps warning line, because the row writes the file value.
  • d46a55551: a live required checks rule that holds only its checks gives no keeps the rule required_status_checks line (scenario "The required checks rule takes no warning").

Evidence:

  • uv run devops ci test tests/github/onboard/: 137 passed.
  • devops repos onboard dan-petty/devops-cli --plan --only 10 (GET only): this branch keeps code_coverage (minimum_coverage 90, max_coverage_drop 5), the CodeQL thresholds, code_quality.severity warnings and review thread resolution, and names each one. The code of main gives no warning line and writes over them (fix(repos): onboard lowers a stricter ruleset #7326).
  • An independent review ran 5,000 random baseline, live, file and check-run cases through ruleset_row's calls: a second run shows no difference, no ranked live value is lowered, no live check is lost except the checks that fix(repos): onboard requires a skipped check name #7318 drops, and each warning line names the value that the row writes.

Out of scope, filed as #7494: the top-level keys conditions, bypass_actors and enforcement, and the integration_id of a live check entry, are still written over (the second one was there before this change). The extra check PR title / Semantic PR title in the plan output is #7445.

@dan-petty
dan-petty merged commit 3e187f1 into main Nov 28, 2026
28 checks passed
@dan-petty
dan-petty deleted the fix/7326-onboard-lowers-a-stricter-ruleset branch November 28, 2026 00:59
dan-petty-release Bot added a commit that referenced this pull request Nov 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.231.1](v0.231.0...v0.231.1)
(2026-11-28)


### Bug Fixes

* **repos:** Keep live rules and stricter thresholds
([#7481](#7481))
([3e187f1](3e187f1))

---
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>
dan-petty added a commit that referenced this pull request Nov 28, 2026
The merge-readiness verdict of `devops pr ready`, `check-readiness` and
`pr monitor` now reads the checks with `gh pr checks --json`. gh reads
the check runs and the commit statuses, keeps the newest run of each
check and gives the bucket. When gh answers `no checks reported`, the
rules of the base branch decide: a required check keeps the wait, and no
required check gives the no-CI advisory.

This deletes the REST check and status reads, `workflow_triggers.py` (a
copy of the GitHub `on.pull_request` filters),
`pull_request_workflow_at`, the REST fallback of `devops pr checks` and
the `wcmatch` dependency. These broke in #5144, #5383 and #5408.

The verdict keeps all checks, not `--required`: on PR #7481, 3 of 29
checks were required, and `--required` would pass a failed Fail-to-Pass
Check (AGENTS.md rule 5). #7509, #7510 and #7512 do the rest of #7499.

Closes #7508
Change: `openspec/changes/archive/2026-11-28-7508-readiness-checks-gh/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/repos The devops repos commands and worktrees type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(repos): onboard lowers a stricter ruleset

1 participant