Skip to main content
Needs the Kane CLI release that ships kane-cli bugs (kane-cli bugs --help prints the command list). On an older build, bugs is an unknown command.
When a saved test fails, kane-cli works out why: its failure diagnosis (the RCA, root-cause analysis) reads the run’s evidence and writes down what went wrong. kane-cli also remembers the application bugs those diagnoses find, so the same bug is recognised the next time a test runs into it, and you and your coding agent can correct and enrich what it remembers with kane-cli bugs.
  • Each distinct bug gets a ref that is unique within your Test Manager project: BUG-12.
  • Repeat sightings of the same bug are folded into it, so you see one bug seen in five runs, not five bugs.
  • Your feedback (is it real, is the root cause right, a note) is read by the next diagnosis.

How bugs appear

  1. A saved test (kane-cli testmd run, or a test in a kane-cli testrun run suite) fails.
  2. The failure is diagnosed, and the diagnosis is uploaded with the run’s evidence.
  3. If the diagnosis found an application bug, kane-cli either files it as a new bug with its own BUG-<n> ref, or adds this run to the bug it already knows.
Each bug has a card: a title, the root cause, its RCA category, the page it happens on, and the error it shows. It also has a status, the votes people and agents gave it, and the list of runs it was seen in.

How the next diagnosis uses it

When a later run fails on the same page, its diagnosis is told about the known bugs there: their status, their votes, and the latest note. It links the run to one of them only when this run’s own evidence shows the same defect. A known bug is context for the diagnosis, never a shortcut past the evidence. That is why feedback matters:
  • Marking a bug real or not-real tells the next diagnosis how much weight it deserves.
  • Marking its root cause rca-wrong, with a note that says what is actually wrong, makes the next diagnosis re-diagnose from its own evidence instead of repeating the recorded root cause.
  • A note (“500 only when the cart already has items; an empty cart works”) is passed on as it is. The latest note is the one the diagnosis reads.
  • Marking a bug done tells the next diagnosis it was fixed: a run whose evidence shows that same defect again is linked to it, says the fix has regressed, and flags the bug regressed.
  • Marking a bug not-a-bug tells the next diagnosis people ruled it isn’t a product bug: for that symptom it reports a product bug only when the run’s own evidence clearly shows the product broken, and otherwise leans to a test or environment problem.

Which test and which project

kane-cli bugs works on a Test Manager project:
  1. --project <id>, if you pass it;
  2. else the project of the test file you name;
  3. else the project your folder is linked to;
  4. else your profile’s project (kane-cli config project <id>, see Test Manager integration).
To list the bugs of one test, the test needs a Test Manager test case. A test.md gets one the first time it runs with an upload. A test that has never uploaded has none: run it once, or pass --testcase <id> with the test case id from Test Manager.

Commands

List bugs

On a terminal you get a table:
VOTES is the net real-bug vote, then the net root-cause vote when it isn’t zero (rca -1 means more people said the root cause is wrong than right).

Show one bug

Prints the card (title, root cause, kind, severity, page, error signature), how often and when the bug was seen and in how many test cases, its votes, the runs it was seen in, and every piece of feedback still in force, each with its id (you need the id to take your own feedback back). BUG-12, bug-12 and 12 all mean the same bug.

Mark a bug

real, not-real, rca-right and rca-wrong are votes. done, not-a-bug and reopen are rulings.

Add a note

Quote the text. The next diagnosis reads the latest note on the bug.

Merge a duplicate

Says BUG-12 is the same bug as BUG-9 and merges 12 into 9. There is no confirmation prompt. The output says whether the bugs were merged, or the duplicate was recorded only as a suggestion. A merge is undone with a split in Test Manager.

Take your feedback back

The id is printed by mark and note, and listed by bugs show. You can take back only your own feedback.

RCA categories

The diagnosis gives every failure one RCA category. It picks one of your organisation’s own categories (the list in Org Preferences → Automatic AI RCA) whenever its description fits the failure, and otherwise the closest built-in category. Whether the failure is a product bug, a test problem or an environment problem is still decided separately. kane-cli bugs categories shows both lists and manages your organisation’s:
  • The diagnosis matches failures against a category’s description, so write it as the failures it covers. It uses one of your categories only while it is active and has a description.
  • A change applies to the next run, for everyone in your organisation.
  • Built-in categories can be listed and shown, never changed.
  • Adding, editing and removing need org admin, or the Product Preferences permission when your organisation uses roles.
  • A failed step’s reason, kane-cli bugs show and the run’s evidence name your category. A failure, and a bug, keep a category’s name after it is renamed or removed.
  • A category never decides which bug a failure joins: the same defect stays one bug whatever category each run gave it.
  • A bug keeps the category of the run that first found it. A bug recorded before you added a category doesn’t take it on, even when later runs pick it, so bugs list --category doesn’t list that bug.
  • The Org Preferences screen saves the whole list it loaded: saving it from a page opened before a change made here undoes that change.

Flags every subcommand takes

Statuses

The latest ruling wins. reopen drops a bug back to what its votes say.

Votes, people and agents

  • Feedback is recorded under the signed-in user, and it changes the bug for everyone in the project.
  • One vote per person. You have one real/not-real vote and one root-cause vote on each bug. Voting again replaces your vote; it does not add a second one.
  • Agents. When your coding agent runs kane-cli bugs … --agent, its feedback is recorded as the agent’s, made under your sign-in, and it counts the same as yours. bugs show labels each piece of feedback user or agent, so you can tell them apart. Your vote and your agent’s vote are the same vote: the latest one counts.

For agents

With --agent, or when stdout or stdin is not a terminal, every subcommand prints one JSON line:
and a refusal prints:
Exit codes: 0 done, 1 any refusal. A typical agent flow after a saved test fails: read the failure from its evidence pack, kane-cli bugs list <file>_test.md --agent to see what the test has hit before, kane-cli bugs show BUG-n --agent for the bug that matches, then mark and note from what this run’s evidence shows. The kane-cli agent skill carries this flow; see Using kane-cli from an AI coding agent.

Troubleshooting

Next steps