fix(rhodibot): stop demanding filenames the estate abandoned - #534
Merged
Merged
Conversation
The checker's required-file table predated the Markdown/TXT -> AsciiDoc migration (#486, 2026-08) and the canonical-location changes after it, so it demanded filenames the estate had deliberately moved away from. Measured against 269 estate repositories on 2026-09-18: wants LICENSE.txt 0/269 have it (LICENSE: 269/269) wants CONTRIBUTING.md 25/269 (CONTRIBUTING.adoc: 255) wants CODE_OF_CONDUCT.md 15/269 (CODE_OF_CONDUCT.adoc: 240) wants SECURITY.md 35/269 (SECURITY.adoc: 250) wants lowercase justfile 7/269 (Justfile: 267) wants .machine_readable/STATE.scm 1/269 (.a2ml spelling: 13) A bot whose stated job is "structural checks, directory layout" was therefore telling essentially every repository to reintroduce the pre-migration filenames. Anyone acting on that - a maintainer, or the automation downstream - reverses the AsciiDoc migration. Required files now name the current convention, with the superseded spellings accepted as alternates so a rename is never reported as a regression. CheckDef gains `alternates`, and `check_path_exists()` tries the canonical path first and only falls back to alternates when it is absent, so the common case costs one request exactly as before. The Guile Scheme state files never landed (1/269, and 13/269 under the .a2ml spelling), so they drop to Recommended/Required at strict and above, and 0-AI-MANIFEST.a2ml - which 261/269 repositories do carry - becomes the machine-readable check that carries the weight. www/ awareness Adds www/.well-known/security.txt (canonical since #53) and a banned pattern for the legacy root .well-known/. Both are advisory at minimal and standard while the stage-5 migration window is open; the banned pattern's severity can be raised once the sweep has landed, which is what will stop the migration regressing. Two defects found while making the change * is_fixable() advertised four files as auto-fixable that robot-repo-automaton has no template for. get_template_content() falls through to String::new() for anything it does not recognise, so the automaton would open a PR creating those files EMPTY - and inbox-steward auto-merges PRs that pass CI. is_fixable() now matches the template arms exactly. * The automaton had no arm for SECURITY.adoc, so the renamed check would also have produced an empty file. Added, sharing SECURITY.tmpl. Rule IDs RSR-001..015 are unchanged, and the old spellings still map to them, so existing reports and .rsr.toml overrides keep resolving. Tests: rhodibot 50 passed (was 45 passing / 3 failing), including two new regression tests for the alternates path and the www/ check. Automaton 114 passed.
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
❌ Failed to create Coding Agent finishing-touch task. Please try again. |
Contributor
|
❌ Failed to create Coding Agent finishing-touch task. Please try again. |
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 RSR required-file table predated the Markdown/TXT → AsciiDoc migration
(#486, 2026-08), so rhodibot was demanding filenames the estate had
deliberately moved away from. Measured against 269 estate repositories:
LICENSE.txtLICENSE269/269CONTRIBUTING.mdCONTRIBUTING.adoc255CODE_OF_CONDUCT.mdCODE_OF_CONDUCT.adoc240SECURITY.mdSECURITY.adoc250justfileJustfile267.machine_readable/STATE.scm.a2mlspelling 13A bot whose stated job is "structural checks, directory layout" was telling
essentially every repository to reintroduce the pre-migration filenames —
i.e. to undo the AsciiDoc migration.
What changed
Required files now name the current convention, with the superseded spellings
accepted as alternates, so a completed rename is never reported as a
regression.
CheckDefgainsalternates, andcheck_path_exists()tries thecanonical path first and only falls back, so the common case still costs one
request.
Adds
RSR-016(www/.well-known/security.txt, canonical since #53) andRSR-017(legacy root.well-known/, remediation "move, do not delete"). Bothadvisory at minimal/standard while the stage-5 migration window is open.
Rule IDs
RSR-002…RSR-015are unchanged and still resolve from the oldspellings, so existing reports and
.rsr.tomloverrides keep working.Two defects found while in here, both fixed
is_fixable()advertised four auto-fixes with no template behind them.It listed 7 files;
robot-repo-automatonships 3 templates, andget_template_content()falls through toString::new()for anything itdoes not recognise — so it would open PRs creating
.gitattributes,.gitignore,.claude/CLAUDE.mdand.machine_readable/bot_directivesempty.
inbox-steward.ymlauto-merges PRs that pass CI. Narrowed to thethree that have templates.
SECURITY.adocarm inget_template_content(), so the renamed checkwould also have produced an empty file. Added, sharing
SECURITY.tmpl.Tests
failures were the tests asserting the stale filenames — the stale contract
written down in code — brought to the current canon. Two regression tests
added: superseded spellings still pass, and the
www/check is present andhonestly fails when absent.
Caveat on deployment
This PR does not by itself change what the deployed bot does.
deploy-bot-fleet.k9.nclsetsrhodibot.enabled = trueand points at.github/workflows/rhodibot.yml, which does not exist in this repo — the liveinstance is most likely a service under
deploy/systemd/. Someone with hostaccess needs to confirm where it runs.
Root cause, not addressed
standardshas zero references to rhodibot; its rules are hardcoded in Rust,which is how they went seven months stale. The durable fix is to make the
required-file table data with
standardsas the source of truth. Worth doingas a follow-up.