Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ The CLI prints the request ID before it sends anything and never repeats the req

## Fix verification and agent sessions

`review` and `findings` print each finding’s ID in text output for use with `fix context`, `fix-prompt`, and `review --verify`.

```sh
proofline fix list --repo owner/repository --pr 42
proofline fix context FINDING_ID
Expand Down
14 changes: 14 additions & 0 deletions src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ fn finding(out: &mut Vec<String>, finding: &Finding) {
if let Some(remediation) = &finding.remediation {
out.push(format!(" fix: {}", one_line(remediation)));
}
// fix and session commands take this ID, so text output must not need --json
out.push(format!(" id: {}", finding.id));
}

fn assessment(out: &mut Vec<String>, assessment: &Assessment) {
Expand Down Expand Up @@ -283,6 +285,18 @@ mod tests {
assert!(places.is_sorted(), "{text}");
}

#[test]
fn each_finding_prints_the_id_that_fix_commands_take() {
let mut item = finding("SERIOUS", "lost order");
item.id = uuid::Uuid::from_u128(0x0123_4567_89ab_cdef_0123_4567_89ab_cdef);
let detail = sample("COMPLETED", vec![item]);
let text = review(&detail, None, &url());
assert!(
text.contains(" id: 01234567-89ab-cdef-0123-456789abcdef\n"),
"{text}"
);
}

#[test]
fn model_text_cannot_drive_the_terminal() {
let detail = sample("COMPLETED", vec![finding("SERIOUS", "x\u{1b}[2J\ny")]);
Expand Down