Skip to content

[Tooling] Lighter Bugbot reviews: smart effort, skip drafts - #1365

Merged
Aymericr merged 3 commits into
mainfrom
tooling/bugbot-lighter
Dec 5, 2026
Merged

Aymericr merged 3 commits into
mainfrom
tooling/bugbot-lighter

Conversation

@Aymericr

@Aymericr Aymericr commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Adds a repo-level Bugbot config at .cursor/config/bugbot.yaml to reduce review cost without weakening review of security-sensitive code. Today every review runs on the dashboard defaults at high effort.

  • Skip drafts (triggers.drafts: false): draft PRs are no longer reviewed automatically. Mark a PR "Ready for review" to get a Bugbot pass. Reviews still run on every push after that (frequency: everyPush).
  • Smart effort (review.effort: smart) with a smartPrompt that asks for:
    • High effort, which wins for the whole PR if any change matches:
      • core scene and geometry logic (packages/core, packages/nodes, packages/geometry-script), the MCP server (packages/mcp), file import/export and parsing (packages/ifc-converter, apps/ifc-converter), CLI code (packages/cli, scripts), dependency manifests and CI workflows;
      • editor auth, sharing and server code: apps/editor/proxy.ts, apps/editor/app/api/**, the embed page, the self-host auth and scene sharing/security libs, and any server code under apps/*; plus any change to auth, sessions, sharing, CSP/headers, redirects, raw HTML sinks, iframe sandboxing, trusted postMessage handling or stored user bytes, and tests that protect these;
      • the host side of the geometry-script sandbox (packages/editor/src/lib/geometry-script/**);
      • agent config and instructions: .cursor/**, .claude/**, .agents/**, skills symlinks, AGENTS.md/CLAUDE.md/GEMINI.md at any depth, .github/copilot-instructions.md, **/SKILL.md, skills/**;
      • what runs or gets installed: mcp.json files, server.json, gemini-extension.json, marketplace.json, patches/**, .githooks/**, tooling/release/**, Docker and devcontainer files, apps/*/next.config.*.
    • Low effort only when every change is human-facing prose, translation text in messages.po/messages.ts with unchanged code, isolated non-security tests, or literal UI text or cosmetic CSS. Changed links, handlers, loaders (such as locales/*/index.ts), fixtures or sinks are not low, and low is never inferred from a directory, filename or title, or from a trimmed diff that can't rule out a high cue.
    • Default effort for everything else.
  • Incremental reviews (review.incremental: true): only changes since the previous Bugbot review are reviewed.

PR summary and autofix settings are left out of the file, so they keep their current dashboard behavior.

All keys follow the documented schema in the Bugbot docs (Repository config file); no keys needed renaming. Note that per the docs, effort levels apply only on usage-based Bugbot plans.

Takes effect after merge: Bugbot reads this file from the PR's base branch, so this PR itself is still reviewed with the current settings.

How to test

  1. After merge, open a draft PR: Bugbot should not review it automatically.
  2. Mark it ready for review: Bugbot should run.
  3. On a PR touching apps/editor/proxy.ts, AGENTS.md or .github/workflows, a review comment with findings should report High effort; a PR changing only human-facing docs should get a Low-effort review.

The YAML was checked to parse into the expected structure, and every concrete path named in the prompt was checked to exist; no other local checks were run (no code changed).

Screenshots / screen recording

N/A — non-visual change

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch
Open in Web Open in Cursor 

Note

Low Risk
Tooling-only YAML for review automation; no application runtime or deployment behavior changes.

Reviewed by Cursor Bugbot for commit fc93901. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-authored-by: Aymeric Rabot <Aymericr@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-05T04:37:28.070408Z b3f0613 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Aymericr Aymericr added the bot:tooling label Dec 5, 2026 — with Cursor

@Aymericr Aymericr left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review at b3f0613, focused on whether anything security-sensitive lands on low or unmatched effort. Not an LGTM yet: a few security boundaries need to be named under high, and the low wording needs tightening. Everything else looks good.

What checks out

  • The keys match the documented schema (cursor.com/docs/bugbot, "Repository config file"): version, triggers.drafts, triggers.frequency: everyPush, review.effort: smart, review.smartPrompt, review.incremental.
  • CI is green at this head.
  • The diff only adds .cursor/config/bugbot.yaml.
  • Bugbot reads this file from the base branch, so it takes effect for PRs opened after merge, not for this one.
  • The high list already covers MCP (packages/mcp, including transports/http.ts and lib/safe-fetch.ts), the geometry-script worker, the IFC importers, the CLI, dependency manifests and workflows. It also covers the IndexedDB asset store changed in #1357, packages/core/src/lib/asset-storage.ts, but only by package ("core scene and geometry logic"), not by topic.
  • There is no vercel.json, CODEOWNERS, middleware other than apps/editor/proxy.ts, Server Action ('use server'), or dangerouslySetInnerHTML/innerHTML in the tree today.

How Smart applies this. smartPrompt is prose, not globs. Smart reads it along with the title and a possibly trimmed diff, and anything not named falls to default. So today a change limited to the editor's auth gate gets default, and an agent-instruction change gets low via *.md.

Paths to add to high

  1. Editor auth, sharing and serving user bytes (default today):

    • apps/editor/proxy.ts: the auth gate that decides open vs self-guarded paths.
    • apps/editor/lib/self-host-auth.ts: signed sessions.
    • apps/editor/app/api/auth/**.
    • apps/editor/app/api/scenes/**, apps/editor/app/api/artifacts/**.
    • apps/editor/lib/{scene-api-security,scene-sharing,scene-thumbnails,public-url,safe-next-path}.ts.
    • apps/editor/app/embed/[id]/page.tsx: checks sharing before loading the graph.

    In short: any route handler or server code under apps/*.

  2. Host half of the geometry-script sandbox: packages/editor/src/lib/geometry-script/client.ts. It sets iframe.sandbox and srcdoc, supplies the frame CSP and checks postMessage sources. The worker side is already high; this side currently gets default.

  3. Review policy and agent permissions/instructions:

    • .cursor/** (including this bugbot.yaml), .claude/settings.json (grants Bash(npx turbo:*)), .agents/**.
    • The {.claude,.codex,.cursor}/skills symlinks: a retarget changes loaded instructions without touching any Markdown.
    • AGENTS.md and apps/*/AGENTS.md, plus their CLAUDE.md/GEMINI.md aliases (symlinks) and .github/copilot-instructions.md.
    • **/SKILL.md and skills/**.

    The *.md low rule currently catches all of these.

  4. Things that choose what runs or gets installed:

    • mcp.json, server.json, gemini-extension.json, .cursor-plugin/mcp.json, skills/.mcp.json, packaging/chatgpt/mcp.json, .agents/plugins/marketplace.json.
    • patches/*.patch: declared in package.json, but a patch-only PR doesn't touch the manifest.
    • .githooks/**, tooling/release/**.
    • Dockerfile, docker-compose.yml, .devcontainer/**.
    • apps/*/next.config.ts, which sets /embed CSP frame-ancestors, redirects and image patterns.

Low wording to tighten

  • "tests only" → "isolated non-security tests". Tests that guard a high boundary should stay high: for example packages/mcp/src/lib/safe-fetch.test.ts (SSRF and redirect regressions), and the auth or sharing tests. The same goes for test helpers, preloads and runnable fixtures such as fixtures/viewer-live/vite.config.ts.
  • "docs (*.md)" → "human-facing prose", excluding the agent-instruction and skill files above.
  • "locale catalogs" → limit low to messages.po and generated messages.ts data with an unchanged wrapper. packages/editor/src/i18n/locales/*/index.ts are loaders (logic), not catalogs.
  • "copy and styling-only UI" → "literal UI text or cosmetic CSS". Anything that changes a link or URL, handler, resource load, raw HTML sink, srcdoc or sandbox attribute is not copy or styling.
  • Precedence and trimmed diffs: add "High wins for the whole PR; never infer low from a directory, filename or title; if a trimmed diff can't rule out a high cue, don't use low."

Suggested addition to smartPrompt

This keeps the existing high sentence and replaces the low and default sentences:

HIGH wins for the whole PR. Also use HIGH for apps/editor/proxy.ts,
apps/editor/app/api/**, apps/editor/app/embed/**, apps/editor/lib/{self-host-auth,
scene-api-security,scene-sharing,scene-thumbnails,public-url,safe-next-path}.ts,
packages/editor/src/lib/geometry-script/**, any server code under apps/*, and any
change to auth, sessions, sharing, CSP/headers, redirects, raw HTML sinks, iframe
sandboxing or trusted postMessage handling, uploads or stored user bytes (incl.
packages/core/src/lib/asset-storage.ts), and tests protecting these. Use HIGH for
.cursor/**, .claude/**, .agents/**, the */skills symlinks, AGENTS.md/CLAUDE.md/
GEMINI.md (any depth), .github/copilot-instructions.md, **/SKILL.md, skills/**,
mcp.json, server.json, gemini-extension.json, */mcp.json, marketplace.json,
patches/**, .githooks/**, tooling/release/**, Dockerfile, docker-compose.yml,
.devcontainer/**, apps/*/next.config.*.
Use LOW only when every change is human-facing prose, translation text in
messages.po/messages.ts with unchanged code, isolated non-security tests, or literal
UI text or cosmetic CSS. Changed links, handlers, loaders, fixtures or sinks are not
LOW. If LOW isn't clearly established, use DEFAULT.

None of these are vulnerabilities in the app. They are routing gaps for future PRs. With the four high additions and the low rewording, this is an LGTM from me.

Co-authored-by: Aymeric Rabot <Aymericr@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 33ed898. Configure here.

Comment thread .cursor/config/bugbot.yaml Resolved

@Aymericr Aymericr left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review at 33ed898. Almost there, but not an LGTM yet: the plugin manifests still aren't on high.

What I checked. The b3f0613..33ed898 diff only changes smartPrompt. The YAML still parses: version, triggers (drafts: false, frequency: everyPush) and review (effort: smart, incremental: true) are unchanged and match cursor.com/docs/bugbot, and smartPrompt is a single block scalar. CI is green; Cursor Bugbot is neutral because of the finding below.

Points from my last review that are now covered:

  • "HIGH wins for the whole PR" is in.
  • The editor auth, sharing and server paths are listed: proxy.ts, app/api/**, app/embed/**, the six apps/editor/lib helpers, and any server code under apps/*.
  • packages/editor/src/lib/geometry-script/** covers client.ts.
  • Agent config is covered: .cursor/**, .claude/**, .agents/**, the */skills symlinks (including .codex/skills), the AGENTS.md/CLAUDE.md/GEMINI.md aliases at any depth, .github/copilot-instructions.md, **/SKILL.md and skills/**.
  • The files that decide what runs are listed: patches, githooks, release tooling, Dockerfile, compose, devcontainer, and apps/*/next.config.*.
  • The *.md low rule, "tests only" and "default for everything else" are gone.
  • The low wording now covers tests, locales and UI, and adds the "never infer low from a directory, title or trimmed diff" guard.

Still missing: plugin manifests. This is the open Bugbot Medium at 33ed898, and it is real. My pasted block left these out. They pick the MCP server, skills and API-key settings that agents install and run, so they belong with mcp.json and marketplace.json:

  • plugin.json (root)
  • .cursor-plugin/plugin.json: .cursor-plugin/mcp.json is only reached through */mcp.json
  • .codex-plugin/plugin.json
  • .claude-plugin/marketplace.json: the bare marketplace.json reads as root-only, and .agents/** covers only .agents/plugins/marketplace.json
  • packaging/chatgpt/mcp.json: */mcp.json is one level deep, so it doesn't match this one

(skills/.claude-plugin/plugin.json, skills/.cursor-plugin/* and skills/.mcp.json are already covered by skills/**.)

Suggested edit: in the second HIGH sentence, replace mcp.json, server.json, gemini-extension.json, */mcp.json, marketplace.json with:

mcp.json, server.json, plugin.json, gemini-extension.json, .cursor-plugin/**,
.codex-plugin/**, .claude-plugin/**, packaging/**, and any mcp.json, plugin.json
or marketplace.json at any depth,

With that change, this is an LGTM from me.

Co-authored-by: Aymeric Rabot <Aymericr@users.noreply.github.com>

@Aymericr Aymericr left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM at fc93901.

  • Scope: 33ed898..fc93901 is a single commit. It changes only the manifest line in smartPrompt, which now covers mcp.json, server.json, plugin.json, gemini-extension.json, .cursor-plugin/**, .codex-plugin/**, .claude-plugin/**, packaging/**, and any mcp.json, server.json, plugin.json or marketplace.json at any depth.
  • Plugin manifests: that covers every manifest tracked in the repo: root plugin.json, .cursor-plugin/{plugin,mcp}.json, .codex-plugin/plugin.json, .claude-plugin/marketplace.json, .agents/plugins/marketplace.json, packaging/chatgpt/mcp.json and the skills/ manifests. So my last open point and the earlier Bugbot Medium are resolved.
  • YAML: still valid (version, triggers, review with effort: smart and incremental: true). Nothing else changed.
  • CI: green at this head, and Cursor Bugbot passes.

Thanks for working through all the points.

@Aymericr
Aymericr merged commit bec4e5d into main Dec 5, 2026
8 checks passed
@Aymericr
Aymericr deleted the tooling/bugbot-lighter branch December 5, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants