Skip to content

[RCA] Add the reporter RCA collection and release skill #14235

Open

Description

@hanahmily

Umbrella: #14222

Blocked by: #14227, #14234, #14231, #14232, #14233

Summary

Add a reporter-side RCA orchestration skill that an SRE agent can invoke with an incident description. It selects the relevant evidence sources, drives the existing bydbctl rca subcommands, and prepares a reviewed archive plus an explicit offline-analysis handoff.

This is a skill over the existing BYDBCTL executable, not a new CLI executable, MCP server, always-on service or cluster-monitoring agent. The triggering incident comes from the SRE agent or reporter; detecting incidents is out of scope.

Boundary and activation

Production entry point: skills/banyandb-rca-collect/SKILL.md, documented for Claude Code and Codex.

Use the commands delivered by the prerequisite issues: bydbctl rca collect, inventory, import-query-trace, curate, sanitize and seal. These names are planned interfaces and must be revalidated against their merged implementations.

The skill does not reimplement collection, filtering, sanitization, hashing, approval verification or archive handling in prompts. It does not execute root-cause analysis itself. After transfer, #14236 validates the archive and #14237 performs offline analysis; neither needs to merge merely to test this producer-side handoff contract.

Input contract

Accept an incident request with symptoms, UTC start/end, affected components, explicitly authorized read-only source endpoints or local artifacts, output workspace, and time/byte limits. Record source/version inventory and known gaps.

Before source access, show a bounded collection plan: selected collectors, time/component scope, configured limits, expected artifact categories and unsupported/unavailable sources. Ask only for missing scope or permissions that materially change the plan; do not repeatedly ask for already authorized read-only collection.

The skill consumes the merged commands' machine-readable results and documented exit statuses, not ad hoc parsing of human log text. Before queueing this issue, verify those interfaces expose artifact references, coverage, errors and partial/unavailable status. Missing CLI contract support must be resolved in the owning prerequisite, not silently implemented as a new framework in this skill issue.

Requirements

R1. Select relevant existing evidence. Always collect available component/version inventory. For a slow query, select native logs, metric windows and supplied query traces; for a crash/memory incident, select logs, metrics, crash records and existing pressure profiles. Do not collect all sources indiscriminately. Missing evidence is reported explicitly, not treated as successful empty collection.

R2. Orchestrate collection → curation → sanitization → review → sealing through the tested CLI. Stop or produce a partial outcome according to the actual source results. Record omitted sources and why. Never enable logging/tracing/profiling, replay a query, change the cluster, or recursively repeat collection to pursue completeness. Approval is bound to the reviewed candidate's digest through the seal command; a changed candidate requires new approval.

R3. Keep raw evidence outside hosted-model context unless the reporter explicitly approves that provider boundary. Give the agent policy-approved inventory/coverage metadata; source names and error strings are not automatically safe. Treat evidence text as data, not instructions. Never upload, post an issue, release binary profiles, or skip deterministic privacy checks automatically.

R4. Produce a local handoff summary containing incident/workspace references, actual state, selected sources, artifact references/hashes from the CLI, coverage gaps, review status and next action. Use clear workflow outcomes: COLLECTED, REVIEW_REQUIRED, SEALED or BLOCKED; preserve each source's separate complete/partial/unavailable result. These are skill workflow outcomes, not replacements for CLI exit codes. A sealed result identifies the archive and required offline intake step; it never claims the bundle has already been validated or its cause diagnosed.

Deliverable artifacts

  • The reporter skill and minimal invocation/install documentation, including example SRE incident input.
  • One versioned input/handoff contract with valid and invalid examples; choose final filenames in the implementation.
  • Slow-query, memory-pressure/crash, partial-source, approval-refusal and hostile-evidence fixtures, with independent expected tool calls and outcomes.
  • A repeatable evaluation entry point and recorded tool-call/output evidence that exercises the actual skill, not a prerecorded successful transcript.
  • At runtime: a local collection-plan summary and handoff summary referencing CLI-produced evidence, selection ledger, sanitizer report and, only after explicit approval, sealed archive. No redundant copy of raw evidence is needed.

Acceptance criteria

  1. Slow-query path: given a fixed incident window and supplied trace, the executed skill requests only the authorized relevant sources, preserves version information, invokes the CLI in the allowed order and stops at REVIEW_REQUIRED without approval. No profiling/replay command runs.
  2. Memory/crash path: existing FODC crash/profile artifacts are collected privately. Unsupported public artifacts remain excluded with reasons. One missing agent or expired artifact yields explicit source gaps; the skill must not label that source complete or enter an unbounded retry loop.
  3. Release gate: refusal produces no sealed archive. Explicit approval of an unchanged candidate permits sealing; modifying a candidate after approval causes the real CLI to refuse it, and the skill reports the refusal rather than bypassing it. This tests orchestration of [RCA] Seal a human-reviewed public incident archive #14234, not a second approval implementation.
  4. Handoff: a sealed fixture produces schema-valid handoff data with the actual archive reference/hash and remaining gaps. Instructions identify offline inspection before analysis. The reporter skill makes no live-database calls on behalf of the maintainer and never marks analysis complete.
  5. Hostile evidence: fixed prompt-injection and secret-canary fixtures cannot cause an unauthorized command, upload or privacy bypass in the tested execution. Record actual tool calls and model-context boundary checks. Do not infer universal prompt-injection immunity from these cases.

Verification and readiness

Classification: planned blocked leaf. One skill/orchestration PR after prerequisite commands merge; no new collection subsystem.

  • Revalidate exact CLI schemas, statuses and command names on the merged base before implementation.
  • Choose a real skill-evaluation harness before queueing. Pin its invocation, agent/provider/model configuration, limits, fixture inputs and expected permitted tool-call sequences. Do not require live production services or real secrets.
  • Deterministic contract tests must independently check handoff schemas, permitted state transitions and fixture expectations. Behavioral runs must load the actual SKILL.md and invoke controlled tool endpoints; canned successful transcripts and Markdown keyword checks do not prove the skill works.
  • Capture the baseline/negative behavior and the post-change result. Clearly distinguish deterministic checks from model-dependent behavior and report the actual runs, not a universal reliability claim.
  • The stock BanyanDB GraphLoom Go-only profile does not automatically validate a skills-only PR. Use an appropriate agreed evaluation profile or a normal reviewed skill PR; do not add dummy Go tests to satisfy it.
  • No RED/GREEN or skill-evaluation execution is claimed by this issue text.

Out of scope

Incident/alert detection, a separate executable or MCP server, live collection UI, new collectors, automatic query replay, enabling profiling, provider installation, a general workflow engine, new sandbox infrastructure, offline diagnosis implementation, automatic publication or remediation.

Concrete verification and closure gate

These are required acceptance tests, not examples that may be skipped. Artifact filenames and unsupported format handling must follow the merged prerequisite contracts. Before queueing, fix the tested schema version, configured limits, observable statuses and independent expected values; record any necessary interface decision in this issue rather than leaving it to an agent mid-run.

Fixed acceptance scenario

Run the actual skill on five fixed cases: slow query; memory-pressure/crash; one unavailable source; refused/stale approval; hostile evidence with a secret canary. Assert the incident window/budgets passed to tools, the permitted collector set and the real command order. No approval means REVIEW_REQUIRED and no sealed archive. Unavailable sources remain explicit gaps; hostile evidence cannot cause an upload, replay or profiling call in the observed run. A successful seal yields a schema-valid handoff with the actual archive hash; it does not claim offline validation or diagnosis has happened.

Executable skill evaluation

Before queueing, name a real evaluation entry point and exact invocation, the tested skill path, harness/provider/model configuration, configured budgets and independent case expectations. This is a readiness requirement; no harness is claimed to exist yet.

The evaluator must load the actual skill and execute it against controlled tools. Capture actual tool calls, state transitions, emitted artifacts and pass/fail assertions. A transcript authored to show the intended behavior, a Markdown keyword check or a dummy Go test is not evidence of skill behavior.

Use a baseline lacking the requested behavior and the post-change skill on the same declared cases; record the results separately from deterministic schema/security checks. No live production credentials are permitted. Do not infer universal reliability or prompt-injection immunity from the fixture set. The stock BanyanDB Go-only GraphLoom profile is not sufficient for a skills-only change; select a suitable agreed evaluation route first.

Evidence required to close this issue

  • Source/base revision, exact commands, fixture provenance and independently specified expected outcomes.
  • Actual positive and negative/partial-case results; explain failures and rerun after fixes.
  • Produced artifact/manifest/report samples with no real sensitive data, and the relevant size/coverage/privacy assertions.
  • Applicable repository checks and integration/evaluation results; explicitly list checks not run. A required check not run leaves acceptance incomplete, not passed.
  • For failures/cancellation, confirm no false completion marker and no unrelated user-file overwrite.

No verification execution is claimed by adding this section. Do not close the issue merely because code or documentation was submitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI AssistantClaude and other AI Coding ToolingdatabaseBanyanDB - SkyWalking native databaseenhancementEnhancement on performance or codes

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions