Skip to content

Fix map reviews for whitespace edits, renames, and empty heads - #54

Merged
DeanOuY merged 1 commit into
mainfrom
fix/agent-change-edge-cases
Nov 30, 2026
Merged

DeanOuY merged 1 commit into
mainfrom
fix/agent-change-edge-cases

Conversation

@DeanOuY

@DeanOuY DeanOuY commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

What and why

Map reviews could report zero changes after editing whitespace inside a string or renaming a file without changing its contents. Deleting the last source file also prevented a review from starting; an empty head could not pass the map contract at render time.

  • Keep whitespace edits in the agent engine's change list for assessment, including literal contents, blank lines and indentation.
  • Report source and test renames with the correct old/new paths and evidence. Moves between source and test paths require a source assessment. Show rename details in the Markdown report and viewer, and instruct the agent to check references in unchanged files.
  • Allow both engines to review actual source deletions against a readable base when no head source remains, and render the changes without inventing a flow. Preserve rejection of map-only/no-source requests and distinguish unread files from deletions.

Empty-file renames remain explicitly unanalyzed and keep the report partial because there are no source lines to cite. Edited or ambiguous moves retain the snapshot's conservative add/delete representation.

Fixes #46
Fixes #47
Fixes #48

How it was checked

  • The checks in CONTRIBUTING.md pass: Ruff lint and format, pytest -q (747 passed, including 39 new cases), public-file audit, fixture regeneration with no diff, both wheel builds and package checks.
  • Viewer: npm test (72 passed), npm run lint, npm run build; built viewer committed with its source.
  • npm run test:browser (7 passed), using the installed Google Chrome executable through PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH.
  • Synthetic CLI reproductions for Agent engine drops whitespace changes inside string literals #46, Agent engine reports zero changes for a renamed source file #47 and Review cannot start after deleting the last source file #48 (Python and TypeScript): prepare, diff, assessment submission, render and share render. All four exported pages checked at desktop and phone widths, including change details.
  • Bundled skill installed and updated in an isolated synthetic project; agent status reports current. No separate model-session evaluation was run.

Documents

  • Updated the English/Chinese usage guides, bundled skill, and product brief for the review and viewer behavior.
  • No private code, keys or real snapshots; examples and fixtures are synthetic.

No viewer dependency changes; third-party notices are unchanged.

@DeanOuY
DeanOuY merged commit f298bd5 into main Nov 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant