8 of 9 docker agent e2e suites serve an all-zeros beforeHash and apply with --force, so they only prove the --force path; port gem's real-beforeHash probe
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 42/100
Rechercherichtung
Start with upstream_before_hash in crates/socket-patch-cli/tests/docker_e2e_gem.rs (around L88-L95), the probe to generalise, then compare it with the placeholder beforeHash in docker_e2e_golang.rs (L98) and its forced apply (L194). Move the probe into the shared docker harness that #1968 covers, and serve the real hash in each suite's mock. Done when the non-force scan --sync apply reports applied: 1 in coverage-docker, and reverting the served hash to zeros makes that leg fail.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
[agent] Filed by the scheduled architecture audit (audit-cli-tests). Register: register comment.
Kind: refactor (test honesty). Register ID: T62.
Problem
The docker agent suites (docker_e2e_<eco>.rs) are the only end-to-end proof that scan → scan --sync → apply works against a real installed package. Eight of the nine serve a placeholder "beforeHash": "000…0" from their wiremock fixture and then run apply --force. For example, golang has the placeholder at L98 and the force apply at L194.
The same pattern, a 64-zero beforeHash plus --force, appears in cargo, composer, deno, golang, maven, npm, nuget and pypi (grep-counted on cbbbdb9).
gem is the exception, and its own doc explains why the pattern is a problem (docker_e2e_gem.rs L88-L95):
Serving this as the fixture's
beforeHash— instead of an all-zeros placeholder — is what lets the gated apply paths run: with the placeholder,scan --sync's nested apply hit the variant gate and failed invisibly, so the chain only ever proved the--forcepath.
As a result, in the other eight suites the nested apply that scan --sync performs is expected to fail. The suites log its exit code instead of gating on it (golang L180: "Exit code is logged for…"). The gated, non-force apply path (beforeHash match → write → afterHash verify) has no container-level proof for those ecosystems.
Proposed change
- Generalise gem's
upstream_before_hashprobe, a once-per-process probe container that computes the real git-blob sha256 of the installed file, into the shared docker harness (see #1968). - Serve the real hash in each suite's mock.
- Gate on the nested
scan --syncapply's exit code andsummary.applied. - Keep at most one
--forceleg per suite, and name it as a force test.
Do one ecosystem per PR, or all eight at once if CI time allows.
Size
8 test files. About +15 / −10 lines each, plus about 40 shared lines.
Acceptance criteria
- In each suite, the non-force chain passes in
coverage-dockerwithscan --syncreportingapplied: 1. - Setting the served
beforeHashback to zeros makes the non-force leg fail. - Any remaining force legs are named
*_force_*.
Related: #1968 (T60).
- Vorherrschende Sprache
- Rust
- Sterne
- 9
- Forks
- 2
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 309
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
-
Windows unit tests fail on main: pnpm-registry-overrides fixtures are checked out as CRLF (mixes CRLF and LF line endings)Evtl. vergeben @mikolalysenko hat das heute übernommen. Offenagent:claimed agent:triaged ci-janitor priority:p1
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 85/100
SocketDev/socket-patch#2238 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
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
-
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)Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenagent:triaged ci-janitor priority:p1
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 42/100
SocketDev/socket-patch#2235 ·
Maintainer antworten meist innerhalb von 1 Tag
-
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 runEvtl. vergeben @mikolalysenko hat das heute übernommen. Offenagent:claimed agent:triaged bug bughunt pm:bundler priority:p1 ux
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 18/100
SocketDev/socket-patch#2231 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in SocketDev/socket-patch
Ähnliche Issues
-
area: cli good first issue type: feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
[Bug] Windows Ghidra provider rejects a PATH-only JDK: bare `java.exe` probe fails with Win32 87Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
renaming a provider to a taken name fails with a raw sql errorEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenarea:storage kind:bug priority:p3 ready
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug bugfix
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
storytold/photocraft#16975 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
expo/exact#1716 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag