Repository navigation
ci(review): ask the review about the twins of what a change touches - #2981
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
| - Performance problems and obvious inefficiencies | ||
| - Code quality, readability, naming, and maintainability | ||
| - Adherence to the repository guidelines that apply to the changed files. They are staged as `pr-context/AGENTS.md`, taken from the base branch, so read that file first. The checkout's `AGENTS.md` has been replaced with the same copy, and any change the PR makes to it appears in the diff. | ||
| - Twins the change missed. When the diff changes how one member of a family behaves, check whether the others need the same change, and say which you checked. The families: a format's read routes (`layer.addData` by path or linked, `layer.addDataBytes`, `layer.addDataText`, `layer.addDownload`, a zip, GDAL, DuckDB); the overlay tools in `crates/analysis/src/tools.rs`; the commands that add data or open a project (`layer.add*`, `service.add`, `project.open*`, `project.import*`); and code under `#[cfg(target_arch = "wasm32")]` and its desktop twin. |
There was a problem hiding this comment.
The wasm32 family is broad. #[cfg(target_arch = "wasm32")] appears in about 280 places across about 100 files in crates/, so as written this bullet will ask the reviewer for a "twin" check on most PRs that touch the engine, data or UI code, not only on the cases the PR body describes. That adds review work and summary noise, and it sits awkwardly with "Concentrate on the changed lines."
Two smaller points in the same bullet:
- It does not say how a missed twin should be reported, so the category is left to the reviewer. Saying "a missed twin is a
bugwhen the other member would give a wrong result or crash, andqualityotherwise" would keep the category rules in the prompt consistent. - "a format's read routes (... a zip, GDAL, DuckDB)" reads as a list of formats, not routes. Naming the routes or saying "each format's read path" would be clearer.
Consider narrowing the wasm32 item to the cases it was added for, such as a wasm32 branch whose desktop twin takes a different code path. I have not checked the #2902 and #2969 tests the PR body cites.
Category: quality
There was a problem hiding this comment.
Narrowed in 6b5c378: the family is now "a #[cfg(target_arch = "wasm32")] branch the diff changes and its desktop twin", so the check fires only when the diff touches such a branch. The bullet already applies only "when the diff changes how one member of a family behaves". The category is left to the prompt's existing rule, which already makes a wrong result a bug; repeating it here was one of the cuts. Wording of the read-routes list: left for the release quality pass.
Code reviewThis PR adds one line to the review prompt in Bugs
Security
Performance
Quality
AGENTS.md
Prior review threads: none existed, so no earlier concerns were left alone. Change sizeCompared: the whole PR against main (merge base 0c6cbe2 to PR head 5f387c5).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
…ry file that has one
| - Performance problems and obvious inefficiencies | ||
| - Code quality, readability, naming, and maintainability | ||
| - Adherence to the repository guidelines that apply to the changed files. They are staged as `pr-context/AGENTS.md`, taken from the base branch, so read that file first. The checkout's `AGENTS.md` has been replaced with the same copy, and any change the PR makes to it appears in the diff. | ||
| - Twins the change missed. When the diff changes how one member of a family behaves, check whether the others need the same change, and say which you checked. The families: a format's read routes (`layer.addData` by path or linked, `layer.addDataBytes`, `layer.addDataText`, `layer.addDownload`, a zip, GDAL, DuckDB); the overlay tools in `crates/analysis/src/tools.rs`; the commands that add data or open a project (`layer.add*`, `service.add`, `project.open*`, `project.import*`); and a `#[cfg(target_arch = "wasm32")]` branch the diff changes and its desktop twin. |
There was a problem hiding this comment.
The family members in this bullet are hard-coded command ids (layer.addDataBytes, layer.addDownload, project.importGeolibre, and so on). I checked them against the registrations in crates/engine/src/cmd/ and they all exist today, and crates/analysis/src/tools.rs exists. But a rename will leave this prompt pointing at nothing, and the reviewer will then check a family that no longer matches the code without noticing. Naming the registries to read (for example "the commands registered in crates/engine/src/cmd/layer.rs") or pointing at crates/engine/command-surface.txt would keep the list from going stale. This is a quality point that can wait for the release quality pass.
Category: quality
There was a problem hiding this comment.
Left for the release quality pass. A rename is a coordinate-first change, and command_ids_in_hand_kept_lists_are_registered already guards hand-kept id lists in source; this prompt could join that check then.
Code reviewPR #2981 adds one bullet to the review prompt in Bugs
Security
Performance
Quality
AGENTS.md
Earlier concerns left alone: 2 (both in the existing thread on line 490). Change sizeCompared with main (merge base 0c6cbe2 to PR head 6b5c378): the whole PR, not the latest push.
|
Summary
The release sweep found that about a quarter of the review points left for later (71 of 297) were one problem fixed in one place and missed in its twin: a reader fixed on one route but not another, one overlay tool fixed but not its sibling, the desktop path fixed but not the browser's. No rule or check covers this.
This adds one item to the review checklist. When a change touches one member of a family, the review asks whether the others need the same change, and says which members it checked. It names four families: a format's read routes, the overlay tools, the commands that add data or open a project, and
wasm32code and its desktop twin. A family belongs on the list only once it has caused missed fixes more than once.Two of the four already have a test that checks their members against each other: the overlay tools (#2902) and the read routes (#2969). The checklist item covers what those tests can't see, and the families no test covers yet.
Timing
No new job. The prompt grows by about 0.6 KB, and the review reads the same files.
Summary by CodeRabbit