Skip to content

coderabbit: T8851: add .coderabbit.yaml for central-config inheritance - #1197

Merged
dmbaturin merged 1 commit into
currentfrom
claude/coderabbit-yaml-t8851
May 25, 2026
Merged

coderabbit: T8851: add .coderabbit.yaml for central-config inheritance#1197
dmbaturin merged 1 commit into
currentfrom
claude/coderabbit-yaml-t8851

Conversation

@andamasov

@andamasov andamasov commented May 24, 2026

Copy link
Copy Markdown
Member

Adds a minimal .coderabbit.yaml so this repo joins the CodeRabbit central-configuration inheritance chain (per T8851 / IS-430).

The file inherits the org-level baseline at vyos/coderabbit (loaded automatically because the central repo is named coderabbit under the same GitHub org) and only sets:

  • inheritance: true — required, otherwise the per-repo file would silently replace the central baseline instead of merging per-field on top of it.
  • knowledge_base.jira block — scopes CodeRabbit's Jira-context lookups to a specific project on the VyOS-Networks side. usage: auto self-disables on the public vyos source (no OAuth grant), activates on the private VyOS-Networks mirror (where the grant is attached). One file, both orgs.

Phase 0 status

Phase 0 local coderabbit review --base origin/<branch> --agent was run once on the canary vyos/.github worktree (operator-approved batch waiver — see T8851). The new file produced zero findings. The remaining PRs in this batch are byte-identical except for project_keys, so per-repo Phase 0 is waived for this fleet sweep.

Sibling tracking

🤖 Generated by robots

@github-actions

github-actions Bot commented May 24, 2026

Copy link
Copy Markdown

👍
No issues in PR Title / Commit Title

@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated internal development tool configuration to enable organization-level inheritance and integrate with project management systems.

Walkthrough

Adds .coderabbit.yaml (lines 1–29) to enable org-level configuration inheritance and configure Jira knowledge-base integration with usage: auto restricted to project key VD.

Changes

CodeRabbit Configuration Baseline

Layer / File(s) Summary
CodeRabbit configuration with Jira baseline
.coderabbit.yaml (lines 1–29)
Adds repository-level CodeRabbit configuration: inheritance: true and knowledge_bases.jira with usage: auto and project_keys: [VD].
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title accurately describes the main change: adding .coderabbit.yaml for central-config inheritance per task T8851.
Description check ✅ Passed Description is detailed and directly related to the changeset, explaining the purpose, configuration rationale, and testing status.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/coderabbit-yaml-t8851

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the current VyOS rolling release label May 24, 2026
@andamasov

Copy link
Copy Markdown
Member Author

@copilot review

Copilot AI commented May 24, 2026

Copy link
Copy Markdown

@copilot review

The .coderabbit.yaml looks good. A few observations:

  • inheritance: true is correctly set — without it the file would silently replace the org-level baseline rather than extend it.
  • usage: auto for the Jira block is the right cross-org-safe choice: it activates on the VyOS-Networks private mirror (where the Atlassian OAuth grant lives) and self-disables on the public vyos org.
  • project_keys: [VD] matches the VyOS Development Jira project, which is appropriate for this repo.
  • The YAML schema hint on line 1 enables editor validation against CodeRabbit's published schema.
  • The file is minimal by design — all other behavior is delegated to the central baseline at vyos/coderabbit.

No issues found.

@andamasov andamasov changed the title ci: add .coderabbit.yaml for central-config inheritance (T8851) ci: T8851: add .coderabbit.yaml for central-config inheritance May 24, 2026
@andamasov
andamasov force-pushed the claude/coderabbit-yaml-t8851 branch from a5fe33a to db577ac Compare May 24, 2026 11:47
@mergify mergify Bot removed the invalid-title label May 24, 2026
@andamasov
andamasov marked this pull request as ready for review May 24, 2026 12:06
@andamasov
andamasov force-pushed the claude/coderabbit-yaml-t8851 branch from db577ac to 2f8207d Compare May 25, 2026 10:17
@andamasov andamasov changed the title ci: T8851: add .coderabbit.yaml for central-config inheritance coderabbit: T8851: add .coderabbit.yaml for central-config inheritance May 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.coderabbit.yaml:
- Line 1: The repo's .coderabbit.yaml references schema.v2.json but the file
(and the central baseline) lack v2's required top-level keys (e.g., language,
tone_instructions, early_access, enable_free_tier, reviews, chat,
code_generation, issue_enrichment), so validation fails; fix by either switching
the schema URL to the compatible version (e.g., a v1 schema) or by adding the
missing required top-level properties to .coderabbit.yaml (populate language,
tone_instructions, early_access, enable_free_tier, reviews, chat,
code_generation, issue_enrichment with sensible defaults) so the file conforms
to schema.v2.json and the validator accepts overrides like inheritance and
knowledge_base.jira.project_keys.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: b5d8fe96-bcce-40a0-9d97-6464ec48918b

📥 Commits

Reviewing files that changed from the base of the PR and between db577ac and 2f8207d.

📒 Files selected for processing (1)
  • .coderabbit.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: build_iso
  • GitHub Check: codeql-analysis-call / Analyze (python)
  • GitHub Check: Mergify Merge Queue
  • GitHub Check: Mergify Merge Protections
  • GitHub Check: Summary
🔇 Additional comments (1)
.coderabbit.yaml (1)

16-20: LGTM!

Comment thread .coderabbit.yaml
@@ -0,0 +1,29 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify schema URL is accessible and retrieve schema for validation

# Check if schema URL is accessible
echo "Checking schema URL accessibility..."
curl -sf -o /tmp/coderabbit-schema.json "https://coderabbit.ai/integrations/schema.v2.json"

if [ $? -eq 0 ]; then
  echo "✓ Schema URL is accessible"
  echo ""
  echo "Schema properties (top-level keys):"
  jq 'keys' /tmp/coderabbit-schema.json 2>/dev/null || echo "Failed to parse JSON"
  echo ""
  echo "Checking if 'inheritance' is documented:"
  jq '.properties.inheritance // "NOT FOUND"' /tmp/coderabbit-schema.json 2>/dev/null
  echo ""
  echo "Checking if 'knowledge_base' is documented:"
  jq '.properties.knowledge_base // "NOT FOUND"' /tmp/coderabbit-schema.json 2>/dev/null
else
  echo "✗ Schema URL is not accessible"
  exit 1
fi

Repository: vyos/vyos-build

Length of output: 268


🏁 Script executed:

#!/bin/bash
set -euo pipefail

SCHEMA_URL="https://coderabbit.ai/integrations/schema.v2.json"
SCHEMA_PATH="/tmp/coderabbit-schema.json"

echo "== Fetch headers =="
curl -sSI "$SCHEMA_URL" | sed -n '1,20p'

echo "== Download schema =="
curl -sSLf "$SCHEMA_URL" -o "$SCHEMA_PATH"
echo "Saved: $SCHEMA_PATH ($(wc -c < "$SCHEMA_PATH") bytes)"

echo "== First bytes (debug) =="
head -c 300 "$SCHEMA_PATH" | cat -v; echo
echo

echo "== Parse + inspect schema =="
python3 - <<'PY'
import json,sys
path="/tmp/coderabbit-schema.json"
with open(path,'r',encoding='utf-8') as f:
    try:
        data=json.load(f)
    except Exception as e:
        print("JSON parse failed:",repr(e))
        sys.exit(2)

print("Top-level keys:",sorted(list(data.keys())))
props=data.get("properties",{})
print("Has properties:",isinstance(props,dict))
for k in ["inheritance","knowledge_base"]:
    print(f"properties.{k} exists:", k in props)
kb=props.get("knowledge_base",{})
print("knowledge_base type:", kb.get("type"))
print("knowledge_base subkeys:", sorted(list(kb.get("properties",{}).keys())) if isinstance(kb.get("properties"),dict) else None)
PY

echo "== Inspect .coderabbit.yaml =="
python3 - <<'PY'
import yaml,json
from pathlib import Path
p=Path(".coderabbit.yaml")
data=yaml.safe_load(p.read_text(encoding="utf-8"))
print("Loaded YAML type:",type(data))
print("Top-level keys:",sorted(data.keys()))
print("inheritance:",data.get("inheritance"))
kb=data.get("knowledge_base",{})
print("knowledge_base keys:", sorted(kb.keys()))
print("knowledge_base.jira:", kb.get("jira"))
PY

Repository: vyos/vyos-build

Length of output: 1351


🏁 Script executed:

#!/bin/bash
set -euo pipefail

SCHEMA_URL="https://coderabbit.ai/integrations/schema.v2.json"
SCHEMA_PATH="/tmp/coderabbit-schema.json"

curl -sSLf "$SCHEMA_URL" -o "$SCHEMA_PATH"

python3 - <<'PY'
import yaml, json, sys, subprocess

# Ensure jsonschema is available
try:
    import jsonschema
except Exception:
    subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "jsonschema"])
    import jsonschema

schema_path="/tmp/coderabbit-schema.json"
with open(schema_path, "r", encoding="utf-8") as f:
    schema=json.load(f)

with open(".coderabbit.yaml","r",encoding="utf-8") as f:
    cfg=yaml.safe_load(f)

# Draft 2020-12 is declared in schema
resolver=jsonschema.RefResolver.from_schema(schema)
validator=jsonschema.Draft202012Validator(schema, resolver=resolver)

errors=sorted(validator.iter_errors(cfg), key=lambda e: e.path)
if not errors:
    print("YAML config validates against schema.v2.json: OK")
    sys.exit(0)

print("YAML config validation errors:")
for e in errors[:50]:
    path="/".join(str(p) for p in e.path)
    print(f"- path={path or '<root>'}: {e.message}")
print(f"Total errors: {len(errors)}")
sys.exit(2)
PY

Repository: vyos/vyos-build

Length of output: 960


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== .coderabbit.yaml =="
nl -ba .coderabbit.yaml | sed -n '1,200p'

echo
echo "== Schema required list + relevant inheritance logic =="
python3 - <<'PY'
import json,re
schema_path="/tmp/coderabbit-schema.json"
with open(schema_path,'r',encoding='utf-8') as f:
    s=json.load(f)

print("required:", s.get("required"))
text=json.dumps(s)
print("contains 'inheritance':", "inheritance" in text)

# Print any top-level/conditional logic mentioning inheritance or allOf/anyOf/if/then/oneOf
for kw in ["allOf","anyOf","oneOf","if","then","else","not"]:
    if kw in s:
        print("top-level has",kw)
# Search for inheritance in conditions-ish areas
m=re.findall(r'(?i).{0,80}"inheritance".{0,80}', text)
print("inheritance context snippets:", len(m))
for snip in m[:5]:
    print("-", snip)
PY

Repository: vyos/vyos-build

Length of output: 143


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
p=Path(".coderabbit.yaml")
lines=p.read_text(encoding="utf-8").splitlines()
for i,l in enumerate(lines,1):
    print(f"{i:4d}\t{l}")
PY

echo
echo "== Schema required list =="
python3 - <<'PY'
import json
s=json.load(open("/tmp/coderabbit-schema.json","r",encoding="utf-8"))
req=s.get("required",[])
print(req)
PY

echo
echo "== Schema: inheritance-related snippets (first 30 hits) =="
python3 - <<'PY'
import json,re
s=json.load(open("/tmp/coderabbit-schema.json","r",encoding="utf-8"))
text=json.dumps(s)
hits=[]
for m in re.finditer(r'(.{0,60}"inheritance".{0,60})', text):
    hits.append(m.group(1))
for h in hits[:30]:
    print("-",h)
print("Total hits:",len(hits))
PY

Repository: vyos/vyos-build

Length of output: 2037


🏁 Script executed:

#!/bin/bash
set -euo pipefail

SCHEMA_URL="https://coderabbit.ai/integrations/schema.v2.json"
SCHEMA_PATH="/tmp/coderabbit-schema.json"
BASELINE_URL="https://raw.githubusercontent.com/vyos/coderabbit/production/.coderabbit.yaml"
BASELINE_PATH="/tmp/coderabbit-baseline.yaml"

curl -sSLf "$SCHEMA_URL" -o "$SCHEMA_PATH"
curl -sSLf "$BASELINE_URL" -o "$BASELINE_PATH"

python3 - <<'PY'
import yaml, json, sys, copy
import jsonschema

def deep_merge(a,b):
    # b overrides a; dicts merge recursively; other types/arrays replaced
    if isinstance(a, dict) and isinstance(b, dict):
        out = dict(a)
        for k,v in b.items():
            out[k] = deep_merge(out.get(k), v) if k in out else copy.deepcopy(v)
        return out
    return copy.deepcopy(b)

schema_path="/tmp/coderabbit-schema.json"
baseline_path="/tmp/coderabbit-baseline.yaml"
override_path=".coderabbit.yaml"

schema=json.load(open(schema_path,"r",encoding="utf-8"))
baseline=yaml.safe_load(open(baseline_path,"r",encoding="utf-8"))
override=yaml.safe_load(open(override_path,"r",encoding="utf-8"))
merged=deep_merge(baseline, override)

validator=jsonschema.Draft202012Validator(schema)
def validate(label,cfg):
    errs=sorted(validator.iter_errors(cfg), key=lambda e: list(e.path))
    print(f"\n== {label} ==")
    print("Top-level keys:", sorted(cfg.keys()))
    if not errs:
        print("Schema validation: OK")
        return
    print("Schema validation errors (first 20):")
    for e in errs[:20]:
        p="/".join(str(x) for x in e.path) if e.path else "<root>"
        print(f"- path={p}: {e.message}")
    print("Total errors:",len(errs))

validate("override-only (.coderabbit.yaml)", override)
validate("baseline+override (deep-merged)", merged)

# Print Jira project key constraints if present
kb_jira = schema.get("properties",{}).get("knowledge_base",{}).get("properties",{}).get("jira",{})
pj = kb_jira.get("properties",{}).get("project_keys",{})
print("\n== Schema constraints (knowledge_base.jira.project_keys) ==")
print("project_keys schema:", {k:pj[k] for k in pj.keys() if k in ["type","items","minItems","maxItems","pattern","minLength","maxLength"]} )
PY

Repository: vyos/vyos-build

Length of output: 1134


🏁 Script executed:

#!/bin/bash
set -euo pipefail

SCHEMA_URL="https://coderabbit.ai/integrations/schema.v2.json"
SCHEMA_PATH="/tmp/coderabbit-schema.json"
BASELINE_URL="https://raw.githubusercontent.com/vyos/coderabbit/production/.coderabbit.yaml"
BASELINE_PATH="/tmp/coderabbit-baseline.yaml"

curl -sSLf "$SCHEMA_URL" -o "$SCHEMA_PATH"
curl -sSLf "$BASELINE_URL" -o "$BASELINE_PATH"

python3 - <<'PY'
import yaml, json, sys
import jsonschema

schema=json.load(open("/tmp/coderabbit-schema.json","r",encoding="utf-8"))
baseline=yaml.safe_load(open("/tmp/coderabbit-baseline.yaml","r",encoding="utf-8"))
override=yaml.safe_load(open(".coderabbit.yaml","r",encoding="utf-8"))

print("== baseline top-level keys ==")
print(sorted(baseline.keys()))
print("baseline missing required:",
      [k for k in schema.get("required",[]) if k not in baseline])

print("\n== override top-level keys ==")
print(sorted(override.keys()))
print("override missing required:",
      [k for k in schema.get("required",[]) if k not in override])

# Validate baseline and override separately
validator=jsonschema.Draft202012Validator(schema)

def validate(label,cfg):
    errs=list(validator.iter_errors(cfg))
    errs=sorted(errs, key=lambda e: list(e.path))
    print(f"\n== validate {label} ==")
    if not errs:
        print("OK")
        return
    print("Errors:")
    for e in errs[:20]:
        p="/".join(str(x) for x in e.path) if e.path else "<root>"
        print(f"- path={p}: {e.message}")
    print("Total errors:",len(errs))

validate("baseline-only", baseline)
validate("override-only", override)

PY

Repository: vyos/vyos-build

Length of output: 1199


Schema URL is reachable, but schema.v2.json doesn’t match the repo/org config shape.

vyos/vyos-build/.coderabbit.yaml (lines 1-29) references https://coderabbit.ai/integrations/schema.v2.json; the endpoint is accessible and returns valid JSON (via a 301 redirect to https://www.coderabbit.ai/integrations/schema.v2.json). However, schema.v2.json marks top-level keys like language, tone_instructions, early_access, enable_free_tier, reviews, chat, code_generation, and issue_enrichment as required, and both:

  • the repo override (inheritance + knowledge_base only), and
  • the referenced central baseline (https://raw.githubusercontent.com/vyos/coderabbit/production/.coderabbit.yaml)
    fail validation for those missing required properties. This means the schema URL/version is reachable, but the v2 schema doesn’t appear to be compatible with the actual baseline/override files currently used here—so value-level checks like knowledge_base.jira.usage: auto and project_keys: ['VD'] can’t be trusted to be schema-valid based solely on this endpoint.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.coderabbit.yaml at line 1, The repo's .coderabbit.yaml references
schema.v2.json but the file (and the central baseline) lack v2's required
top-level keys (e.g., language, tone_instructions, early_access,
enable_free_tier, reviews, chat, code_generation, issue_enrichment), so
validation fails; fix by either switching the schema URL to the compatible
version (e.g., a v1 schema) or by adding the missing required top-level
properties to .coderabbit.yaml (populate language, tone_instructions,
early_access, enable_free_tier, reviews, chat, code_generation, issue_enrichment
with sensible defaults) so the file conforms to schema.v2.json and the validator
accepts overrides like inheritance and knowledge_base.jira.project_keys.

@github-actions

Copy link
Copy Markdown

CI integration 👍 passed!

Details

CI logs

  • Config tests 👍 passed

@dmbaturin
dmbaturin merged commit 4c0a579 into current May 25, 2026
16 of 17 checks passed
@dmbaturin
dmbaturin deleted the claude/coderabbit-yaml-t8851 branch May 25, 2026 18:05
@vyosbot vyosbot added mirror-initiated This PR initiated for mirror sync workflow mirror-completed and removed mirror-initiated This PR initiated for mirror sync workflow labels May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

current VyOS rolling release mirror-completed

Development

Successfully merging this pull request may close these issues.

4 participants