Dynamic Review: an incremental review with an ancestor as previous commit becomes a full review
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- git, typescript
- Ambito
- backend
Direzione di ricerca
Start in the handler that catches ObjectUnavailable from tracked_tree(previous) and sets previous = None, then follow the previous_reviewed_sha not in store.objects check that skips the fetch after the filter tree:0 ancestry walk. Reproduce with the history base -> c1 -> c2 and an incremental claim, using the integration tests that run against real upload-pack. Done means the ancestor case reports comparison == "incremental" with the right previous_diff, while the refused-server, unknown-commit and sibling cases keep their current behaviour.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Found while reviewing PR #300 (review finding F4). Pre-existing: it is not caused by #296.
Problem
An incremental review whose previous reviewed commit is an ancestor of the head, the usual case when new commits are pushed on top, silently becomes a full review. The commits-only ancestry walk (filter tree:0) already stores the previous commit, so if previous_reviewed_sha not in store.objects skips the fetch. tracked_tree(previous) then finds no tree, raises ObjectUnavailable, and the handler turns that into previous = None: comparison is full and previous_diff is empty.
Reproduced on the code before and after #296 with the history base -> c1 -> c2, previous = c1, base branch = base, claim incremental. The existing incremental tests only use a previous commit that is not an ancestor, so none of them covers this.
Design
- Decide whether the previous commit's tree is present, not whether the commit is: fetch the previous commit when its tree is absent (a depth-1 fetch with the size filter), then read the tree.
- Keep the existing fallback (previous commit explicitly refused by the server → full mode with the prior state kept).
- Add a test with a linear history.
Test cases
| ID | kind | level | case | expected |
|---|---|---|---|---|
| T01 | regression | integration (real upload-pack) | previous = ancestor of head | comparison == "incremental", previous_diff holds the change since the previous commit; red before the fix |
| T02 | regression | integration | previous = sibling of head | unchanged: incremental |
| T03 | behavior | integration | previous commit refused by the server | full mode, prior state kept |
| T04 | behavior | integration | previous commit unknown to the repository | full mode |
| T05 | behavior | unit (checkout) | the tree of the previous commit is absent but the commit is present | the fetch happens once |
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 1
- Merge medio
- 1h 22m
- PR unite (30g)
- 336
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ExpidetGames/code-reviewer
-
area: app type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ExpidetGames/code-reviewer#585 ·
I maintainer di solito rispondono entro 1 giorno
-
Flaky: models.dev refresh 'lets one of two runs at the same time work' on Postgres (#548-T03)Apertaarea: app type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
ExpidetGames/code-reviewer#584 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ExpidetGames/code-reviewer#464 ·
I maintainer di solito rispondono entro 1 giorno
-
area: app type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
ExpidetGames/code-reviewer#308 ·
I maintainer di solito rispondono entro 1 giorno
-
type: docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ExpidetGames/code-reviewer#94 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ExpidetGames/code-reviewer
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
awesome-dsh-plugin/awesome-dsh-plugin#9184 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
farion1231/cc-switch#8829 ·
I maintainer di solito rispondono entro 1 giorno
-
[core-client] Remove unused hand-maintained transport helpers after the definition-table cutoverApertadoc-audit enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100