What Breakspec posts
A review runs on each push to a pull request. When it finishes, Breakspec posts three things on the pull request. You can open a complete example in the sample review.
The check
The check appears with the other checks on the pull request. Its title gives the number of findings and the number reproduced in simulation.
By default the check is advisory: it reports the findings and does not block the merge. Set BREAKSPEC_CHECK_MODE=blocking to make the check fail when the review blocks the change.
If a review cannot complete, the check is neutral. A fault in Breakspec does not block a merge.
The summary comment
The summary comment lists all findings of the review in one table, with the severity and the evidence level of each. It also lists what was checked and what was not checked.
There is one summary comment for each pull request. On a later push, Breakspec updates this comment in place.
The comment on each finding
Each finding that is on a changed line gets one comment on that line. A finding that is not on a changed line appears in the summary only.
| part | content |
|---|---|
| Title and description | What the defect is, in one or two sentences. |
| Expected | What the design must do. |
| Observed | What the design does. |
| Rule | The team rule the change breaks, quoted, with its file and line. Only when a rule applies. |
| Reproduction | The output of the simulation that Breakspec ran again. Only for a reproduced finding. |
| Last line | The severity, the evidence level and the finding identifier. |
The three evidence levels
Each finding states how far it got, in one of three phrases. The phrase is on the last line of the comment and in the summary table.
| evidence level | meaning |
|---|---|
| reproduced in simulation, rerun by Breakspec | A testbench was written against the RTL of the repository. Breakspec ran that simulation again itself and saw the reported output. |
| hazard shown in simulation, rerun by Breakspec | A testbench was written against the RTL of the repository. Breakspec ran that simulation again itself and saw the reported output. The output shows a condition that can fail on hardware, and no wrong value. |
| confirmed by reading the code, not run | A second agent tried to refute the finding against the code and could not. No simulation supports it. |
| raised by a reviewer, not examined | A reviewer raised the finding. No second agent examined it and nothing was run. |
A finding is called reproduced only after the rerun. The report of the agent that wrote the testbench is not sufficient.
A reproduced finding can use a fourth wording, "hazard shown in simulation, rerun by Breakspec". It means that the rerun showed a condition that can fail on hardware (for example a capture edge inside the change window of a crossing with no synchronizer) and no wrong value. The wording exists because a zero-delay RTL simulation cannot show metastability, so the word reproduced would say more than the simulation showed.
A finding that is not reproduced is never shown as proven. Read a finding at the third level as a suspicion to check.
Sometimes the second agent examines a finding and cannot decide. That finding has the phrase "uncertain after a second look". Read it as a suspicion to check too.
A finding that cites a team rule uses its own phrases, because nothing is simulated for a rule. See Team rules.
What reproduced means
An agent writes the testbench, the stimulus and the expected value. Breakspec runs it again and calls the finding reproduced only when it sees the reported output. This shows the output is real. It does not show that the stimulus is legal for your interface or that the expected value matches your design intent. Read the testbench with the finding.
A simulation does not model metastability. For a clock domain crossing, a reproduced finding shows only the output the testbench printed.
The waveform
The rerun of a reproduced finding records a waveform. Breakspec keeps this waveform with the finding.
The workspace shows the waveform on the page of the pull request, next to the simulation output of the finding. The comment on GitHub shows the simulation output as text.
A later push
A new push starts a new review of the pull request. Breakspec then does the following:
- It updates the check for the new commit.
- It updates the summary comment in place.
- It leaves the comment of a finding that still applies as it is. It does not post the comment again.
- It posts a comment for each new finding.
- It states in the summary how many earlier findings no longer appear.
- It resolves the thread of an earlier finding that no longer appears.
A finding that was withdrawn or accepted in a reply stays in the summary. It is not posted on the diff again.
A comment @breakspec review on the pull request runs the review again without a push.
Breakspec never opens a resolved thread again. Set BREAKSPEC_RESOLVE_THREADS=off to stop it from resolving threads.