Decide: one hosted `redirect` JSON block for disk scan and the in-memory engine (today {mode, rewrittenFiles} vs a seven-key block)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 38/100
- Type d'issue
- Refactorisation
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- rust
- Domaine
- backend-api-design, cli
Piste de recherche
Read crates/socket-patch-cli/src/commands/scan/hosted.rs and crates/socket-patch-core/src/hosted/render.rs to compare the disk and in-memory redirect JSON blocks, then review CLI_CONTRACT and tests/hosted_memory_parity.rs. Decide which proposed shape should be shared, update the corresponding implementation and documentation, and fix the stale comment and repeated sentence. Done means disk and memory emit matching key sets, or the docs accurately describe both shapes, with the parity test covering the chosen contract.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
[agent] Filed by the scheduled architecture audit (audit-cli-tests). Register: register comment.
Kind: decision. Register ID: T29.
Question
The hosted --json envelope's nested redirect block has two shapes. Which one should both paths emit?
- Option A (recommended): both paths emit core's seven-key block. Disk
scangainsredirected,skipped,patches,warningsanddryRun; it already hasmodeandrewrittenFiles. This is additive for disk consumers. The per-patchpinned/would_pin/unpinnedrows then also exist on disk, beside the envelopeevents[]. - Option B: both paths emit the disk shape
{mode, rewrittenFiles}, with per-patch outcomes only inevents[]and warnings only in the top-levelwarnings[]. This removes keys from in-memory (napi/hosted-bundle) consumers. - Option C: keep both shapes, but correct the docs so neither claims to be the only one.
Problem
- Disk: scan/hosted.rs
redirect_blockL95-L99 emits{ "mode": "hosted", "rewrittenFiles": [...] }. Its per-patch outcomes are envelope events (applied/verified/skipped). - In-memory: core hosted/render.rs
redirect_json_blockL22-L77 emitsmode,redirected,rewrittenFiles,skipped,patches,warningsanddryRun. Onlyhosted/memory/mod.rscalls it (L1289, L1571). - Its doc says this is "the ONE spelling of its key set … shared by every hosted path (disk scan, its zero-discovery arm, and the in-memory engine), so the two cannot drift by convention". That is false on
main. - A comment at scan/hosted.rs L1900-L1904 refers to
redirect.patches[], which the disk path never emits. - The sentence "no lockfile entry pinning it could be rewritten" is written 3 times (hosted.rs L150, L2444, render.rs L61).
Proposed change (after the decision)
- A: disk calls
redirect_json_blockandredirect_blockis deleted. - B: the memory path drops the extra keys.
- C: both docs are corrected.
In every case, fix the stale comment and keep the sentence once.
Size
2 to 3 files plus CLI_CONTRACT text. Under 100 lines.
Acceptance criteria
- One function builds the block for both paths, or the docs stop claiming that.
tests/hosted_memory_parity.rs(or a new test) asserts the disk and memoryredirectkey sets are equal.
- Langage dominant
- Rust
- Étoiles
- 8
- Forks
- 2
- Merge moyen
- 19 h 12 min
- PR mergées (30 j)
- 709
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de SocketDev/socket-patch
-
agent:triaged arch-audit priority:p3 refactor
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
SocketDev/socket-patch#1860 ·
Les mainteneurs répondent en général sous 1 jour
-
agent:triaged arch-audit priority:p3 refactor
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
SocketDev/socket-patch#1838 ·
Les mainteneurs répondent en général sous 1 jour
-
Share one scoped env-var test guard: EnvGuard is copy-pasted 11 times across core unit and integration testsPeut-être pris @mikolalysenko l’a pris aujourd’hui. Ouverteagent:claimed agent:triaged arch-audit priority:p3 refactor
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
SocketDev/socket-patch#1889 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
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 keptPeut-être pris @mikolalysenko l’a pris aujourd’hui. Ouverteagent:claimed agent:triaged arch-audit priority:p1 refactor
Difficulté 4/5 1-2 jours Accessibilité débutants 25/100
SocketDev/socket-patch#1888 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
agent:triaged arch-audit priority:p3 refactor
Difficulté 4/5 1-2 jours Accessibilité débutants 55/100
SocketDev/socket-patch#1887 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de SocketDev/socket-patch
Issues similaires
-
bug priority: low ui
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
storytold/photocraft#10370 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
area:doc bug in progress needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
bherbruck/solvecraft#9634 · 2 commentaires · 1 réaction ·
-
inflate: total_in uses plain += on c_ulong (32-bit on Windows), panics in debug for streams > 4 GiBOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
trifectatechfoundation/zlib-rs#570 · 1 commentaire ·
-
bug discord-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
LanternOps/breeze#10755 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
aranya-project/aranya#803 ·