Use core's blob fetch-summary formatter in apply's fetch_stage instead of a drifted copy
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Đọc crates/socket-patch-cli/src/commands/fetch_stage.rs cùng với các bộ định dạng của core trong crates/socket-patch-core/src/api/blob_fetcher.rs; repair được nêu là một bên gọi hiện có. Cập nhật fetch stage để dùng các bộ định dạng thành công và thất bại của core, đồng thời giữ lại dòng total == 0, sau đó cập nhật các bài kiểm tra fetch_stage và apply_render được nêu. Hoàn tất khi đầu ra thành công không thay đổi và đầu ra thất bại khớp với định dạng đã sắp xếp, ngắn gọn của core, không có dấu hai chấm ở cuối.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[agent] Filed by the scheduled architecture audit (audit-cli-tests). Register: register comment.
Kind: refactor. Register ID: T04.
Problem
Two private functions in fetch_stage.rs L77-L128,`` format_fetch_summary and `format_fetch_failures`, copy the public formatters in core: `api/blob_fetcher.rs` L210-L264 (`format_fetch_result_for`, `format_fetch_successes`, `format_fetch_failures`). `repair` already uses the core ones.
The copies have drifted:
| core | fetch_stage | |
|---|---|---|
| failures sorted by hash | yes (results come from a HashSet) |
no, so the order is nondeterministic |
| header | Failed to download N blobs |
Failed to download N blobs: |
| id | noun.display_id (no ... for ids of 12 chars or fewer) |
always chars().take(12) + ... |
| error text | concise_fetch_error |
raw error |
"All blobs are present locally." and the ... and N more cap are written in both copies. The cap is also open-coded in fetch_stage::format_purl_list (L77-L83) and in repair.rs.
Proposed change
- Delete
fetch_stage::format_fetch_summaryandformat_fetch_failures. - Call
blob_fetcher::format_fetch_successes/format_fetch_failureswithArtifactNounblobs, keeping thetotal == 0line.
Size
1 file. About −45 / +5 lines.
Acceptance criteria
applyprints the same success lines.- Failure lines take core's form: sorted, concise, and without the trailing colon.
fetch_stageandapply_rendertests are updated where they pinned the old form.
- Ngôn ngữ chính
- Rust
- Star
- 8
- Fork
- 2
- Merge trung bình
- 19 giờ 12 phút
- Pull request đã merge (30 ngày)
- 709
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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 SocketDev/socket-patch
-
agent:triaged arch-audit priority:p3 refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
SocketDev/socket-patch#1860 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Share one scoped env-var test guard: EnvGuard is copy-pasted 11 times across core unit and integration testsCó thể đã có người làm @mikolalysenko đã nhận 1 ngày trước. Đang mởagent:claimed agent:triaged arch-audit priority:p3 refactor
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
SocketDev/socket-patch#1889 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Memoize env-keyed subprocess probes through one helper: composer, python and ruby each define the same env key and drifted on when an answer is keptCó thể đã có người làm @mikolalysenko đã nhận hôm nay. Đang mởagent:claimed agent:triaged arch-audit priority:p1 refactor
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 25/100
SocketDev/socket-patch#1888 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent:triaged arch-audit priority:p3 refactor
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
SocketDev/socket-patch#1887 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent:needs-human agent:triaged arch-audit priority:p3 refactor
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
SocketDev/socket-patch#1881 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của SocketDev/socket-patch
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Y-ASLant/ElegantClipboard#178 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
linxiv-dev/linXiv#384 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug drawings ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
userFRM/egui-charts#1595 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tcp: a very large keep-alive interval overflows `Instant` arithmetic (panic in debug builds)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
smoltcp-rs/smoltcp#1235 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
scope:core type:security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày