MergeSettings: an append annotation inside an overlay-only object is emitted raw into settings.json
I maintainer di solito rispondono entro 9 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 86/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- bun, json, typescript
- Ambito
- backend
Direzione di ricerca
Leggi LifeOS/install/LIFEOS/TOOLS/MergeSettings.ts intorno alle righe 170–177, poi esegui la riproduzione con l’albero di lavoro pulito dell’issue ed esamina out.json. Controlla come vengono gestiti gli oggetti presenti solo nell’overlay e confronta il risultato con l’output atteso indicato. Il lavoro è completato quando le annotazioni di merge annidate sono state consumate e l’output contiene l’array atteso.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version
LifeOS 7.40.4; repro on main @ 5e2f2e8
What is broken
mergeSettings consumes { "__merge": "append", "values": [...] } only when it meets the annotation at a key the system layer also has, or at the top level of an overlay-only key. When the overlay adds an object the system layer does not have at all, the function falls through to cloneJsonValue(user), which copies the object verbatim, so any annotation nested inside it reaches settings.json unconsumed. Claude Code then rejects the field, e.g. autoMode.allow: Expected array, but received object, and the rules in it are not applied. The file header promises "Merge annotations are consumed and never emitted in the output." The --check mode compares against the same merge, so it reports no differences.
Where (file:line)
LifeOS/install/LIFEOS/TOOLS/MergeSettings.ts:177 (return cloneJsonValue(user);), reached from the overlay-only branch at :170 with system === undefined.
Repro on a clean tree
mkdir -p /tmp/ms-repro && cd /tmp/ms-repro
echo '{"permissions":{"allow":["Read"]}}' > system.json
echo '{"autoMode":{"allow":{"__merge":"append","values":["rule one"]}}}' > user.json
HOME=/tmp/ms-repro bun <lifeos-checkout>/LifeOS/install/LIFEOS/TOOLS/MergeSettings.ts \
--system system.json --user user.json --output out.json
jq -c .autoMode out.json
Negative control
On unpatched main @ 5e2f2e8 the merge exits 0 ("Merged 1 system keys + 1 user overlays") and out.json contains {"allow":{"__merge":"append","values":["rule one"]}}, an object where Claude Code requires an array. Expected: {"allow":["rule one"]}.
A stock install does not hit this through autoMode, because the shipped settings.system.json defines autoMode. It is hit by any overlay-only section that carries an annotation, e.g. a settings.system.json that omits autoMode while SettingsBackport writes an append annotation for autoMode.allow into the overlay.
Suggested fix
Recurse into overlay-only objects so nested annotations are consumed. Tested against the repro above: output becomes {"allow":["rule one"]}.
@@ -172,6 +172,10 @@
return merged;
}
+ if (system === undefined && isObjectRecord(user)) {
+ return mergeSettings({}, user);
+ }
+
return cloneJsonValue(user);
}
Before submitting
- I searched open and closed issues for this defect.
- The repro runs against a clean tree of the version above, not against my modified install.
- I removed personal data from the pasted output.
- Lingua principale
- TypeScript
- Stelle
- 19.6k
- Fork
- 2.5k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di danielmiessler/LifeOS
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
danielmiessler/LifeOS#2538 ·
I maintainer di solito rispondono entro 9 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
danielmiessler/LifeOS#2537 ·
I maintainer di solito rispondono entro 9 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
danielmiessler/LifeOS#2533 ·
I maintainer di solito rispondono entro 9 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
danielmiessler/LifeOS#2532 ·
I maintainer di solito rispondono entro 9 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
danielmiessler/LifeOS#2531 ·
I maintainer di solito rispondono entro 9 giorni
Tutte le issue di danielmiessler/LifeOS
Issue simili
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster maturity:stable no-stale P1
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
openclaw/openclaw#190772 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
flisk-sh/run-my-agents#61 ·
-
Difficoltà 2/5 3-5 giorni Idoneità per principianti 62/100
career-ops-hq/career-ops#6399 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
BoardGamesEmpire/board-games-empire-backend#1027 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
johnfrog76/connected-deck#21 ·