Preset composition: no mode for extending arrays at the same @path
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- cli
Research direction
The issue does not name implementation files, tests, or an entry point. Start by locating the preset composition and remove handling, then resolve the open questions around deduplication, ordering, and user-added matching entries before defining what a completed change should verify.
Written by the indexing model from the issue text.
Description
Problem
Two presets cannot both contribute to the same array-valued config path. Existing modes:
replace— last writer wins; second install clobbers the firstmerge— object key-merge only; doesn't apply to arrays
Concrete scenario
Today jdtls-lombok writes to `lsp.jdtls.command`:
```json
["jdtls", "--jvm-arg=-javaagent:{{cache}}/lombok.jar"]
```
If a future `jdtls-heap` preset also wanted to extend that command (e.g. `--jvm-arg=-Xmx4g`), there's no clean way to install both. Installing the second overwrites the first.
Same shape would hit any future preset that wants to add a JVM arg, classpath entry, or CLI flag to an LSP that's already configured by another preset.
Workarounds today
- Bundle into one preset (loses modularity)
- Hand-edit
opencode.jsonafter install (breaksremove, breaks idempotency) - Ship a personal preset via
OPENCODE_PRESETS_PATHthat shadows the bundled one
Proposed direction (not committing to it)
A third mode — append / extend — that concatenates into the array at @path, deduping by exact element match. remove would strip exactly the elements the preset added.
Open questions:
- Dedup semantics (exact match? structural? by key prefix like `--jvm-arg=-javaagent:`?)
- Order guarantees across multiple appenders
- How
removeinteracts with user-added entries that happen to match
Why file now
No real second use case yet. Filing so it's not lost when one shows up — don't implement speculatively.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 0
- Avg merge
- 2m
- Merged PRs (30d)
- 9
Contributor guide
No contributing guide indexed for this repository
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.
Similar issues
-
comp/dashboard P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·