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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ This changelog is automatically generated by AI when releases are published.

## [Unreleased]

## [3.15.0] - 2026-11-17

### Added

- **`autter review` runs many more rule-based checks.** Besides secrets, static security, auth and race conditions, it now runs the deterministic layer of the rate-limiting, resilience, LLM security, RLS, privacy, logging, infrastructure-as-code, CI/CD, supply-chain, architecture, code-health, code-hygiene, TODO and UI checks, with your organization's settings. Still no AI model calls; still a few seconds.
- **Local reviews show on the pull request.** Autter keeps each `autter review` result, and the pull request's page lists the reviews of its branch, with each finding marked as still flagged by the PR review, dismissed by you, or no longer flagged.
- **`autter review --dismiss <finding-id> [--undo]`** dismisses (or restores) one finding of your last local review: it leaves `autter findings`, and the pull request's page shows it as dismissed. `autter findings --json` reports how many were dismissed.
- **VS Code extension 0.3.0**: dismissing a local-review finding also records it in Autter (*Show Dismissed Review Findings Again* restores it there too).

## [3.14.1] - 2026-11-17

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolver = "3"

[package]
name = "autter"
version = "3.14.1"
version = "3.15.0"
edition = "2024"
default-run = "autter"

Expand Down
5 changes: 5 additions & 0 deletions agent-support/vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how

## [Unreleased]

## [0.3.0] - 2026-11-17

- Dismissing a finding from **Autter: Review My Changes** also tells Autter, so the pull request's page shows it as dismissed. *Show Dismissed Review Findings Again* restores it there too.
- Local reviews run many more rule-based checks (needs autter CLI 3.15.0).

## [0.2.1] - 2026-11-17

- **Autter: Review My Changes** runs only the deterministic, rule-based checks (no AI calls), so it usually finishes in a few seconds. The full review runs on the pull request.
Expand Down
2 changes: 1 addition & 1 deletion agent-support/vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Findings are only shown on lines the review saw. Line numbers follow your edits:

The extension keeps `.autter/findings.md` up to date with every finding: a summary, its location, next steps, and a link. `.autter/` is added to `.git/info/exclude`, so it is never committed.

**Before a pull request exists**, run *Autter: Review My Changes*. It saves your files and runs `autter review`, which checks everything a pull request from this branch would contain (committed or not, new files included) with the deterministic, rule-based checks of Autter's PR review: secrets, static security, auth and race conditions. It makes no AI calls and usually takes a few seconds; the full review runs on the pull request. Its findings show up the same way, labelled "local review", and follow your edits the same way. The result is kept until you review again on that branch.
**Before a pull request exists**, run *Autter: Review My Changes*. It saves your files and runs `autter review`, which checks everything a pull request from this branch would contain (committed or not, new files included) with the deterministic, rule-based checks of Autter's PR review: secrets, security, race conditions, logging, infrastructure and CI/CD, supply chain, architecture, code health and more. It makes no AI calls and usually takes a few seconds; the full review runs on the pull request. Once you open the PR, its page in Autter lists these findings and which ones you dismissed. Its findings show up the same way, labelled "local review", and follow your edits the same way. The result is kept until you review again on that branch.

- **Sign in**: click **autter: Sign in** in the status bar. It runs `autter login` in a terminal.
- **Settings**: `autter.findings.display` (`inline`, `problems` or `off`; default `inline`) and `autter.findings.writeFile` (default `true`).
Expand Down
4 changes: 2 additions & 2 deletions agent-support/vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion agent-support/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "autter-vscode",
"displayName": "autter",
"description": "Keep track of code generated by AI.",
"version": "0.2.1",
"version": "0.3.0",
"icon": "autter.png",
"publisher": "autter",
"repository": {
Expand Down
63 changes: 63 additions & 0 deletions agent-support/vscode/src/findings-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
diagnosticMessage,
type FindingsOutcome,
inlineText,
isLocalFindingId,
parseFindingsOutput,
type PlacedFinding,
placeFindings,
Expand All @@ -19,6 +20,8 @@ import {

const SOURCE = "autter";
const DISMISSED_KEY = "autter.findings.dismissed";
/** Local-review finding id → the work tree it came from, to undo its dismissal there. */
const DISMISSED_LOCAL_KEY = "autter.findings.dismissedLocal";
const SAVE_DEBOUNCE_MS = 3_000;
const POLL_MS = 5 * 60_000;
const FOCUS_REFRESH_MIN_MS = 60_000;
Expand Down Expand Up @@ -479,10 +482,63 @@ export class FindingsManager implements vscode.CodeActionProvider {
}
}

/** Run a short CLI command in `cwd` and parse its JSON line; null when it failed to run. */
private async runCliJson(cwd: string, args: string[]): Promise<Record<string, unknown> | null> {
if (!(await resolveAutterBinary())) {
return null;
}
return new Promise((resolve) => {
let stdout = "";
const proc = spawn(getAutterBinary(), args, { cwd, timeout: 60_000 });
proc.stdout.on("data", (d) => {
stdout += d.toString();
});
proc.stderr.on("data", () => {});
proc.on("error", () => resolve(null));
proc.on("close", () => {
try {
resolve(JSON.parse(stdout.trim() || "null"));
} catch {
resolve(null);
}
});
});
}

/**
* A local review's finding: tell Autter (`autter review --dismiss`), so the
* pull request page shows it as dismissed. Best effort; the editor hides it
* either way.
*/
private async sendLocalDismissal(workdir: string, findingId: string, dismissed: boolean): Promise<void> {
const args = ["review", "--dismiss", findingId, "--json"];
if (!dismissed) {
args.push("--undo");
}
const out = await this.runCliJson(workdir, args);
if (dismissed && (!out || out.synced !== true)) {
const why = typeof out?.error === "string" ? ` (${out.error})` : "";
void vscode.window.showWarningMessage(
`autter: Dismissed here, but Autter did not record it${why}. The pull request page won't show it as dismissed.`,
);
}
}

private async dismiss(finding: CliFinding): Promise<void> {
const dismissed = new Set(this.context.workspaceState.get<string[]>(DISMISSED_KEY, []));
dismissed.add(finding.id);
await this.context.workspaceState.update(DISMISSED_KEY, [...dismissed]);
if (isLocalFindingId(finding.id)) {
const root = [...this.roots.values()].find((r) =>
[...r.placed.values()].some((list) => list.some((p) => p.finding.id === finding.id)),
);
if (root) {
const local = { ...this.context.workspaceState.get<Record<string, string>>(DISMISSED_LOCAL_KEY, {}) };
local[finding.id] = root.workdir;
await this.context.workspaceState.update(DISMISSED_LOCAL_KEY, local);
void this.sendLocalDismissal(root.workdir, finding.id, true);
}
}
for (const root of this.roots.values()) {
for (const [rel, list] of root.placed) {
const kept = list.filter((p) => p.finding.id !== finding.id);
Expand All @@ -498,6 +554,13 @@ export class FindingsManager implements vscode.CodeActionProvider {

private async restoreDismissed(): Promise<void> {
await this.context.workspaceState.update(DISMISSED_KEY, []);
// Local-review findings were also dismissed in Autter (and left out of
// `autter findings`): restore them there before refreshing.
const local = this.context.workspaceState.get<Record<string, string>>(DISMISSED_LOCAL_KEY, {});
await Promise.all(
Object.entries(local).map(([findingId, workdir]) => this.sendLocalDismissal(workdir, findingId, false)),
);
await this.context.workspaceState.update(DISMISSED_LOCAL_KEY, {});
this.refreshAll(true);
}

Expand Down
5 changes: 5 additions & 0 deletions agent-support/vscode/src/findings-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,8 @@ export function statusSummary(result: CliFindingsResult, shown: number): { text:
const icon = all.some((f) => f.severity === "critical") ? "$(error)" : total > 0 ? "$(warning)" : "$(pass)";
return { text: `${icon} autter: ${total}`, tooltip: lines.join("\n") };
}

/** A finding from a local review (`autter review`), whose dismissal is sent to Autter. */
export function isLocalFindingId(id: string): boolean {
return /^local-[0-9a-f]{1,8}-\d+$/i.test(id);
}
7 changes: 7 additions & 0 deletions agent-support/vscode/src/test/findings-model.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
type CliFindingsResult,
diagnosticMessage,
inlineText,
isLocalFindingId,
parseFindingsOutput,
type PlacedFinding,
placeFindings,
Expand Down Expand Up @@ -136,4 +137,10 @@ suite("Findings model", () => {
assert.strictEqual(withLocal.text, "$(error) autter: 1");
assert.ok(withLocal.tooltip.includes("1 from your last local review"));
});

test("tells local-review findings from PR findings", () => {
assert.strictEqual(isLocalFindingId("local-0123abcd-3"), true);
assert.strictEqual(isLocalFindingId("f-123"), false);
assert.strictEqual(isLocalFindingId("local-xyz"), false);
});
});
14 changes: 10 additions & 4 deletions src/commands/arg_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,13 +943,16 @@ autter findings [--write] [--branch <name>] [--pr <number>] [--repo <remote|owne
body: "\
autter review [<path>...] [--base <ref> | --uncommitted] [--write] [--repo <remote|owner/repo>]
[--org <slug>] [--json]
autter review --dismiss <finding-id> [--undo] [--json]

Runs the deterministic (rule-based) checks of Autter's pull request review
on your changes, so you learn about problems before a pull request exists:
secrets, static security, auth and permissions, and race conditions. Your
organization's review settings apply. It makes no AI model calls and
usually takes a few seconds; the full review, AI checks included, runs on
the pull request.
secrets, security (static, auth, rate limiting, resilience, LLM, RLS,
privacy), race conditions, logging, infrastructure and CI/CD, supply chain,
architecture, code health and hygiene, TODOs and UI. Your organization's
review settings apply. It makes no AI model calls and usually takes a few
seconds; the full review, AI checks included, runs on the pull request.
Its findings, and the ones you dismiss, show on the pull request's page.

By default it reviews what a pull request from this branch would contain:
everything since the merge base with the default branch (origin/HEAD,
Expand All @@ -965,6 +968,9 @@ autter review [<path>...] [--base <ref> | --uncommitted] [--write] [--repo <remo
--base <ref> Compare with the merge base of this branch or commit
--uncommitted Only changes not committed yet (compared with HEAD)
--write Also write .autter/findings.md
--dismiss <id> Dismiss one finding of your last local review: it leaves
`autter findings`, and the pull request page shows it as
dismissed. --undo restores it.
--repo The repository, when the remote doesn't identify it
--org <slug> Another organization you belong to
--json The result as JSON, with a `local` placement per finding
Expand Down
30 changes: 29 additions & 1 deletion src/commands/findings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -755,14 +755,26 @@ pub(crate) fn attach_local_review(result: &mut Value, local: &Local) {
if saved["branch"].as_str() != local.branch.as_deref() {
return;
}
let findings = place_local_findings(local, &saved);
// Findings dismissed with `autter review --dismiss` (or from the editor)
// are left out; the PR page still shows them, marked dismissed.
let dismissed = &saved["dismissed"];
let all = place_local_findings(local, &saved);
let dismissed_count = all
.iter()
.filter(|f| f["id"].as_str().is_some_and(|id| !dismissed[id].is_null()))
.count();
let findings: Vec<Value> = all
.into_iter()
.filter(|f| f["id"].as_str().is_none_or(|id| dismissed[id].is_null()))
.collect();
result["localReview"] = json!({
"reviewId": saved["result"]["review"]["reviewId"],
"reviewedAt": saved["reviewedAt"],
"base": saved["base"],
"baseRef": saved["baseRef"],
"files": saved["files"].as_object().map(|f| f.len()).unwrap_or(0),
"bundles": saved["result"]["review"]["bundles"],
"dismissed": dismissed_count,
"findings": findings,
});
}
Expand Down Expand Up @@ -1517,5 +1529,21 @@ diff --git \"a/sp\\303\\251cial \\\"q\\\".ts\" \"b/sp\\303\\251cial \\\"q\\\".ts
let mut result = json!({});
attach_local_review(&mut result, &other);
assert!(result["localReview"].is_null());

// A dismissed finding leaves the list and is counted.
let mut dismissed = saved.clone();
dismissed["dismissed"] = json!({ "f": { "at": "2026-11-17T10:00:00Z" } });
std::fs::write(local_review_path(&other), dismissed.to_string()).unwrap();
let mine = Local {
branch: Some("feat".into()),
..other
};
let mut result = json!({});
attach_local_review(&mut result, &mine);
assert_eq!(
result["localReview"]["findings"].as_array().unwrap().len(),
0
);
assert_eq!(result["localReview"]["dismissed"], 4);
}
}
Loading
Loading