Checkpoint ignore-semantics and restore-journaling follow-ups (#1410 threads wM68EMCO / wM68EMCv / wM68EMB_)
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 22/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- git, typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- TypeScript
- Star
- 2k
- Fork
- 301
- Merge trung bình
- 3 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 103
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Zoo-Code-Org/Zoo-Code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Zoo-Code-Org/Zoo-Code#2773 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Zoo-Code-Org/Zoo-Code#2717 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Zoo-Code-Org/Zoo-Code#2515 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
fix(scripts): stryker-diff.mjs spawns the extensionless .bin shim and cannot run on WindowsCó thể đã có người làm @easonLiangWorldedtech đã nhận 15 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Zoo-Code-Org/Zoo-Code#2514 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[BUG] search_files hides matching text on long linesCó thể đã có người làm @DananjayaNadun đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Zoo-Code-Org/Zoo-Code#2496 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của Zoo-Code-Org/Zoo-Code
Issue tương tự
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
EPPIcenter/sampledb3#162 ·
-
Particle-1 modelĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
tashfeenahmed/freellmapi#2169 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🎙️ task - feat(mechanic): pave git.pull.close, a close of a superseded pull with its why on recordĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ehmpathy/rhachet-roles-ehmpathy#1576 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
vercel-labs/ui#1563 ·
Maintainer thường phản hồi trong vòng 1 ngày