Use core's blob fetch-summary formatter in apply's fetch_stage instead of a drifted copy
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Read crates/socket-patch-cli/src/commands/fetch_stage.rs alongside the core formatters in crates/socket-patch-core/src/api/blob_fetcher.rs; repair is cited as an existing caller. Update the fetch stage to use the core success and failure formatters while retaining its total == 0 line, then update the named fetch_stage and apply_render tests. Done when success output is unchanged and failure output matches core's sorted, concise format without the trailing colon.
Written by the indexing model from the issue text.
Description
[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.
- Dominant language
- Rust
- Stars
- 9
- Forks
- 2
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 309
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SocketDev/socket-patch
-
Windows unit tests fail on main: pnpm-registry-overrides fixtures are checked out as CRLF (mixes CRLF and LF line endings)Possibly taken @mikolalysenko claimed this today. Openagent:claimed agent:triaged ci-janitor priority:p1
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
SocketDev/socket-patch#2238 · 1 comment ·
Maintainers usually reply within 1 day
-
agent:triaged arch-audit priority:p3 refactor
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
SocketDev/socket-patch#1860 ·
Maintainers usually reply within 1 day
-
Nightly: pnpm11_registry_route_is_cleaned_up_when_a_patch_is_not_needed fails on Windows (pnpm records the RUNNER~1 short path as a second importer)Possibly taken A pull request linked to this issue is open or already merged. Openagent:triaged ci-janitor priority:p1
Difficulty 3/5 Half a day Newbie friendliness 42/100
SocketDev/socket-patch#2235 ·
Maintainers usually reply within 1 day
-
Agent mode reports a gem whose installed file was edited as "not installed on this host" / "not found on disk", `apply --check` says to run `apply`, and `rollback` exits 1 with "modified after patching" on every runPossibly taken @mikolalysenko claimed this today. Openagent:claimed agent:triaged bug bughunt pm:bundler priority:p1 ux
Difficulty 4/5 3-5 days Newbie friendliness 18/100
SocketDev/socket-patch#2231 · 1 comment ·
Maintainers usually reply within 1 day
-
Behind a private gem mirror a hosted gem pin cannot be undone: `rollback` and `remove` refuse on a `CHECKSUMS` lock, and without `CHECKSUMS` `rollback` leaves the patched builds installed with no warning that names themPossibly taken @mikolalysenko claimed this today. Openagent:claimed agent:triaged bug bughunt pm:bundler priority:p1
Difficulty 4/5 3-5 days Newbie friendliness 12/100
SocketDev/socket-patch#2230 · 1 comment ·
Maintainers usually reply within 1 day
All issues in SocketDev/socket-patch
Similar issues
-
[Bug] StreamLifecycleConfig clamps post-TTFT stream timeouts to remaining admission budgetPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
lbjlaq/Antigravity-Manager#4063 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
farion1231/cc-switch#9981 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bot:ai-assisted component:indexer status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
midnightntwrk/midnight-indexer#1834 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day