Route `get <uuid>` agent mode through download_and_apply_patches_into instead of a second copy of the engine
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
Start in crates/socket-patch-cli/src/commands/get.rs at the UUID agent-mode path and compare it with download_and_apply_patches_into in crates/socket-patch-cli/src/commands/agent_download.rs. Read the existing UUID tests in get.rs and tests/get/, then route the fetched patch through the shared engine and remove the duplicate helpers. Done when the listed output, save-only, dry-run, and nested-apply behaviors meet the acceptance criteria and the UUID tests pass.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
[agent] Filed by the scheduled architecture audit (audit-cli-tests). Register: register comment.
Kind: refactor. Register ID: T01.
Problem
get <uuid> in agent mode does not use the shared download engine. Instead, save_patch_record plus save_and_apply_patch (get.rs L1931-L2172, about 240 lines) repeat, for a single patch, every step of download_and_apply_patches_into (agent_download.rs L1700-L1886):``
- the lock acquire;
- the fail-closed manifest read-modify-write;
- the
files_for_manifestguard; decide_patch_action;write_all_patch_blobsand the unwind on failure;- the uuid-drift and gitignore warnings;
- the lock hand-off and the nested apply;
record_apply_outcome.
The copies have already drifted:
- No-files message: "Patch X has no applicable files; nothing to apply" in get.rs L1951, against "patch has no applicable files" in the engine.```
- Blob failure: get prints its own "Error: Blob decode or write failed for patch" line and builds a different envelope (L1976-L1995).
- Unchanged record: the uuid path re-applies a record that hasn't changed (L2064-L2068). The engine applies only added or updated records.
persist_blobs: the uuid path ignoresDownloadParams.persist_blobs.
The engine already supports a pre-fetched patch: fetch_selected_patches takes a prefetched map, and the vendored arm of the uuid path already goes through download_patch_records_preflighted with it.
Proposed change
- Build the one-element prefetched map from the
PatchResponsethatget <uuid>fetched, and calldownload_and_apply_patches_into, as the vendored arm does. - Delete
save_patch_recordandsave_and_apply_patch. - If the re-apply of an unchanged record (#454) is still wanted, make it an engine rule for every caller, not a get-only branch.
Size
get.rs and possibly agent_download.rs. About −230 / +30 lines.
Acceptance criteria
get <uuid>human and--jsonoutput stay the same, except the no-files and blob-failure wording, which takes the engine's form.- The existing
getuuid tests inget.rsmod testsandtests/get/stay green, and they are updated only where they pinned the drifted wording. --save-only,--dry-runand the nested-apply exit codes are unchanged.
- Vorherrschende Sprache
- Rust
- Sterne
- 8
- Forks
- 2
- Ø Merge
- 19 Std. 24 Min.
- Gemergte PRs (30 T.)
- 669
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus SocketDev/socket-patch
-
agent:triaged arch-audit priority:p3 refactor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
SocketDev/socket-patch#1860 ·
Maintainer antworten meist innerhalb von 1 Tag
-
agent:triaged arch-audit priority:p3 refactor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
SocketDev/socket-patch#1838 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Vendored npm rollback / remove / vendor --revert on a lockfileVersion 2 lock fail after any `npm install`, yet half-revert the lock: `packages` goes back to the registry while the legacy mirror keeps the patched integrity, and npm 6 then fails EINTEGRITYEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenbug bughunt pm:npm
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
SocketDev/socket-patch#1937 ·
Maintainer antworten meist innerhalb von 1 Tag
-
arch-audit refactor
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 22/100
SocketDev/socket-patch#1935 ·
Maintainer antworten meist innerhalb von 1 Tag
-
arch-audit bug
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 55/100
SocketDev/socket-patch#1934 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in SocketDev/socket-patch
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
calcit-lang/calcit#2538 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Remove the em dashes from the skill smart-account referenceEvtl. vergeben @Vamsi-2581 hat das heute übernommen. Offenagent-ready area: docs documentation good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Soneso/stellar-agent-wallet#541 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
bovinemagnet/AdocFoundry#279 ·
Maintainer antworten meist innerhalb von 1 Tag
-
help wanted
Schwierigkeit 1/5 Ein halber Tag Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
weihubeats/Miyo#132 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen