rafa pages
- rafa
- rafa bug
rafa bug
List and rank the cause codes a bug can carry, and recheck whether filed bugs still reproduce on the current version.
A loop files the bugs it meets with a cause code, such as git:no-identity, from one list a project can extend. rafa bug lists and ranks those codes, and reruns the test each bug names to see whether it still reproduces.
Spends: nothing. Changes: codes reads only; recheck runs the tests the bugs name.
In the target layout's cut table this code counts toward the command-line package, @open-tomato/rafa, at the root of the repository, which is where it lives in 0.47.0 too (Repository layout). [verify: its final placement]
Actions
| Action | Does |
|---|---|
codes | list the cause codes a bug can carry, rank the closest to a cause in words, or check for codes that read alike |
recheck | rerun the test each bug's Rerun section names and judge whether the bug still reproduces |
rafa bug codes
List the cause codes a bug can carry, rank the closest to a cause in words, or check for codes that read alike.
rafa bug codes [--suggest=<string>] [--no-proposals] [--family=<string>]
[--check]
Lists the cause codes: rafa's own, then the ones the project adds under errors.codes in .rafa/config.yaml. A code is <family>:<leaf>: the family names the gate or tool that tripped, the leaf the condition. Prints each family alphabetically with its count and what it stands for, (project) for a family only the project declares, its codes under it, and a closing line naming the reserved codes: every family also takes <family>:new-context for a cause no leaf fits yet, and unknown:new-context is the last resort. --family narrows the list to one family, and a family nobody declares is refused with the families that exist. --suggest ranks the codes closest to a cause written in words, best first, at most five, each with the share of the text's words it holds; it never picks one, and a text sharing no word with any code says so with exit code 0. --suggest reads the tracker too: the Proposed cause of each open bug is ranked beside the codes, its line naming the bug that proposed it, and a tracker that cannot be read is a warning, the codes ranked without proposals. --no-proposals skips the read, and is refused without --suggest. --check prints the pairs of codes of one family that read alike and exits 1 when there is one; it is refused beside --suggest. With --output=json the families, the codes with the source of each, the suggestions and the pairs are the data of the terminal result event, and of a bug-codes-alike event ahead of the refusal when --check finds a pair. Writes nothing and starts no session.
| Flag | Type and default | What it does |
|---|---|---|
--suggest | string | A cause in words, quoted: the codes closest to it are ranked, best first. |
--proposals | boolean, default true | Rank the open bugs' proposed codes beside the list's under --suggest; --no-proposals reads no tracker. |
--family | string | The one family to list, such as git. |
--check | boolean | Print the pairs of codes of one family that read alike, and exit 1 when there is one. |
Examples:
rafa bug codes: Prints every family alphabetically, each with its codes, rafa's and the project's alike.rafa bug codes --suggest="git commit has no author identity": Ranks the closest codes, git:no-identity first, beside the codes open bugs proposed.rafa bug codes --suggest="branch not found" --no-proposals: Ranks the list's codes alone, reading no tracker.rafa bug codes --family=git: Prints the git family alone.rafa bug codes --check: Exits 1 when two codes of one family read alike, naming each pair.
Output formats: text, json.
rafa bug recheck
Rerun the test each bug's Rerun section names and judge whether the bug still reproduces.
rafa bug recheck [n] [--all] [--comment]
Reruns the test a bug's Rerun section names and judges each bug reproduces, gone, flaky, stale, manual or skipped. A Rerun value is read strictly as bun test <file> [-t "<case>"] and run through the suite runner with no shell; anything else is manual, shown with the bug's Reproduce text. A file outside the checkout is manual, a file not there stale. A first run that fails is reproduces; one that passes is followed by bugs.recheck.runs more, each under bugs.recheck.timeoutSeconds, and all passing is gone, some failing flaky. On any tracker but local, only a bug opened by a trusted author runs: an author outside board.trustedAuthors with no write access is skipped. The test runs with every named secret left out of its environment. A chain that fell back from tracker.default exits 1 before reading any bug. --comment posts the verdict on every gone and flaky bug, redacted, and closes none. With --output=json the report is the data of the terminal result event. Exits 0 whatever the verdicts, and starts no session.
| Argument | Type | What it is |
|---|---|---|
n | string | A bug's issue number on the tracker; more than one may be named. Left out, --all is required. |
| Flag | Type and default | What it does |
|---|---|---|
--all | boolean | Recheck every open bug the tracker lists. |
--comment | boolean | Post the verdict on every gone and flaky bug, redacted; no bug is closed. |
Examples:
rafa bug recheck --all: Rechecks every open bug and prints one line per bug.rafa bug recheck 412: Rechecks bug 412 alone.rafa bug recheck 412 415 --comment: Rechecks two bugs and comments on each that is gone or flaky.
Output formats: text, json.