Skip to content

Commit 3dc7716

Browse files
coderabbitai[bot]hyperpolymathclaude
authored
Clarify catalog parsing, protected-file matching, and recipe requirements in docstrings (#567)
Update robot-repo-automaton docstrings to describe accepted catalog forms and parse errors, protected-file matching rules and their effect on fix confidence, and required recipe fields for conversion to a rule. Documentation only; no runtime behavior changes. Validation was not run. [View coding task](https://app.coderabbit.ai/code/tasks/644ad760-f790-5539-a914-61a2f1a2febf?source=coding_agent_github_pr_description) --------- Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> Co-authored-by: Jonathan Jewell <jonathan.jewell@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 98865a1 commit 3dc7716

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎robot-repo-automaton/src/catalog.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ impl ErrorCatalog {
155155
})
156156
}
157157

158+
/// Extract catalogue entries from a quoted `define` form or an already
159+
/// unwrapped list.
160+
///
161+
/// Returns a catalogue-parse error when `value` is not a non-empty list.
158162
fn find_catalog_content(value: &Value) -> Result<Vec<&Value>> {
159163
// Handle (define error-catalog '(...)) structure
160164
if let Some(cons) = value.as_cons() {

‎robot-repo-automaton/src/confidence.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,11 @@ impl ThresholdConfig {
298298
}
299299
}
300300

301-
/// Check if a file is protected from bot deletion or modification.
301+
/// Return whether a target matches a protected basename, extension, or
302+
/// directory marker used to lower confidence for automated fixes.
302303
///
303-
/// Protected files include project state, documentation, and checkpoint files
304-
/// that bots should NEVER delete or overwrite. These represent intentional
305-
/// project work that cannot be regenerated from templates.
304+
/// Basenames are matched case-insensitively; extension and directory matches
305+
/// are case-sensitive.
306306
fn is_protected_file(target: &str) -> bool {
307307
let basename = target.rsplit('/').next().unwrap_or(target);
308308

‎robot-repo-automaton/src/hypatia.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,9 @@ impl CicdHyperAClient {
639639
}
640640

641641
/// Convert a verisimdb-data recipe JSON to a Rule.
642+
///
643+
/// Returns `None` unless the recipe has a string `id` and either a string
644+
/// `file_glob` or `pattern`.
642645
fn recipe_to_rule(recipe: &serde_json::Value) -> Option<Rule> {
643646
let id = recipe.get("id")?.as_str()?.to_string();
644647
let name = recipe

0 commit comments

Comments
 (0)