Skip to content

perf: budget review prompt file patches#68

Open
stainlu wants to merge 1 commit into
openclaw:mainfrom
stainlu:stainlu/perf-budget-pr-file-patches
Open

perf: budget review prompt file patches#68
stainlu wants to merge 1 commit into
openclaw:mainfrom
stainlu:stainlu/perf-budget-pr-file-patches

Conversation

@stainlu
Copy link
Copy Markdown
Contributor

@stainlu stainlu commented May 12, 2026

Summary

  • Bound total PR file patch text retained in ClawSweeper review prompts.
  • Preserve hydrated PR file metadata and existing file-window omission markers.
  • Add review telemetry for how many retained file patches were truncated.
  • Include dashboard/ in CI sparse checkout so the existing dashboard worker test can run on PRs.
  • Add unit coverage for patch budgeting and omission marker preservation.

Why

Large OpenClaw PRs can hydrate up to 80 PR files, and each file previously kept up to 2k chars of patch text. That can push roughly 160k chars of repeated diff hunks into every review prompt. This keeps the metadata breadth while bounding diff-token pressure.

The CI sparse checkout already included test/, but omitted tracked dashboard/, so test/dashboard-worker.test.ts failed to import dashboard/worker.js on GitHub. This branch includes the minimal workflow fix needed for CI parity.

Validation

  • pnpm run build
  • pnpm run format:check
  • pnpm run test:unit
  • git diff --check

Note

pnpm run check fails locally on two existing notifier repair tests under Node 22. The repo requires Node 24+, and I reproduced the same local Node 22 failures on clean upstream/main; this branch build, format, and unit surface are green.

@stainlu stainlu force-pushed the stainlu/perf-budget-pr-file-patches branch from 0b1168d to 20f5662 Compare May 12, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant