Repository navigation
Description
Problem
Row 10 of devops repos onboard replaces the live main ruleset with the baseline of dan-petty/infra. It keeps only the required check names of the live ruleset. Each other live setting that is stricter than the baseline is lowered, with no warning that names it.
Evidence
On 2026-11-26 at 15:51 UTC the main ruleset of dan-petty/devops-cli changed (ruleset history):
- the
code_coveragerule (minimum 90, maximum drop 5) was removed code_qualityseverity went fromwarningstoerrors- the CodeQL thresholds went from
errors_and_warningsandmedium_or_highertoerrorsandhigh_or_higher required_review_thread_resolutionwent from true to false
The owner decision of 2026-11-23 on #6784 keeps row 10 of devops-cli pending until #6876, which is open. AGENTS.md rule 5 lets only the owner lower a threshold.
Done when
- Row 10 never removes a live rule and never lowers a live threshold. It names each live setting that is stricter than the baseline, and a person lowers it by hand if they want to. A test fails on the base.
Alternatives check of 2026-11-26: none.
Tool: none found.
Reason: Searches found settings-sync apps (safe-settings, repository-settings) and terraform-provider-github, but each enforces a baseline as-is, so it would still remove live rules and lower thresholds instead of naming the stricter live settings.
Lacks:
- No comparison that flags live rules stricter than a baseline
- Removes live rules and lowers thresholds when applied
- No report naming each setting a person must lower
- Provider cannot hold the code_quality ruleset rule (ADR 0035)
Proposed design
Problem statement
Row 10 of devops repos onboard writes the baseline main ruleset over the live ruleset. It keeps only the live required check names, so it removes each other live rule and lowers each stricter live threshold with no warning. AGENTS.md rule 5 lets only the owner lower a threshold. On 2026-11-26 the row lowered the main ruleset of dan-petty/devops-cli, and a person restored it. Row 10 must keep each live rule and stricter threshold, name each kept setting, and still add each baseline rule and required check.
Acceptance criteria
Requirement: Live rule kept
The ruleset merge of devops repos onboard SHALL keep each live ruleset rule that the baseline ruleset does not hold.
Scenario: Live coverage rule kept
- WHEN The live
mainruleset holds thecode_coveragerule withminimum_coverage90 and the baseline does not hold that rule. - THEN The merged ruleset body holds the
code_coveragerule withminimum_coverage90.
Requirement: Live numeric threshold kept
The ruleset merge SHALL keep a live numeric threshold that is stricter than the baseline threshold.
Scenario: Higher coverage minimum kept
- WHEN The live
code_coveragerule hasminimum_coverageset to 90 and the baseline hasminimum_coverageset to 80. - THEN The merged ruleset body holds
minimum_coverageset to 90.
Requirement: Code quality severity kept
The ruleset merge SHALL keep the live code_quality severity when it admits more findings than the baseline severity.
Scenario: Warnings kept over errors
- WHEN The live
code_qualityrule hasseverityset towarningsand the baseline haserrors. - THEN The merged ruleset body holds
severityset towarnings.
Requirement: CodeQL threshold kept
The ruleset merge SHALL keep a live code_scanning tool threshold that admits more alerts than the baseline threshold.
Scenario: Medium threshold kept over high
- WHEN The live
code_scanningrule holds a CodeQL tool withsecurity_alerts_thresholdset tomedium_or_higherand the baseline holdshigh_or_higher. - THEN The merged ruleset body holds the CodeQL tool with
security_alerts_thresholdset tomedium_or_higher.
Requirement: Live boolean kept
The ruleset merge SHALL keep a live boolean parameter that is true when the baseline value of the parameter is false.
Scenario: Review thread resolution kept
- WHEN The live
pull_requestrule hasrequired_review_thread_resolutionset totrueand the baseline hasfalse. - THEN The merged ruleset body holds
required_review_thread_resolutionset totrue.
Requirement: Unranked setting kept
The ruleset merge SHALL keep a live parameter that its comparison table does not rank, and SHALL name the rule and the parameter in one warning line.
Scenario: A new rule parameter stays
- WHEN The live
mainruleset holds a rule parameter that the comparison table does not rank and the baseline does not hold it. - THEN The merged ruleset body holds the live parameter, and the output holds one warning line that names the rule and the parameter.
Requirement: Stricter setting named
The ruleset merge SHALL write one warning line that names the rule and the parameter of each live setting that it keeps because the setting is stricter than the baseline.
Scenario: Warning names the coverage rule
- WHEN The live
mainruleset holds thecode_coveragerule withminimum_coverage90 and the baseline does not hold it. - THEN The output holds one warning line that names
code_coverageandminimum_coverage, and the command exits 0.
Requirement: Baseline addition applied
The ruleset merge SHALL add each baseline rule and each baseline required check that the live ruleset lacks.
Scenario: Baseline required check added
- WHEN The baseline
mainruleset requires the checklintand the live ruleset does not require it. - THEN The merged ruleset body requires the check
lint.
Requirement: No warning for equal settings
The ruleset merge SHALL write no warning line when the live ruleset holds no setting that is stricter than the baseline.
Scenario: Equal ruleset gives no warning
- WHEN The live
mainruleset equals the baseline ruleset. - THEN The output holds no warning line, the row is
present, and the run sends no ruleset write.
Existing Tool Considered
No open, maintained tool covers the need. The alternatives check of 2026-11-26 in the issue body gives the verdict none and names no tool; its block lists safe-settings, repository-settings and terraform-provider-github, and each enforces a baseline as-is, so it removes live rules and lowers thresholds instead of naming the stricter live settings. The change builds the comparison in row 10: about 50k tokens to write the comparison and its tests, about 10k tokens per later fix, about 5k tokens a year to keep it, and about 4 hours elapsed.
Key questions
- Which ADR makes
devops repos onboardthe owner of themainruleset?: ADR 0035, decision 7. The command manages themainruleset of each repository, with thecode_qualityrule, and does not wait for the OpenTofu provider. [sources: docs/adr/0035-the-onboard-command-owns-the-repository-settings.md:40, docs/adr/0035-the-onboard-command-owns-the-repository-settings.md:67] - How does the sync tell which of two values of one rule parameter is stricter?: It ranks each value by the set of findings or reviews that the value admits. It uses one fixed table for each rule type, and an unknown parameter keeps the live value. A larger minimum is stricter and a smaller maximum is stricter.
trueis stricter thanfalse. (best practice) [sources: AGENTS.md:11, docs/adr/0012-releases-are-derived-by-release-please-from-trunk-and-milestones-are-planning-buckets.md:96, docs/adr/0035-the-onboard-command-owns-the-repository-settings.md:43, openspec/specs/repos-onboard/spec.md:168, src/devops_cli/github/onboard/settings_rows.py:647]- Chosen: Fixed rank table for each rule type, unknown keeps live. The GitHub names do not order the values, so a table gives the correct order for each rule; an unknown parameter keeps the live value, so a new GitHub parameter is never lowered.
- Rejected: Text comparison of the two values. It puts
high_or_higherabovemedium_or_higher, so it lowers the live threshold. - Rejected: Keep the whole live ruleset when it differs. It also keeps a live value that is weaker than the baseline, so the baseline never raises it.
- What does row 10 do when it finds a live setting that is stricter than the baseline?: It keeps the setting in the merged ruleset body. It writes one warning line that names the rule and the parameter. It exits 0. A person may lower the setting by hand. (best practice) [sources: AGENTS.md:11, AGENTS.md:21, docs/adr/0035-the-onboard-command-owns-the-repository-settings.md:43, src/devops_cli/github/onboard/settings_rows.py:673]
- Chosen: Keep and warn, then continue. The row still applies the baseline, and the owner keeps the choice to lower the threshold.
- Rejected: Stop with a nonzero exit. It blocks the other rows of onboard and applies no baseline.
- Rejected: Warn and write the baseline value. It still lowers the live threshold, which AGENTS.md rule 5 forbids.
- Does the sync add a baseline rule or required check that the live ruleset lacks?: Yes. The sync adds each baseline rule and each baseline required check. A live rule stays, and a live parameter keeps the stricter value. The sync removes no live rule. (best practice) [sources: docs/adr/0035-the-onboard-command-owns-the-repository-settings.md:43, openspec/specs/repos-onboard/spec.md:168, src/devops_cli/github/onboard/settings_rows.py:621]
- Chosen: Union with the stricter value. It raises a weak live rule and never lowers a strict one.
- Rejected: The live ruleset wins on each difference. It never applies a new baseline rule.
- Rejected: The baseline wins on each difference. It lowers each stricter live rule, which is the defect.
- Does this change wait for feat(repos): answer the coverage question of the template #6876?: No. The change fixes the code of row 10 and needs no live write. The owner decision of 2026-11-23 on chore(repos): bring the 7 existing repositories to the baseline #6784 holds the run of row 10 on dan-petty/devops-cli until feat(repos): answer the coverage question of the template #6876; that hold covers the live repository, not this code change. The change is built and tested offline. (best practice) [sources: AGENTS.md:7, AGENTS.md:21, docs/adr/0035-the-onboard-command-owns-the-repository-settings.md:40, src/devops_cli/github/onboard/settings_rows.py:647]
- Chosen: Build the code fix now; leave the live run on hold. The change fixes row 10 in this repository, and the owner hold covers the live run on dan-petty/devops-cli.
- Rejected: Wait for feat(repos): answer the coverage question of the template #6876 before any code change. It blocks a code fix that the baseline rule requires, and feat(repos): answer the coverage question of the template #6876 is not a code prerequisite.
- Rejected: Run row 10 on dan-petty/devops-cli in this change. The owner decision of 2026-11-23 keeps that run pending, and AGENTS.md lets only the owner change a repository setting.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 26, 2026
The bug already lowered CodeQL thresholds and removed a coverage rule on a live repository, degrading security posture.dan-petty commentedon Nov 26, 2026
The
mainruleset of dan-petty/devops-cli was restored on 2026-11-26 at 18:24 UTC to its version of 2026-10-23, by a person. It requires 3 checks again and holds the coverage rule.devops-cli-service commentedon Nov 26, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (10)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 26, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 27, 2026
Plan state: branch
fix/7326-onboard-lowers-a-stricter-ruleset, draft pull request #7481. The pull request plans the item and closes no issue. The stage job and the step fix-plan edit this comment, and a comment of each run tells what the run did.The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:
A model review of the plan found these points. They stop no draft, and a person judges them:
otherat tasks (1): The merge applies the unranked-parameter rule to the required checks rule too, so it keeps the liverequired_status_checkslist and drops the baseline checks. The plan's own feasibility says the merge leaves that rule to the existing code, and the added requirement says the merged body adds the baseline check. Evidence: "and for each rule that both hold it keeps each live parameter that the baseline lacks, each live parameter that the rank table orders above the baseline value, and each live parameter that the table does not rank"false_premiseat proposal (feasibility): The feasibility says the read oftest_an_onboarded_repository_plans_no_changeshowedonboard_github.state.rulesets[0], but that test body uses only_onboarded,_run,render_reportand_row(report, 16);state.rulesets[0]appears in the earlier confirmed-run test. Evidence: "showed the fixtureonboard_github, the helper_onboardedand the stateonboard_github.state.rulesets[0]"false_premiseat tasks (2): The plan says the absence assertion intest_an_onboarded_repository_plans_no_changeexercises an equal ruleset, but_onboardedleaves the live ruleset with the required checkPR title / Semantic PR title, so the test does not set up the scenario's WHEN. Evidence: "Add the same absence assertion totest_an_onboarded_repository_plans_no_change, so an equal ruleset gives no warning line"contrived_testat tasks (2): The new row test assertsonboard_github.writes()is empty, but_rundefaults to a plan run, which sends no write at all, so that assertion passes whatever the row would do in a confirmed run. Evidence: "def _run(harness: OnboardHarness, *, confirm: bool = False, **options: Any) -> OnboardReport:"spec_delta_wrongat spec repos-onboard (Row 10 keeps each live rule and each stricter live threshold): The requirement first promises to keep each rule of the live ruleset and then exempts the required checks rule from the merge. The merge leaves that rule exactly as the baseline body holds it, and_with_required_checksadds only check entries, so a live required checks rule that neither the baseline nor the repository file holds is removed, and the issue forbids removing a live rule. Evidence: "The required checks rule SHALL stay outside that merge, and it SHALL hold each check of the live ruleset, of the baseline, of the repository file and of the reported checks."otherat tasks (2): The test that group 2 describes says it requires a live check with_declare_checks, but that helper writes thegithub/repository.yamlof the default branch, not the live ruleset. The test therefore sets up a different WHEN than the scenario, and the declared check is a difference, so the row ispendingand the scenario'spresentpart is not asserted. Evidence: "then require a live check with_declare_checksthat the baseline lacks and assert that the merged body holds it with no warning line"false_premiseat proposal (feasibility): The plan says no module of the onboard package merges a live ruleset with the baseline, but_with_required_checkstakes the live ruleset and merges its required checks into the baseline body, as the same feasibility list states. The premise that no such merge exists is contradicted by the module the plan quotes. Evidence: "so no module of the onboard package merges a live ruleset with the baseline."spec_delta_wrongat spec repos-onboard (Row 10 keeps each live required check): The added requirement keeps every live parameter of the required checks rule, but the plan runs_with_required_checksafter the merge and that function lets the repository file win each parameter it sets, as the existing requirement "The ruleset requires the reported and the declared checks" and its confirmed-run scenario require. The delta modifies neither requirement, so the new text contradicts the planned code and the base spec. Evidence: "Row 10 SHALL keep each required check of the live ruleset and each live parameter of the required checks rule."spec_delta_wrongat spec repos-onboard (Row 10 keeps each live required check): The revised text still keeps every live parameter of the required checks rule that the file does not set, but the other added requirementRow 10 keeps each live rule and stricter thresholdand the planned merge write the baseline value where the live value is weaker. For a weaker live parameter of that rule that the file leaves unset, the two added requirements give opposite results, so the delta contradicts itself and the code. Evidence: "It SHALL keep each live parameter of the required checks rule that the required checks rule of the settings file of the default branch does not set, and that file SHALL win for each parameter that it sets."false_premiseat proposal (feasibility): The plan says the docs verify needs the failure classlint, butverification_classgives a class only to thetest,lintandtypecheckrows ofdevops ci; thedocsrow names no class. Evidence: "such asdevops docs check, has no class: its failure still gets a repair turn, and its message names no class."contrived_testat tasks (2): The test appendsExtrato the live required checks rule and then asserts that the merged body requires it, but the live ruleset already requiresExtra, so the merge gives no difference and the row sends no write. The test has no merged body to read and can only assert the live state that it just set, which passes whatever the code does. Evidence: "then append the checkExtrato therequired_status_checksparameters of the same live ruleset, run row 10 again, and assert that the merged body requires it and thatrender_report(report)holds no warning line that names the required checks rule"false_premiseat design (decisions): The decision sayssearch_codefound no file for the settings path and thatbaseline.pyholds the one copy of the name, but the path is in many files, and the row tests hold their own copy in_SETTINGS_FILE, which the plan itself cites. Evidence: "search_codefor that path listed no file of the staged tree"contrived_testat tasks (2): The row test asserts that the merged body requiresExtra, but it runs a plan over a live ruleset that the test itself just set, so no body is written and the assertion passes whatever the merge does. Evidence: "assert that the merged body requires it and thatrender_report(report)holds no warning line that names the required checks rule"otherat tasks (2): The task says to run row 10 and assert the written body, but_rundefaults to a plan, where the row ispendingand writes nothing; the task does not say the run is a confirm. Evidence: "run row 10, and assert that the written body sets it to false"4 remaining items
fix(repos): onboard lowers a stricter ruleset (#7326)
docs(spec): archive the change (#7326)
devops-cli-service commentedon Nov 28, 2026
The draft pull request #7481 holds the final title and body. In mode
onofroadmap.fix_checks.mode, the watch row marks it ready when its checks pass, and a fix-checks Job repairs a failed check whose name gives the class test, lint or types. In each other case the watch row stops the item: another failed check, a cancelled check, a conflict, a fix-checks Job that ended with no repair, or another mode.Spend: 115 model requests, 13461266 input tokens, 74883 output tokens.
fix(repos): onboard lowers a stricter ruleset (#7326)
docs(spec): archive the change (#7326)
fix(repos): rank each GitHub value of a ruleset threshold (#7326)
fix(repos): name no live required checks rule in a warning (#7326)
devops-cli-service commentedon Nov 28, 2026
Released in v0.231.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.231.1
devops-cli-service commentedon Nov 28, 2026
Live since 2026-11-28 02:40 UTC