check: during an uncommitted merge, ratchets blame main's new code on the branch (diff base ignores MERGE_HEAD)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 68/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- git, typescript
- Domaine
- devtools
Piste de recherche
Start with scripts/lib/base.ts and trace how it selects the diff base during an in-progress merge or rebase. Add coverage using a temporary Git repository with an uncommitted merge, then run the relevant i18n:check tests or command. Done when upstream strings are excluded while strings added on the branch are still reported.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
What
bun run i18n:check run in the middle of a merge (conflicts resolved, merge not yet committed) reports main's own new strings as "new in this change". Seen on #526 after merging origin/main (which had #534 and #532): 2 hardcoded-text errors in GitSettings.svelte and 3 writing-lint errors in docs/contributing.md, in files identical to origin/main. After git commit the same check is clean.
Why
scripts/lib/base.ts resolves the diff base as merge-base(HEAD, origin/main). During an uncommitted merge HEAD is still the pre-merge branch tip, so the base is the old fork point while the working tree already holds main's changes.
Fix
When .git/MERGE_HEAD exists (or git rev-parse -q --verify MERGE_HEAD succeeds), use merge-base(MERGE_HEAD, origin/main) together with the branch side, i.e. the base is the newer of the two fork points: with MERGE_HEAD == origin/main that is origin/main itself. Same for a rebase in progress (REBASE_HEAD/.git/rebase-merge/onto). Test with a real repo: main adds a hardcoded string, branch merges main without committing, the ratchet reports nothing; the branch's own new string is still reported.
Agents resolve merges constantly; this sends them chasing errors in code they never touched.
- Langage dominant
- Rust
- Étoiles
- 3
- Forks
- 1
- Merge moyen
- 9 h 51 min
- PR mergées (30 j)
- 310
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de codeatlasdev/atlas
-
type: bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
codeatlasdev/atlas#597 ·
Les mainteneurs répondent en général sous 1 jour
-
area: ci os: linux type: bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
codeatlasdev/atlas#496 ·
Les mainteneurs répondent en général sous 1 jour
-
area: ci type: bug
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
codeatlasdev/atlas#596 ·
Les mainteneurs répondent en général sous 1 jour
-
os: linux type: bug
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
codeatlasdev/atlas#591 ·
Les mainteneurs répondent en général sous 1 jour
-
flaky: Windows scripts job hits test timeouts (check-dco, i18n runner/translate, check-changed)Ouvertearea: ci os: windows type: bug
Difficulté 3/5 1-2 jours Accessibilité débutants 56/100
codeatlasdev/atlas#550 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de codeatlasdev/atlas
Issues similaires
-
marketing
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
kinqsradio/orbyn-engineering#729 ·
-
Plans page scenario races Shift+Tab against the plan list being drawn again in Firefox and WebKitOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
nledford/Ladderback#1091 ·
Les mainteneurs répondent en général sous 1 jour
-
bug fix packaging ui user-sprint
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Vondor/KassenSturz#1197 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour