Checkpoint ignore-semantics and restore-journaling follow-ups (#1410 threads wM68EMCO / wM68EMCv / wM68EMB_)
Mantenedores costumam responder em até 3 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 22/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- git, typescript
- Domínio
- backend
Direção de pesquisa
Start with the checkpoint journaling in src/core/checkpoints/index.ts (the ignore skip near line 399, the early return near 404-408, and the restoreFile delete branch near 571-580), then isPathIgnored near line 625. Also read src/services/checkpoints/ShadowCheckpointService.ts (commit staging near 256-264) and preStepRestoreTarget in src/core/checkpoints/rollback.ts. The issue is a plan to be written before any code, with no PR allowed yet, so a newcomer should first help settle the design rather than patch.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Tracking-issue draft: checkpoint metadata honesty (#1410 threads wM68EMCO, wM68EMCv, wM68EMB_) | draft for lead review; lead opens it
Title: Checkpoint ignore-semantics and restore-journaling follow-ups (#1410 threads wM68EMCO / wM68EMCv / wM68EMB_)
Two units in one issue, same family: the rollback metadata a checkpoint reports is not always the state the code acted on. Premises below were verified line by line against head bb9fe5fc528e124cd79442553ee4a3aecb06741d (sha1-40, the head published before today).
Unit A: ignore-semantics (threads wM68EMCO and wM68EMCv, one helper, one commit).
- Premise 1: journaling skips an ignored write at src/core/checkpoints/index.ts:399 (continue) and returns early when every write in the step is excluded at 404-408, while the commit itself is stage-all based (src/services/checkpoints/ShadowCheckpointService.ts:256-264 uses git.add([".", "--ignore-errors"])). A path already tracked in the shadow repo and ignored only later is therefore committed while the journal skips it: isPathIgnored asks check-ignore with --no-index (625), which reports the rule and not the index membership.
- Premise 2: isPathIgnored returns false for every git failure (catch at 627-630). In restoreFile the delete branch only refuses when the path is confirmed ignored (571-572) and otherwise removes the file (575-580), so a transient git error reads as not ignored and a live, never-tracked file is deleted unrecoverably.
- Fix shape: decide tracked-ness from the index or tree before applying an ignore rule; add a throwing judgement used only inside the delete branch so unknown is not confused with confirmed-not-ignored; keep the permissive false for the write-side skip at index.ts:399. Tests: tracked-then-later-ignored; git failure during restore of an untracked file.
- Cost: about ten executable lines plus two tests; rides the split track because this branches gate operand (781) already exceeds 500.
Unit B: restore journaling (thread wM68EMB_, major, heavy lift, registered here, not yet executed).
- Premise: appendChanges has exactly one production call site, src/core/checkpoints/index.ts:448 (checkpoint save). Saves and restores are journaled, restores are not, so a save A, restore B-to-A, save C, restore C-to-previous sequence resolves the undone state from preStepRestoreTarget (src/core/checkpoints/rollback.ts:100, used at 167 and 220) which still points at the state the last restore undid.
- Fix shape, two candidate designs to choose between in the unit: journal one entry per restore, or record the restored target explicitly and have preStepRestoreTarget consume that. Sequential-state test required, not a single-restore test.
- Cost: new executable lines plus a sequencing test; queued next to the save-metadata unit already recorded under #1991.
Neither unit may open a PR until this issue carries the plan; both cite #1410 threads by id.
LEAD NOTE (issue owner): premise line citations carry frame bb9fe5fc528e124cd79442553ee4a3aecb06741d and were re-checked valid at current published head 17f224ef1900d9ae5226317824d7d06373f6de97 - the files cited (src/core/checkpoints/index.ts, src/services/checkpoints/ShadowCheckpointService.ts, src/core/checkpoints/rollback.ts) are byte-identical between the two heads (batch 11 touched only Task.ts, Task.spec.ts and the service spec). Neither unit opens a PR until this issue carries its plan (planned-and-issued).
- Linguagem predominante
- TypeScript
- Estrelas
- 2k
- Forks
- 301
- Merge médio
- 3d 14h
- PRs com merge (30d)
- 103
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Zoo-Code-Org/Zoo-Code
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Zoo-Code-Org/Zoo-Code#2773 · 1 comentário ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Zoo-Code-Org/Zoo-Code#2717 · 1 comentário ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
Zoo-Code-Org/Zoo-Code#2515 ·
Mantenedores costumam responder em até 3 dias
-
fix(scripts): stryker-diff.mjs spawns the extensionless .bin shim and cannot run on WindowsTalvez já em andamento @easonLiangWorldedtech assumiu há 15 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Zoo-Code-Org/Zoo-Code#2514 ·
Mantenedores costumam responder em até 3 dias
-
[BUG] search_files hides matching text on long linesTalvez já em andamento @DananjayaNadun assumiu há 9 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Zoo-Code-Org/Zoo-Code#2496 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 3 dias
Todas as issues de Zoo-Code-Org/Zoo-Code
Issues semelhantes
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
ci
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
ClickHouse/clickhouse-js#1248 ·
Mantenedores costumam responder em até 1 dia
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltAbertatechnik
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
Mantenedores costumam responder em até 1 dia
-
enhancement good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
AhmedNAgy25/analysor#25 ·
Mantenedores costumam responder em até 1 dia