[bug] MergeSettings drops every installer hook event the user overlay does not mention
Maintainers usually reply within 9 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 66/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- developer-experience
Research direction
Start with mergeSettingsPreserving and the INSTALLER_OWNED_KEYS list, which the issue names as the places where installer-owned keys are carried forward. Reproduce with the inputs given in the issue, where the merged hooks map should keep Stop and UserPromptSubmit but currently keeps only Stop. Done means a merge where the overlay names some hook events keeps the installer's other events, with a test covering that case.
Written by the indexing model from the issue text.
Description
What happened
MergeSettings drops every installer hook event the user overlay does not mention
Summary
mergeSettingsPreserving carries INSTALLER_OWNED_KEYS (hooks, statusLine, spinnerVerbs, spinnerTipsOverride) forward from the existing settings.json only when neither layer defines the key. Since 8.761.0 the shipped settings.system.json carries no hooks key, so the first time the user overlay defines hooks at all (SettingsBackport writes it as soon as the user adds one hook to one event), the merge takes the overlay's hooks map wholesale and every installer event the overlay does not name disappears from settings.json.
Observed: an overlay naming SessionStart, Stop and StopFailure left settings.json with those 3 events; PreToolUse, PostToolUse, SessionEnd, UserPromptSubmit, PostToolUseFailure, ConfigChange, PermissionRequest and Notification were gone (27 hooks, memory injection and turn records included). /ic hook_wiring reported 17 mis-wired. Nothing warned at merge time.
Repro: mergeSettingsPreserving({}, { hooks: { Stop: [ ... ] } }, { hooks: { Stop: [ ... ], UserPromptSubmit: [ ... ] } }) returns hooks with Stop only.
Fix applied locally: when existing[k] and merged[k] are both plain objects, copy each sub-key of existing[k] that merged[k] lacks. With that, the overlay keeps owning the events it names and the installer's other events survive. Restoring the lost events was a dry-run then --apply of InstallHooks (additive, idempotent), followed by the normal backport + merge.
Related: #2497 (the append annotation leak under a system-absent key), which hides this one because the ignored SessionStart hook is the regeneration itself.
Details
- Kind: bug
- LifeOS version: 8.761.0
Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.
- Dominant language
- TypeScript
- Stars
- 19.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 danielmiessler/LifeOS
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
danielmiessler/LifeOS#2622 ·
Maintainers usually reply within 9 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
danielmiessler/LifeOS#2620 ·
Maintainers usually reply within 9 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
danielmiessler/LifeOS#2616 ·
Maintainers usually reply within 9 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
danielmiessler/LifeOS#2612 ·
Maintainers usually reply within 9 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
danielmiessler/LifeOS#2606 ·
Maintainers usually reply within 9 days
All issues in danielmiessler/LifeOS
Similar issues
-
Chip source filter and denial markers miss Storage rows when a Storage activity source is pickedOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
omdsh-dev/DSH-better-sidebar#1141 ·
Maintainers usually reply within 2 days
-
desktop linux photos
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Cleanup SetupPossibly taken @AlexanderKaran claimed this today. Opendocumentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
e18e/framework-tracker#769 ·
Maintainers usually reply within 1 day
-
bug v2
Difficulty 1/5 Under an hour Newbie friendliness 88/100
modelcontextprotocol/servers#5483 ·
Maintainers usually reply within 1 day